[patch 6/6] slab: only define SLAB_CACHE_DMA for CONFIG_ZONE_DMA

From: David Rientjes
Date: Tue May 24 2011 - 19:54:27 EST


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@xxxxxxxxxx>
---
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 */
/*
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/