[PATCH] reduce MAX_NR_ZONES: make ZONE_DMA32 optional

Make ZONE_DMA32 optional

- Add #ifdefs around ZONE_DMA32 specific code and definitions.

- Add CONFIG_ZONE_DMA32 config option and use that for x86_64
  that alone needs this zone.

- Remove the use of CONFIG_DMA_IS_DMA32 and CONFIG_DMA_IS_NORMAL
  for ia64 and fix up the way per node ZVCs are calculated.

- Fall back to prior GFP_ZONEMASK of 0x03 if there is no
  DMA32 zone.

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
Christoph Lameter
2006-09-25 23:31:13 -07:00
committed by Linus Torvalds
parent 2f1b624868
commit fb0e7942bd
6 changed files with 25 additions and 16 deletions

View File

@@ -70,7 +70,9 @@ static void __free_pages_ok(struct page *page, unsigned int order);
*/
int sysctl_lowmem_reserve_ratio[MAX_NR_ZONES-1] = {
256,
#ifdef CONFIG_ZONE_DMA32
256,
#endif
32
};
@@ -85,7 +87,9 @@ EXPORT_SYMBOL(zone_table);
static char *zone_names[MAX_NR_ZONES] = {
"DMA",
#ifdef CONFIG_ZONE_DMA32
"DMA32",
#endif
"Normal",
"HighMem"
};
@@ -1373,8 +1377,10 @@ static inline int highest_zone(int zone_bits)
int res = ZONE_NORMAL;
if (zone_bits & (__force int)__GFP_HIGHMEM)
res = ZONE_HIGHMEM;
#ifdef CONFIG_ZONE_DMA32
if (zone_bits & (__force int)__GFP_DMA32)
res = ZONE_DMA32;
#endif
if (zone_bits & (__force int)__GFP_DMA)
res = ZONE_DMA;
return res;