* [RFC] peeling off zone from physical memory layout [7/10] i386 dicontig fix.
@ 2006-02-03 7:50 KAMEZAWA Hiroyuki
0 siblings, 0 replies; only message in thread
From: KAMEZAWA Hiroyuki @ 2006-02-03 7:50 UTC (permalink / raw)
To: linux-mm
Use for_each_page_in_zone() in i386/mm/discontig.c
Signed-Off-By: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Index: hogehoge/arch/i386/mm/discontig.c
===================================================================
--- hogehoge.orig/arch/i386/mm/discontig.c
+++ hogehoge/arch/i386/mm/discontig.c
@@ -31,6 +31,7 @@
#include <linux/nodemask.h>
#include <linux/module.h>
#include <linux/kexec.h>
+#include <linux/memorymap.h>
#include <asm/e820.h>
#include <asm/setup.h>
@@ -409,26 +410,15 @@ void __init set_highmem_pages_init(int b
#ifdef CONFIG_HIGHMEM
struct zone *zone;
struct page *page;
+ void *iter;
for_each_zone(zone) {
unsigned long node_pfn, zone_start_pfn, zone_end_pfn;
if (!is_highmem(zone))
continue;
-
- zone_start_pfn = zone->zone_start_pfn;
- zone_end_pfn = zone_start_pfn + zone->spanned_pages;
-
- printk("Initializing %s for node %d (%08lx:%08lx)\n",
- zone->name, zone->zone_pgdat->node_id,
- zone_start_pfn, zone_end_pfn);
-
- for (node_pfn = zone_start_pfn; node_pfn < zone_end_pfn; node_pfn++) {
- if (!pfn_valid(node_pfn))
- continue;
- page = pfn_to_page(node_pfn);
- add_one_highpage_init(page, node_pfn, bad_ppro);
- }
+ for_each_page_in_zone(page, zone , iter)
+ add_one_highpage_init(page, page_to_pfn(page), bad_ppro);
}
totalram_pages += totalhigh_pages;
#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:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-02-03 7:50 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-02-03 7:50 [RFC] peeling off zone from physical memory layout [7/10] i386 dicontig fix KAMEZAWA Hiroyuki
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox