From: David Howells Date: Wed, 28 May 2008 14:36:34 +0000 (+0100) Subject: FRV: Specify the minimum slab/kmalloc alignment X-Git-Tag: v2.6.26-rc5~44 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dc1d60a014aa9614518f9856ff661716d0969ffd;p=linux-2.6 FRV: Specify the minimum slab/kmalloc alignment 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 Signed-off-by: Linus Torvalds --- diff --git a/include/asm-frv/mem-layout.h b/include/asm-frv/mem-layout.h index 734a1d0583..8a15c90431 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