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

Grant Likely grant.likely at secretlab.ca
Mon Feb 10 16:58:20 EST 2014


On Wed, Feb 5, 2014 at 12:02 AM, Laura Abbott <lauraa at codeaurora.org> 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 at codeaurora.org>
> ---
> 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.



More information about the linux-arm-kernel mailing list