Skip to content

Commit

Permalink
[PATCH] fix WANT_PAGE_VIRTUAL in memmap_init
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Bob Picco authored and Linus Torvalds committed Jun 27, 2005
1 parent 9c4142a commit 3212c6b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions mm/page_alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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++;
}
}

Expand Down

0 comments on commit 3212c6b

Please sign in to comment.