Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

FRV: ARCH_KMALLOC_MINALIGN was already defined

ARCH_KMALLOC_MINALIGN was already defined in asm/mem-layout.h and so shouldn't
have been added to asm/cache.h as well, but rather altered in place.

The commit that added it to asm/cache.h was:

commit 69dcf3db03626c4f18de624e8632454ea12ff260
Author: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Date: Mon May 24 14:32:54 2010 -0700

frv: set ARCH_KMALLOC_MINALIGN

Architectures that handle DMA-non-coherent memory need to set
ARCH_KMALLOC_MINALIGN to make sure that kmalloc'ed buffer is
DMA-safe: the buffer doesn't share a cache with the others.

Signed-off-by: David Howells <dhowells@redhat.com>
cc: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

David Howells and committed by
Linus Torvalds
8507bb00 29d03fa1

+2 -4
-2
arch/frv/include/asm/cache.h
··· 17 17 #define L1_CACHE_SHIFT (CONFIG_FRV_L1_CACHE_SHIFT) 18 18 #define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT) 19 19 20 - #define ARCH_KMALLOC_MINALIGN L1_CACHE_BYTES 21 - 22 20 #define __cacheline_aligned __attribute__((aligned(L1_CACHE_BYTES))) 23 21 #define ____cacheline_aligned __attribute__((aligned(L1_CACHE_BYTES))) 24 22
+2 -2
arch/frv/include/asm/mem-layout.h
··· 35 35 * the slab must be aligned such that load- and store-double instructions don't 36 36 * fault if used 37 37 */ 38 - #define ARCH_KMALLOC_MINALIGN 8 39 - #define ARCH_SLAB_MINALIGN 8 38 + #define ARCH_KMALLOC_MINALIGN L1_CACHE_BYTES 39 + #define ARCH_SLAB_MINALIGN L1_CACHE_BYTES 40 40 41 41 /*****************************************************************************/ 42 42 /*