lkml.org 
[lkml]   [2009]   [Mar]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch 6/7] xtensa: dont 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>
---
arch/xtensa/mm/init.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

--- 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<sysmem.nr_banks; i++)
--



\
 
 \ /
  Last update: 2009-03-02 18:01    [W:0.107 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site