Re: [PATCH] nommu: fix kobjsize() for SLOB and SLUB

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Mike Frysinger <vapier.adi@...>
Cc: <dhowells@...>, Christoph Lameter <clameter@...>, Pekka J Enberg <penberg@...>, <mpm@...>, <lethal@...>, <linux-kernel@...>, Bryan Wu <cooloney@...>
Date: Thursday, May 29, 2008 - 9:03 am

Mike Frysinger <vapier.adi@gmail.com> wrote:


The attached patch.

David
---
[PATCH] FRV: Specify the minimum slab/kmalloc alignment

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..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
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] nommu: fix kobjsize() for SLOB and SLUB, Pekka J Enberg, (Thu May 22, 12:09 pm)
Re: [PATCH] nommu: fix kobjsize() for SLOB and SLUB, David Howells, (Wed May 28, 9:12 am)
Re: [PATCH] nommu: fix kobjsize() for SLOB and SLUB, David Howells, (Wed May 28, 10:27 am)
Re: [PATCH] nommu: fix kobjsize() for SLOB and SLUB, David Howells, (Wed May 28, 10:09 am)
Re: [PATCH] nommu: fix kobjsize() for SLOB and SLUB, Christoph Lameter, (Wed May 28, 1:26 pm)
Re: [PATCH] nommu: fix kobjsize() for SLOB and SLUB, David Howells, (Wed May 28, 1:38 pm)
Re: [PATCH] nommu: fix kobjsize() for SLOB and SLUB, Mike Frysinger, (Wed May 28, 4:35 pm)
Re: [PATCH] nommu: fix kobjsize() for SLOB and SLUB, David Howells, (Thu May 29, 9:03 am)
Re: [PATCH] nommu: fix kobjsize() for SLOB and SLUB, Mike Frysinger, (Thu May 29, 4:25 pm)
Re: [PATCH] nommu: fix kobjsize() for SLOB and SLUB, Christoph Lameter, (Thu May 29, 4:30 pm)
Re: [PATCH] nommu: fix kobjsize() for SLOB and SLUB, Mike Frysinger, (Thu May 29, 4:51 pm)
Re: [PATCH] nommu: fix kobjsize() for SLOB and SLUB, Christoph Lameter, (Thu May 29, 5:29 pm)
Re: [PATCH] nommu: fix kobjsize() for SLOB and SLUB, Mike Frysinger, (Fri May 30, 12:18 am)
Re: [PATCH] nommu: fix kobjsize() for SLOB and SLUB, Pekka J Enberg, (Wed May 28, 9:17 am)
Re: [PATCH] nommu: fix kobjsize() for SLOB and SLUB, David Howells, (Wed May 28, 9:40 am)
Re: [PATCH] nommu: fix kobjsize() for SLOB and SLUB, Paul Mundt, (Thu May 22, 7:40 pm)
Re: [PATCH] nommu: fix kobjsize() for SLOB and SLUB, Christoph Lameter, (Thu May 22, 7:45 pm)
Re: [PATCH] nommu: fix kobjsize() for SLOB and SLUB, Paul Mundt, (Thu May 22, 7:50 pm)
Re: [PATCH] nommu: fix kobjsize() for SLOB and SLUB, Christoph Lameter, (Thu May 22, 8:04 pm)
Re: [PATCH] nommu: fix kobjsize() for SLOB and SLUB, Christoph Lameter, (Thu May 22, 12:48 pm)