linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fix WANT_PAGE_VIRTUAL in memmap_init
@ 2005-06-27 10:58 Bob Picco
  2005-06-27 12:58 ` William Lee Irwin III
  0 siblings, 1 reply; 3+ messages in thread
From: Bob Picco @ 2005-06-27 10:58 UTC (permalink / raw)
  To: akpm; +Cc: linux-mm, bob.picco

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.

bob

Signed-off-by: Bob Picco <bob.picco@hp.com>

Index: linux-2.6.12-mm1/mm/page_alloc.c
===================================================================
--- linux-2.6.12-mm1.orig/mm/page_alloc.c	2005-06-23 14:18:09.000000000 -0400
+++ linux-2.6.12-mm1/mm/page_alloc.c	2005-06-23 14:19:46.000000000 -0400
@@ -1720,9 +1720,8 @@ void __init memmap_init_zone(unsigned lo
 #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++;
 #ifdef CONFIG_PAGE_OWNER
 		page->order = -1;
 #endif
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"aart@kvack.org"> aart@kvack.org </a>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-06-27 13:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-06-27 10:58 [PATCH] fix WANT_PAGE_VIRTUAL in memmap_init Bob Picco
2005-06-27 12:58 ` William Lee Irwin III
2005-06-27 13:04   ` William Lee Irwin III

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox