Skip to content

Commit

Permalink
FRV: Specify the minimum slab/kmalloc alignment
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
David Howells authored and Linus Torvalds committed May 28, 2008
1 parent 5e55843 commit dc1d60a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions include/asm-frv/mem-layout.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit dc1d60a

Please sign in to comment.