[patch 5/6] slab: avoid compiling SLAB_CACHE_DMA without DMAsupport
From: David Rientjes
Date: Tue May 24 2011 - 19:54:09 EST
If CONFIG_ZONE_DMA is disabled, SLAB_CACHE_DMA is a no-op. Avoid
compiling support for it on such a configuration.
Signed-off-by: David Rientjes <rientjes@xxxxxxxxxx>
---
mm/slab.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/mm/slab.c b/mm/slab.c
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -153,14 +153,18 @@
#if DEBUG
# define CREATE_MASK (SLAB_RED_ZONE | \
SLAB_POISON | SLAB_HWCACHE_ALIGN | \
+# ifdef CONFIG_ZONE_DMA
SLAB_CACHE_DMA | \
+# endif
SLAB_STORE_USER | \
SLAB_RECLAIM_ACCOUNT | SLAB_PANIC | \
SLAB_DESTROY_BY_RCU | SLAB_MEM_SPREAD | \
SLAB_DEBUG_OBJECTS | SLAB_NOLEAKTRACE | SLAB_NOTRACK)
#else
# define CREATE_MASK (SLAB_HWCACHE_ALIGN | \
+# ifdef CONFIG_ZONE_DMA
SLAB_CACHE_DMA | \
+# endif
SLAB_RECLAIM_ACCOUNT | SLAB_PANIC | \
SLAB_DESTROY_BY_RCU | SLAB_MEM_SPREAD | \
SLAB_DEBUG_OBJECTS | SLAB_NOLEAKTRACE | SLAB_NOTRACK)
--
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/