Messages in this thread Patch in this message | | | Date | Tue, 24 May 2011 16:53:57 -0700 (PDT) | From | David Rientjes <> | Subject | [patch 6/6] slab: only define SLAB_CACHE_DMA for CONFIG_ZONE_DMA |
| |
Only define SLAB_CACHE_DMA support if CONFIG_ZONE_DMA is enabled. This catches build errors when used on an invalid configuration.
Signed-off-by: David Rientjes <rientjes@google.com> --- include/linux/slab.h | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/include/linux/slab.h b/include/linux/slab.h --- a/include/linux/slab.h +++ b/include/linux/slab.h @@ -20,7 +20,9 @@ #define SLAB_RED_ZONE 0x00000400UL /* DEBUG: Red zone objs in a cache */ #define SLAB_POISON 0x00000800UL /* DEBUG: Poison objects */ #define SLAB_HWCACHE_ALIGN 0x00002000UL /* Align objs on cache lines */ -#define SLAB_CACHE_DMA 0x00004000UL /* Use GFP_DMA memory */ +#ifdef CONFIG_ZONE_DMA +# define SLAB_CACHE_DMA 0x00004000UL /* Use GFP_DMA memory */ +#endif #define SLAB_STORE_USER 0x00010000UL /* DEBUG: Store the last owner for bug hunting */ #define SLAB_PANIC 0x00040000UL /* Panic if kmem_cache_create() fails */ /*
| |