All of lore.kernel.org
 help / color / mirror / Atom feed
From: Giuseppe CAVALLARO <peppe.cavallaro@st.com>
To: linux-sh@vger.kernel.org
Subject: [PATCH] slab: fix slab flags for archs use alignment larger 64-bit
Date: Thu, 12 Feb 2009 17:47:28 +0000	[thread overview]
Message-ID: <1234460848-23253-1-git-send-email-peppe.cavallaro@st.com> (raw)
In-Reply-To: <49946204.70601@st.com>

I think, this fix is necessary for all the architectures want to
perform DMA into kmalloc caches and need a guaranteed alignment
larger than the alignment of a 64-bit integer.
An example is sh architecture where ARCH_KMALLOC_MINALIGN is L1_CACHE_BYTES.

As side effect, these kind of objects cannot be visible
within the /proc/slab_allocators file.

Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
---
 mm/slab.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/mm/slab.c b/mm/slab.c
index ddc41f3..031d785 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -2262,7 +2262,7 @@ kmem_cache_create (const char *name, size_t size, size_t align,
 		ralign = align;
 	}
 	/* disable debug if necessary */
-	if (ralign > __alignof__(unsigned long long))
+	if (ralign > ARCH_KMALLOC_MINALIGN)
 		flags &= ~(SLAB_RED_ZONE | SLAB_STORE_USER);
 	/*
 	 * 4) Store it.
-- 
1.5.6.6


  reply	other threads:[~2009-02-12 17:47 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-12 16:53 [PATCH] slab: fix slab flags for archs use alignment larger 64-bit Giuseppe CAVALLARO
2009-02-12 17:47 ` Giuseppe CAVALLARO [this message]
2009-02-12 17:51 Giuseppe CAVALLARO
2009-02-12 18:56 ` Paul Mundt
2009-02-12 18:56   ` Paul Mundt
2009-02-13 10:00   ` Giuseppe CAVALLARO
2009-02-13  9:00     ` Giuseppe CAVALLARO
2009-02-13  9:22     ` Pekka Enberg
2009-02-13  9:30       ` Pekka Enberg
2009-02-13  9:30         ` Pekka Enberg
2009-02-13 10:46       ` Giuseppe CAVALLARO
2009-02-13 10:05         ` Pekka Enberg
2009-02-13 11:15           ` Giuseppe CAVALLARO
2009-02-13 14:11             ` Giuseppe CAVALLARO
2009-02-13 13:41               ` Pekka Enberg
2009-02-18  9:30                 ` Giuseppe CAVALLARO

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=1234460848-23253-1-git-send-email-peppe.cavallaro@st.com \
    --to=peppe.cavallaro@st.com \
    --cc=linux-sh@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.