diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2011-09-29 04:37:23 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-10-01 12:49:18 -0400 |
commit | 002ea9eefec98dada56fd5f8e432a4e8570c2a26 (patch) | |
tree | d97e36ac8ad876269cd26d28c0d368c0ec35c75e /arch/arm/mm/init.c | |
parent | 47ea91b4052d9e94b9dca5d7a3d947fbebd07ba9 (diff) |
ARM: 7113/1: mm: Align bank start to MAX_ORDER_NR_PAGES
The VM subsystem assumes that there are valid memmap entries from
the bank start aligned to MAX_ORDER_NR_PAGES.
On the Ux500 we have a lot of mem=N arguments on the commandline
triggering this bug several times over and causing kernel
oops messages.
Cc: stable@kernel.org
Cc: Michael Bohan <mbohan@codeaurora.org>
Cc: Nicolas Pitre <nico@fluxnic.net>
Signed-off-by: Johan Palsson <johan.palsson@stericsson.com>
Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mm/init.c')
-rw-r--r-- | arch/arm/mm/init.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c index cc7e2d8be9aa..f8037ba338ac 100644 --- a/arch/arm/mm/init.c +++ b/arch/arm/mm/init.c | |||
@@ -496,6 +496,13 @@ static void __init free_unused_memmap(struct meminfo *mi) | |||
496 | */ | 496 | */ |
497 | bank_start = min(bank_start, | 497 | bank_start = min(bank_start, |
498 | ALIGN(prev_bank_end, PAGES_PER_SECTION)); | 498 | ALIGN(prev_bank_end, PAGES_PER_SECTION)); |
499 | #else | ||
500 | /* | ||
501 | * Align down here since the VM subsystem insists that the | ||
502 | * memmap entries are valid from the bank start aligned to | ||
503 | * MAX_ORDER_NR_PAGES. | ||
504 | */ | ||
505 | bank_start = round_down(bank_start, MAX_ORDER_NR_PAGES); | ||
499 | #endif | 506 | #endif |
500 | /* | 507 | /* |
501 | * If we had a previous bank, and there is a space | 508 | * If we had a previous bank, and there is a space |