Re: [PATCHv2 2/2] arm: Get rid of meminfo

From: Grant Likely
Date: Mon Feb 10 2014 - 16:58:51 EST


On Wed, Feb 5, 2014 at 12:02 AM, Laura Abbott <lauraa@xxxxxxxxxxxxxx> wrote:
> memblock is now fully integrated into the kernel and is the prefered
> method for tracking memory. Rather than reinvent the wheel with
> meminfo, migrate to using memblock directly instead of meminfo as
> an intermediate.
>
> Signed-off-by: Laura Abbott <lauraa@xxxxxxxxxxxxxx>
> ---
> diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c
> index b0df976..b6de661 100644
> --- a/arch/arm/kernel/setup.c
> +++ b/arch/arm/kernel/setup.c
> @@ -625,15 +625,8 @@ void __init dump_machine_table(void)
>
> int __init arm_add_memory(u64 start, u64 size)
> {
> - struct membank *bank = &meminfo.bank[meminfo.nr_banks];
> u64 aligned_start;

With the changes to this function, I think you can outright remove
early_init_dt_add_memory_arch() from arch/arm/kernel/devtree.c. The
default implementation (__weak) in drivers/of/fdt.c uses memblock
directly.

g.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/