[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <29553.1212066208@redhat.com>
Date: Thu, 29 May 2008 14:03:28 +0100
From: David Howells <dhowells@...hat.com>
To: "Mike Frysinger" <vapier.adi@...il.com>
Cc: dhowells@...hat.com, "Christoph Lameter" <clameter@....com>,
"Pekka J Enberg" <penberg@...helsinki.fi>, mpm@...enic.com,
lethal@...ux-sh.org, linux-kernel@...r.kernel.org,
"Bryan Wu" <cooloney@...nel.org>
Subject: Re: [PATCH] nommu: fix kobjsize() for SLOB and SLUB
Mike Frysinger <vapier.adi@...il.com> wrote:
> > I fixed it by setting ARCH_KMALLOC_MINALIGN and ARCH_SLAB_MINALIGN.
>
> what was the change exactly ?
The attached patch.
David
---
[PATCH] FRV: Specify the minimum slab/kmalloc alignment
From: David Howells <dhowells@...hat.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@...hat.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..2947764 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 8
+#define ARCH_SLAB_MINALIGN 8
+
/*****************************************************************************/
/*
* virtual memory layout from kernel's point of view
--
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