From: Linus Walleij Date: Thu, 29 Sep 2011 08:37:23 +0000 (+0100) Subject: ARM: 7113/1: mm: Align bank start to MAX_ORDER_NR_PAGES X-Git-Tag: v3.0.8~29 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=1289deb9b5c151876feb594cd82984f3932982e8;p=karo-tx-linux.git ARM: 7113/1: mm: Align bank start to MAX_ORDER_NR_PAGES commit 002ea9eefec98dada56fd5f8e432a4e8570c2a26 upstream. 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: Michael Bohan Cc: Nicolas Pitre Signed-off-by: Johan Palsson Signed-off-by: Rabin Vincent Signed-off-by: Linus Walleij Signed-off-by: Russell King Signed-off-by: Greg Kroah-Hartman --- diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c index c19571c40a21..4a4eba5192f3 100644 --- a/arch/arm/mm/init.c +++ b/arch/arm/mm/init.c @@ -473,6 +473,13 @@ static void __init free_unused_memmap(struct meminfo *mi) */ bank_start = min(bank_start, ALIGN(prev_bank_end, PAGES_PER_SECTION)); +#else + /* + * Align down here since the VM subsystem insists that the + * memmap entries are valid from the bank start aligned to + * MAX_ORDER_NR_PAGES. + */ + bank_start = round_down(bank_start, MAX_ORDER_NR_PAGES); #endif /* * If we had a previous bank, and there is a space