summaryrefslogtreecommitdiffstats
path: root/mm/page_alloc.c
diff options
context:
space:
mode:
authorBob Picco <bob.picco@hp.com>2005-06-27 14:36:28 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-27 15:11:42 -0700
commit3212c6be251219c0f4c2df0c93e122ff5be0d9dc (patch)
tree8105201ba37d55beeb4a042d4691661ba400d098 /mm/page_alloc.c
parent9c4142a133f7efee08238722b157656c3da7ca97 (diff)
downloadlinux-3212c6be251219c0f4c2df0c93e122ff5be0d9dc.tar.bz2
[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: Bob Picco <bob.picco@hp.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'mm/page_alloc.c')
-rw-r--r--mm/page_alloc.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 7ee675ad101e..3c9f7f881125 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -1667,9 +1667,8 @@ void __init memmap_init_zone(unsigned long size, int nid, unsigned long zone,
#ifdef WANT_PAGE_VIRTUAL
/* The shift won't overflow because ZONE_NORMAL is below 4G. */
if (!is_highmem_idx(zone))
- set_page_address(page, __va(start_pfn << PAGE_SHIFT));
+ set_page_address(page, __va(pfn << PAGE_SHIFT));
#endif
- start_pfn++;
}
}