[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.00.1105241653180.29780@chino.kir.corp.google.com>
Date: Tue, 24 May 2011 16:53:57 -0700 (PDT)
From: David Rientjes <rientjes@...gle.com>
To: Pekka Enberg <penberg@...nel.org>
cc: Christoph Lameter <cl@...ux.com>, linux-kernel@...r.kernel.org
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@...gle.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 */
/*
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists