Skip to content

Commit

Permalink
xtensa: don't make bootmem bitmap larger than required
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Johannes Weiner authored and Chris Zankel committed Apr 3, 2009
1 parent 0bef42e commit 264da9f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion arch/xtensa/mm/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -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++)
Expand Down

0 comments on commit 264da9f

Please sign in to comment.