]> err.no Git - linux-2.6/commitdiff
[PATCH] fix WANT_PAGE_VIRTUAL in memmap_init
authorBob Picco <bob.picco@hp.com>
Mon, 27 Jun 2005 21:36:28 +0000 (14:36 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Mon, 27 Jun 2005 22:11:42 +0000 (15:11 -0700)
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>
mm/page_alloc.c

index 7ee675ad101eb579375050fb8ff503f6fbc4cfd1..3c9f7f88112543d2e72021c576cc377a2244e295 100644 (file)
@@ -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++;
        }
 }