Index: linux-2.6.17-mm3/mm/vmstat.c =================================================================== --- linux-2.6.17-mm3.orig/mm/vmstat.c 2006-06-28 13:25:50.326249068 -0700 +++ linux-2.6.17-mm3/mm/vmstat.c 2006-06-28 13:42:44.302672166 -0700 @@ -395,7 +395,11 @@ struct seq_operations fragmentation_op = }; #ifdef CONFIG_DMA_IS_DMA32 +#ifdef CONFIG_DMA_IS_NORMAL +#define MAKE_PER_LOW_ZONE_TEXTS(x) x "_dma" +#else #define MAKE_PER_LOW_ZONE_TEXTS(x) x "_dma", x "_normal" +#endif #else #define MAKE_PER_LOW_ZONE_TEXTS(x) x "_dma", x "_dma32", x "_normal" #endif Index: linux-2.6.17-mm3/include/linux/vmstat.h =================================================================== --- linux-2.6.17-mm3.orig/include/linux/vmstat.h 2006-06-28 13:23:52.897952130 -0700 +++ linux-2.6.17-mm3/include/linux/vmstat.h 2006-06-28 13:41:26.585796566 -0700 @@ -19,7 +19,11 @@ */ #ifdef CONFIG_DMA_IS_DMA32 +#ifdef CONFIG_DMA_IS_NORMAL +#define FOR_ALL_LOW_ZONES(x) x##_DMA +#else #define FOR_ALL_LOW_ZONES(x) x##_DMA, x##_NORMAL +#endif #else #define FOR_ALL_LOW_ZONES(x) x##_DMA, x##_DMA32, x##_NORMAL #endif Index: linux-2.6.17-mm3/include/linux/mmzone.h =================================================================== --- linux-2.6.17-mm3.orig/include/linux/mmzone.h 2006-06-28 13:27:55.549962564 -0700 +++ linux-2.6.17-mm3/include/linux/mmzone.h 2006-06-28 13:43:34.903059848 -0700 @@ -377,7 +377,11 @@ unsigned long __init node_memmap_size_by /* * zone_idx() returns 0 for the ZONE_DMA zone, 1 for the ZONE_NORMAL zone, etc. */ +#if defined(CONFIG_HIGHMEM) || !defined(CONFIG_DMA_IS_NORMAL) #define zone_idx(zone) ((zone) - (zone)->zone_pgdat->node_zones) +#else +#define zone_idx(zone) 0 +#endif static inline int populated_zone(struct zone *zone) { @@ -396,7 +400,11 @@ static inline int is_highmem_idx(int idx static inline int is_normal_idx(int idx) { +#ifndef CONFIG_DMA_IS_NORMAL return (idx == ZONE_NORMAL); +#else + return 0; +#endif } /** @@ -416,7 +424,11 @@ static inline int is_highmem(struct zone static inline int is_normal(struct zone *zone) { +#ifndef CONFIG_DMA_IS_NORMAL return zone == zone->zone_pgdat->node_zones + ZONE_NORMAL; +#else + return 0; +#endif } static inline int is_dma32(struct zone *zone) @@ -430,7 +442,11 @@ static inline int is_dma32(struct zone * static inline int is_dma(struct zone *zone) { +#if defined(CONFIG_HIGHMEM) || !defined(CONFIG_DMA_IS_NORMAL) return zone == zone->zone_pgdat->node_zones + ZONE_DMA; +#else + return 1; +#endif } /* These two functions are used to setup the per zone pages min values */