aboutsummaryrefslogtreecommitdiffstats
path: root/arch/xtensa
diff options
context:
space:
mode:
authorJohannes Weiner <jw@emlix.com>2009-03-04 10:21:29 -0500
committerChris Zankel <chris@zankel.net>2009-04-03 02:39:18 -0400
commit264da9f708b130122d881fa4570d1cd618440a73 (patch)
treee2db6ac982344c4187dd0cb089bc9977752c7c0a /arch/xtensa
parent0bef42e5c061b4aa63cc488d11400a1ef8b8f5a2 (diff)
xtensa: don't make bootmem bitmap larger than required
If min_low_pfn is non-zero, the bitmap reserved for bootmem is bigger than needed. The number of pages bootmem has to maintain is the range from min_low_pfn to max_low_pfn. For now it has only been a theoretical mistake, min_low_pfn was always zero. Signed-off-by: Johannes Weiner <jw@emlix.com> Signed-off-by: Chris Zankel <chris@zankel.net>
Diffstat (limited to 'arch/xtensa')
-rw-r--r--arch/xtensa/mm/init.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/xtensa/mm/init.c b/arch/xtensa/mm/init.c
index 55b043a5918a..a534d52a57bd 100644
--- a/arch/xtensa/mm/init.c
+++ b/arch/xtensa/mm/init.c
@@ -130,7 +130,8 @@ void __init bootmem_init(void)
130 130
131 /* Find an area to use for the bootmem bitmap. */ 131 /* Find an area to use for the bootmem bitmap. */
132 132
133 bootmap_size = bootmem_bootmap_pages(max_low_pfn) << PAGE_SHIFT; 133 bootmap_size = bootmem_bootmap_pages(max_low_pfn - min_low_pfn);
134 bootmap_size <<= PAGE_SHIFT;
134 bootmap_start = ~0; 135 bootmap_start = ~0;
135 136
136 for (i=0; i<sysmem.nr_banks; i++) 137 for (i=0; i<sysmem.nr_banks; i++)