aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorChristoph Lameter <clameter@sgi.com>2006-09-26 02:31:13 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-09-26 11:48:46 -0400
commitfb0e7942bdcbbd2f90e61cb4cfa4fa892a873f8a (patch)
tree71344e9afafbd631f4ac010bc8c48e0b16737299 /mm
parent2f1b6248682f8b39ca3c7e549dfc216d26c4109b (diff)
[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>
Diffstat (limited to 'mm')
-rw-r--r--mm/page_alloc.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 2410a3cb1c53..5b5cbb5e1816 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -70,7 +70,9 @@ static void __free_pages_ok(struct page *page, unsigned int order);
70 */ 70 */
71int sysctl_lowmem_reserve_ratio[MAX_NR_ZONES-1] = { 71int sysctl_lowmem_reserve_ratio[MAX_NR_ZONES-1] = {
72 256, 72 256,
73#ifdef CONFIG_ZONE_DMA32
73 256, 74 256,
75#endif
74 32 76 32
75}; 77};
76 78
@@ -85,7 +87,9 @@ EXPORT_SYMBOL(zone_table);
85 87
86static char *zone_names[MAX_NR_ZONES] = { 88static char *zone_names[MAX_NR_ZONES] = {
87 "DMA", 89 "DMA",
90#ifdef CONFIG_ZONE_DMA32
88 "DMA32", 91 "DMA32",
92#endif
89 "Normal", 93 "Normal",
90 "HighMem" 94 "HighMem"
91}; 95};
@@ -1373,8 +1377,10 @@ static inline int highest_zone(int zone_bits)
1373 int res = ZONE_NORMAL; 1377 int res = ZONE_NORMAL;
1374 if (zone_bits & (__force int)__GFP_HIGHMEM) 1378 if (zone_bits & (__force int)__GFP_HIGHMEM)
1375 res = ZONE_HIGHMEM; 1379 res = ZONE_HIGHMEM;
1380#ifdef CONFIG_ZONE_DMA32
1376 if (zone_bits & (__force int)__GFP_DMA32) 1381 if (zone_bits & (__force int)__GFP_DMA32)
1377 res = ZONE_DMA32; 1382 res = ZONE_DMA32;
1383#endif
1378 if (zone_bits & (__force int)__GFP_DMA) 1384 if (zone_bits & (__force int)__GFP_DMA)
1379 res = ZONE_DMA; 1385 res = ZONE_DMA;
1380 return res; 1386 return res;