Skip to content

Commit

Permalink
ARM: 7113/1: mm: Align bank start to MAX_ORDER_NR_PAGES
Browse files Browse the repository at this point in the history
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: [email protected]
Cc: Michael Bohan <[email protected]>
Cc: Nicolas Pitre <[email protected]>
Signed-off-by: Johan Palsson <[email protected]>
Signed-off-by: Rabin Vincent <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
Signed-off-by: Russell King <[email protected]>
  • Loading branch information
linusw authored and Russell King committed Oct 1, 2011
1 parent 47ea91b commit 002ea9e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions arch/arm/mm/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,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
Expand Down

0 comments on commit 002ea9e

Please sign in to comment.