提交 3212c6be 编写于 作者: B Bob Picco 提交者: Linus Torvalds

[PATCH] fix WANT_PAGE_VIRTUAL in memmap_init

I spotted this issue while in memmap_init last week.  I can't say the
change has any test coverage by me.  start_pfn was formerly used in main
"for" loop.  The fix is replace start_pfn with pfn.
Signed-off-by: NBob Picco <bob.picco@hp.com>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 9c4142a1
...@@ -1667,9 +1667,8 @@ void __init memmap_init_zone(unsigned long size, int nid, unsigned long zone, ...@@ -1667,9 +1667,8 @@ void __init memmap_init_zone(unsigned long size, int nid, unsigned long zone,
#ifdef WANT_PAGE_VIRTUAL #ifdef WANT_PAGE_VIRTUAL
/* The shift won't overflow because ZONE_NORMAL is below 4G. */ /* The shift won't overflow because ZONE_NORMAL is below 4G. */
if (!is_highmem_idx(zone)) if (!is_highmem_idx(zone))
set_page_address(page, __va(start_pfn << PAGE_SHIFT)); set_page_address(page, __va(pfn << PAGE_SHIFT));
#endif #endif
start_pfn++;
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册