提交 264da9f7 编写于 作者: J Johannes Weiner 提交者: Chris Zankel

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: NJohannes Weiner <jw@emlix.com>
Signed-off-by: NChris Zankel <chris@zankel.net>
上级 0bef42e5
...@@ -130,7 +130,8 @@ void __init bootmem_init(void) ...@@ -130,7 +130,8 @@ void __init bootmem_init(void)
/* Find an area to use for the bootmem bitmap. */ /* 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; bootmap_start = ~0;
for (i=0; i<sysmem.nr_banks; i++) for (i=0; i<sysmem.nr_banks; i++)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册