From: David Howells <dhowells@redhat.com>
To: torvalds@osdl.org, akpm@linux-foundation.org
Cc: penberg@cs.helsinki.fi, dhowells@redhat.com,
linux-kernel@vger.kernel.org
Subject: [PATCH] FRV: Specify the minimum slab/kmalloc alignment
Date: Wed, 28 May 2008 15:36:34 +0100 [thread overview]
Message-ID: <20080528143634.29463.2720.stgit@warthog.procyon.org.uk> (raw)
From: David Howells <dhowells@redhat.com>
Specify the minimum slab/kmalloc alignment to be 8 bytes. This fixes a crash
when SLOB is selected as the memory allocator. The FRV arch needs this so
that it can use the load- and store-double instructions without faulting. By
default SLOB sets the minimum to be 4 bytes.
Signed-off-by: David Howells <dhowells@redhat.com>
---
include/asm-frv/mem-layout.h | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/include/asm-frv/mem-layout.h b/include/asm-frv/mem-layout.h
index 734a1d0..8a15c90 100644
--- a/include/asm-frv/mem-layout.h
+++ b/include/asm-frv/mem-layout.h
@@ -31,6 +31,13 @@
#define PAGE_MASK (~(PAGE_SIZE-1))
+/*
+ * the slab must be aligned such that load- and store-double instructions don't
+ * fault if used
+ */
+#define ARCH_KMALLOC_MINALIGN (sizeof(long) * 2)
+#define ARCH_SLAB_MINALIGN (sizeof(long) * 2)
+
/*****************************************************************************/
/*
* virtual memory layout from kernel's point of view
next reply other threads:[~2008-05-28 14:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-28 14:36 David Howells [this message]
2008-05-28 15:49 ` David Howells
2008-05-28 19:15 ` Andrew Morton
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=20080528143634.29463.2720.stgit@warthog.procyon.org.uk \
--to=dhowells@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=penberg@cs.helsinki.fi \
--cc=torvalds@osdl.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 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®