diff options
author | Christoph Lameter <clameter@sgi.com> | 2006-09-26 02:31:14 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-09-26 11:48:46 -0400 |
commit | e53ef38d05dd59ed281a35590e4a5b64d8ff4c52 (patch) | |
tree | 42e525df84454e89abd6cab8d7983a6a0188b6bb /include/linux/gfp.h | |
parent | fb0e7942bdcbbd2f90e61cb4cfa4fa892a873f8a (diff) |
[PATCH] reduce MAX_NR_ZONES: make ZONE_HIGHMEM optional
Make ZONE_HIGHMEM optional
- ifdef out code and definitions related to CONFIG_HIGHMEM
- __GFP_HIGHMEM falls back to normal allocations if there is no
ZONE_HIGHMEM
- GFP_ZONEMASK becomes 0x01 if there is no DMA32 and no HIGHMEM
zone.
[jdike@addtoit.com: build fix]
Signed-off-by: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Christoph Lameter <clameter@engr.sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux/gfp.h')
-rw-r--r-- | include/linux/gfp.h | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/include/linux/gfp.h b/include/linux/gfp.h index 14610b56c13..2a2153ebfe0 100644 --- a/include/linux/gfp.h +++ b/include/linux/gfp.h | |||
@@ -9,17 +9,19 @@ struct vm_area_struct; | |||
9 | 9 | ||
10 | /* | 10 | /* |
11 | * GFP bitmasks.. | 11 | * GFP bitmasks.. |
12 | * | ||
13 | * Zone modifiers (see linux/mmzone.h - low three bits) | ||
14 | * | ||
15 | * These may be masked by GFP_ZONEMASK to make allocations with this bit | ||
16 | * set fall back to ZONE_NORMAL. | ||
17 | * | ||
18 | * Do not put any conditional on these. If necessary modify the definitions | ||
19 | * without the underscores and use the consistently. The definitions here may | ||
20 | * be used in bit comparisons. | ||
12 | */ | 21 | */ |
13 | /* Zone modifiers in GFP_ZONEMASK (see linux/mmzone.h - low three bits) */ | ||
14 | #define __GFP_DMA ((__force gfp_t)0x01u) | 22 | #define __GFP_DMA ((__force gfp_t)0x01u) |
15 | #define __GFP_HIGHMEM ((__force gfp_t)0x02u) | 23 | #define __GFP_HIGHMEM ((__force gfp_t)0x02u) |
16 | #ifndef CONFIG_ZONE_DMA32 | 24 | #define __GFP_DMA32 ((__force gfp_t)0x04u) |
17 | #define __GFP_DMA32 ((__force gfp_t)0x01) /* ZONE_DMA is ZONE_DMA32 */ | ||
18 | #elif BITS_PER_LONG < 64 | ||
19 | #define __GFP_DMA32 ((__force gfp_t)0x00) /* ZONE_NORMAL is ZONE_DMA32 */ | ||
20 | #else | ||
21 | #define __GFP_DMA32 ((__force gfp_t)0x04) /* Has own ZONE_DMA32 */ | ||
22 | #endif | ||
23 | 25 | ||
24 | /* | 26 | /* |
25 | * Action modifiers - doesn't change the zoning | 27 | * Action modifiers - doesn't change the zoning |