
From: Andy Whitcroft <apw@shadowen.org>

As the comments in mmzone.h indicate is_highmem() is designed to reduce the
proliferation of the constant ZONE_HIGHMEM.  This patch updates references
to ZONE_HIGHMEM to use is_highmem().  None appear to be on critical paths.

Signed-off-by: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 25-akpm/arch/i386/mm/discontig.c |   17 +++++++++++------
 25-akpm/mm/page_alloc.c          |    2 +-
 2 files changed, 12 insertions(+), 7 deletions(-)

diff -puN arch/i386/mm/discontig.c~convert-uses-of-zone_highmem-to-is_highmem arch/i386/mm/discontig.c
--- 25/arch/i386/mm/discontig.c~convert-uses-of-zone_highmem-to-is_highmem	Wed Jul  7 14:10:32 2004
+++ 25-akpm/arch/i386/mm/discontig.c	Wed Jul  7 14:10:32 2004
@@ -420,17 +420,22 @@ void __init zone_sizes_init(void)
 void __init set_highmem_pages_init(int bad_ppro) 
 {
 #ifdef CONFIG_HIGHMEM
-	int nid;
+	struct zone *zone;
 
-	for (nid = 0; nid < numnodes; nid++) {
+	for_each_zone(zone) {
 		unsigned long node_pfn, node_high_size, zone_start_pfn;
 		struct page * zone_mem_map;
 		
-		node_high_size = NODE_DATA(nid)->node_zones[ZONE_HIGHMEM].spanned_pages;
-		zone_mem_map = NODE_DATA(nid)->node_zones[ZONE_HIGHMEM].zone_mem_map;
-		zone_start_pfn = NODE_DATA(nid)->node_zones[ZONE_HIGHMEM].zone_start_pfn;
+		if (!is_highmem(zone))
+			continue;
+
+		printk("Initializing %s for node %d\n", zone->name,
+			zone->zone_pgdat->node_id);
+
+		node_high_size = zone->spanned_pages;
+		zone_mem_map = zone->zone_mem_map;
+		zone_start_pfn = zone->zone_start_pfn;
 
-		printk("Initializing highpages for node %d\n", nid);
 		for (node_pfn = 0; node_pfn < node_high_size; node_pfn++) {
 			one_highpage_init((struct page *)(zone_mem_map + node_pfn),
 					  zone_start_pfn + node_pfn, bad_ppro);
diff -puN mm/page_alloc.c~convert-uses-of-zone_highmem-to-is_highmem mm/page_alloc.c
--- 25/mm/page_alloc.c~convert-uses-of-zone_highmem-to-is_highmem	Wed Jul  7 14:10:32 2004
+++ 25-akpm/mm/page_alloc.c	Wed Jul  7 14:10:32 2004
@@ -1406,7 +1406,7 @@ void __init memmap_init_zone(struct page
 		INIT_LIST_HEAD(&page->lru);
 #ifdef WANT_PAGE_VIRTUAL
 		/* The shift won't overflow because ZONE_NORMAL is below 4G. */
-		if (zone != ZONE_HIGHMEM)
+		if (!is_highmem(zone))
 			set_page_address(page, __va(start_pfn << PAGE_SHIFT));
 #endif
 		start_pfn++;
_
