diff options
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/kernel/setup.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c index 29efc9f82057..75f1764933ab 100644 --- a/arch/arm/kernel/setup.c +++ b/arch/arm/kernel/setup.c | |||
@@ -441,16 +441,19 @@ __early_param("initrd=", early_initrd); | |||
441 | 441 | ||
442 | static void __init arm_add_memory(unsigned long start, unsigned long size) | 442 | static void __init arm_add_memory(unsigned long start, unsigned long size) |
443 | { | 443 | { |
444 | struct membank *bank; | ||
445 | |||
444 | /* | 446 | /* |
445 | * Ensure that start/size are aligned to a page boundary. | 447 | * Ensure that start/size are aligned to a page boundary. |
446 | * Size is appropriately rounded down, start is rounded up. | 448 | * Size is appropriately rounded down, start is rounded up. |
447 | */ | 449 | */ |
448 | size -= start & ~PAGE_MASK; | 450 | size -= start & ~PAGE_MASK; |
449 | 451 | ||
450 | meminfo.bank[meminfo.nr_banks].start = PAGE_ALIGN(start); | 452 | bank = &meminfo.bank[meminfo.nr_banks++]; |
451 | meminfo.bank[meminfo.nr_banks].size = size & PAGE_MASK; | 453 | |
452 | meminfo.bank[meminfo.nr_banks].node = PHYS_TO_NID(start); | 454 | bank->start = PAGE_ALIGN(start); |
453 | meminfo.nr_banks += 1; | 455 | bank->size = size & PAGE_MASK; |
456 | bank->node = PHYS_TO_NID(start); | ||
454 | } | 457 | } |
455 | 458 | ||
456 | /* | 459 | /* |