mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Heiko Carstens <heiko.carstens@de.ibm.com>
To: David Rientjes <rientjes@google.com>
Cc: Pekka Enberg <penberg@kernel.org>,
	Christoph Lameter <cl@linux.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [patch 6/6] slab: only define SLAB_CACHE_DMA for CONFIG_ZONE_DMA
Date: Wed, 25 May 2011 12:49:52 +0200	[thread overview]
Message-ID: <20110525104952.GD2498@osiris.boeblingen.de.ibm.com> (raw)
In-Reply-To: <alpine.DEB.2.00.1105241653180.29780@chino.kir.corp.google.com>

On Tue, May 24, 2011 at 04:53:57PM -0700, David Rientjes wrote:
> 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 */
>  /*

Ok, now I see what you want. But please let's don't add an
#ifdef CONFIG_ZONE_DMA
to the dasd driver. Instead just re-add ZONE_DMA to 31-bit s390. Everything
would be in ZONE_DMA again and ZONE_NORMAL would be empty. Doesn't matter
if we have an additional zone, since 31-bit support isn't important anymore.

So I could add the following patch to the s390 tree, if wanted:

---
 arch/s390/Kconfig   |    2 +-
 arch/s390/mm/init.c |    2 --
 2 files changed, 1 insertion(+), 3 deletions(-)

--- a/arch/s390/Kconfig
+++ b/arch/s390/Kconfig
@@ -2,7 +2,7 @@ config MMU
 	def_bool y
 
 config ZONE_DMA
-	def_bool y if 64BIT
+	def_bool y
 
 config LOCKDEP_SUPPORT
 	def_bool y
--- a/arch/s390/mm/init.c
+++ b/arch/s390/mm/init.c
@@ -119,9 +119,7 @@ void __init paging_init(void)
 	sparse_memory_present_with_active_regions(MAX_NUMNODES);
 	sparse_init();
 	memset(max_zone_pfns, 0, sizeof(max_zone_pfns));
-#ifdef CONFIG_ZONE_DMA
 	max_zone_pfns[ZONE_DMA] = PFN_DOWN(MAX_DMA_ADDRESS);
-#endif
 	max_zone_pfns[ZONE_NORMAL] = max_low_pfn;
 	free_area_init_nodes(max_zone_pfns);
 	fault_init();

  reply	other threads:[~2011-05-25 10:49 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-24 23:53 [patch 1/6] s390, block: disable fixed buffer mode when DMA support is disabled David Rientjes
2011-05-24 23:53 ` [patch 2/6] scsi: warn and avoid creating dma caches if " David Rientjes
2011-05-24 23:53 ` [patch 3/6] scsi, fnic: require DMA support for Cisco FNIC David Rientjes
2011-05-25  8:04   ` Christoph Hellwig
2011-05-25 19:28     ` Roland Dreier
2011-05-25 23:35       ` Abhijeet Joglekar (abjoglek)
2011-05-25 23:40         ` David Rientjes
2011-05-24 23:53 ` [patch 4/6] slub: avoid compiling SLAB_CACHE_DMA without DMA support David Rientjes
2011-05-25 14:58   ` Christoph Lameter
2011-05-25 23:34     ` David Rientjes
2011-05-24 23:53 ` [patch 5/6] slab: " David Rientjes
2011-05-24 23:53 ` [patch 6/6] slab: only define SLAB_CACHE_DMA for CONFIG_ZONE_DMA David Rientjes
2011-05-25 10:49   ` Heiko Carstens [this message]
2011-05-25 15:02     ` Christoph Lameter
2011-05-25 23:37     ` David Rientjes
2011-05-25  7:24 ` [patch 1/6] s390, block: disable fixed buffer mode when DMA support is disabled Heiko Carstens

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110525104952.GD2498@osiris.boeblingen.de.ibm.com \
    --to=heiko.carstens@de.ibm.com \
    --cc=cl@linux.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=penberg@kernel.org \
    --cc=rientjes@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®