lkml.org 
[lkml]   [2011]   [May]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch 4/6] slub: avoid compiling SLAB_CACHE_DMA without DMA support
On Wed, 25 May 2011, Christoph Lameter wrote:

> > If CONFIG_ZONE_DMA is disabled, SLAB_CACHE_DMA is a no-op. Avoid
> > compiling support for it on such a configuration.
>
> Setting SLAB_CACHE_DMA to zero in the !ZONE_DMA case could avoid some of
> the ifdeffery.
>

That doesn't actually accomplish anything since all SLAB_CACHE_DMA does is
set SLUB_DMA, which is already 0 in slub_def.h without CONFIG_ZONE_DMA:

#ifdef CONFIG_ZONE_DMA
#define SLUB_DMA __GFP_DMA
#else
/* Disable DMA functionality */
#define SLUB_DMA (__force gfp_t)0
#endif
So doing the same for SLAB_CACHE_DMA wouldn't do anything. The point of
the patchset is to break the build if SLAB_CACHE_DMA is passed to
kmem_cache_create() and the kernel is not compiled for DMA support. That
should result in a build breakage rather than silently not supporting DMA
slab caches since it needs to be corrected at build.


\
 
 \ /
  Last update: 2011-05-26 01:37    [from the cache]
©2003-2011 Jasper Spaans