FRV: Specify the minimum slab/kmalloc alignment
authorDavid Howells <dhowells@redhat.com>
Wed, 28 May 2008 14:36:34 +0000 (15:36 +0100)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 28 May 2008 14:59:06 +0000 (07:59 -0700)
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>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/asm-frv/mem-layout.h

index 734a1d0583b6fc26f777bef0e06a8572f1a55ea5..8a15c90431b96c4b5358848e408030625f1872e8 100644 (file)
 
 #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