diff options
author | Colin Cross <ccross@android.com> | 2010-10-19 12:42:34 -0700 |
---|---|---|
committer | Colin Cross <ccross@android.com> | 2010-10-20 14:30:16 -0700 |
commit | 4263b270498e08bcfd9a8849995d977a2991f744 (patch) | |
tree | 68508ce2add914af5349f9949bf865dee2445574 /mm | |
parent | 424e17f5a2312184ae5c41e6fbbd674a82073b2d (diff) |
[ARM] mm: init: Use memblock to set up memory map
Based on patch by rmk on lkml at http://lkml.org/lkml/2010/10/11/179
Reverts changes to find_limits to fix crash when using memblock_remove
on the end of memory.
Original-author: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Colin Cross <ccross@android.com>
Change-Id: I6137a7939329381e4ed34bfcdc8b713dc50ebcc8
Diffstat (limited to 'mm')
-rw-r--r-- | mm/memblock.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/mm/memblock.c b/mm/memblock.c index 43840b305ecb..aa6919112842 100644 --- a/mm/memblock.c +++ b/mm/memblock.c @@ -196,6 +196,10 @@ static long memblock_add_region(struct memblock_region *rgn, u64 base, u64 size) long memblock_add(u64 base, u64 size) { struct memblock_region *_rgn = &memblock.memory; + u64 end = base + size; + + base = PAGE_ALIGN(base); + size = (end & PAGE_MASK) - base; /* On pSeries LPAR systems, the first MEMBLOCK is our RMO region. */ if (base == 0) |