From: Johannes Weiner Date: Wed, 4 Mar 2009 15:21:29 +0000 (+0100) Subject: xtensa: don't make bootmem bitmap larger than required X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=264da9f708b130122d881fa4570d1cd618440a73;p=openwrt%2Fstaging%2Fblogic.git 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 Signed-off-by: Chris Zankel --- 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) /* Find an area to use for the bootmem bitmap. */ - bootmap_size = bootmem_bootmap_pages(max_low_pfn) << PAGE_SHIFT; + bootmap_size = bootmem_bootmap_pages(max_low_pfn - min_low_pfn); + bootmap_size <<= PAGE_SHIFT; bootmap_start = ~0; for (i=0; i