Index: linux-2.6.18-rc1-mm1/include/linux/mmzone.h =================================================================== --- linux-2.6.18-rc1-mm1.orig/include/linux/mmzone.h 2006-07-11 11:46:05.575945865 -0700 +++ linux-2.6.18-rc1-mm1/include/linux/mmzone.h 2006-07-11 18:56:36.311255171 -0700 @@ -167,31 +167,33 @@ enum zone_type { #ifdef CONFIG_ZONE_DMA32 #ifdef CONFIG_HIGHMEM -#define GFP_ZONETYPES ((GFP_ZONEMASK + 1) / 2 + 1) /* Loner */ -#define GFP_ZONEMASK 0x07 -#define ZONES_SHIFT 2 /* ceil(log2(MAX_NR_ZONES)) */ -#else -#define GFP_ZONETYPES ((0x07 + 1) / 2 + 1) /* Loner */ -/* Mask __GFP_HIGHMEM */ -#define GFP_ZONEMASK 0x05 -#define ZONES_SHIFT 2 +#define GFP_ZONEMASK (__GFP_HIGHMEM | __GFP_DMA | __GFP_DMA32) +#else /* CONFIG_ZONE_DMA32 && !CONFIG_HIGHMEM */ +#define GFP_ZONEMASK (__GFP_DMA | __GFP_DMA32) #endif -#else +#define ZONES_SHIFT 2 +#define GFP_ZONETYPES 5 +/* + * We only would need 4 or 3 but we need to accomodate __GFP_DMA32 which is set to 4! + * This is only needed right now to accomodate x86_64. + */ + +#else /* !CONFIG_ZONE_DMA32 */ #ifdef CONFIG_HIGHMEM -#define GFP_ZONEMASK 0x03 +#define GFP_ZONEMASK (__GFP_DMA | __GFP_HIGHMEM) #define ZONES_SHIFT 2 #define GFP_ZONETYPES 3 -#else +#else /* !CONFIG_ZONE_DMA32 && !CONFIG_HIGHMEM */ -#define GFP_ZONEMASK 0x01 +#define GFP_ZONEMASK GFP_DMA #define ZONES_SHIFT 1 #define GFP_ZONETYPES 2 -#endif -#endif +#endif /* CONFIG_HIGHMEM */ +#endif /* CONFIG_ZONE_DMA32 */ struct zone { /* Fields commonly accessed by the page allocator */