Skip to contentSkip to conversation

FRV: Specify the minimum slab/kmalloc alignment [try #2]

PATCH New David Howells 1 participant 1 message May 28, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 FRV: Specify the minimum slab/kmalloc alignment [try #2]

From: David Howells <[email protected]>

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.

---

 include/asm-frv/mem-layout.h |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
include/asm-frv/mem-layout.h +7 -0
index 734a1d0..2947764 100644
@@ -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