diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2010-06-29 22:10:08 -0400 |
---|---|---|
committer | Chris Metcalf <cmetcalf@tilera.com> | 2010-07-06 13:42:04 -0400 |
commit | c6673cb54d191dd42935a61fcb0c452a4753fb23 (patch) | |
tree | 2ed6efb2cea2b11851f75738c5307f685361328c /arch | |
parent | 4b2bf4b3fc066d45870b7f33fa23dbcb9cb1a27f (diff) |
tile: 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: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Acked-by: Chris Metcalf <cmetcalf@tilera.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/tile/include/asm/cache.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/tile/include/asm/cache.h b/arch/tile/include/asm/cache.h index ee597147e5cd..869a14f4ceae 100644 --- a/arch/tile/include/asm/cache.h +++ b/arch/tile/include/asm/cache.h | |||
@@ -31,6 +31,14 @@ | |||
31 | #define L2_CACHE_BYTES (1 << L2_CACHE_SHIFT) | 31 | #define L2_CACHE_BYTES (1 << L2_CACHE_SHIFT) |
32 | #define L2_CACHE_ALIGN(x) (((x)+(L2_CACHE_BYTES-1)) & -L2_CACHE_BYTES) | 32 | #define L2_CACHE_ALIGN(x) (((x)+(L2_CACHE_BYTES-1)) & -L2_CACHE_BYTES) |
33 | 33 | ||
34 | /* | ||
35 | * TILE-Gx is fully coherents so we don't need to define | ||
36 | * ARCH_KMALLOC_MINALIGN. | ||
37 | */ | ||
38 | #ifndef __tilegx__ | ||
39 | #define ARCH_KMALLOC_MINALIGN L2_CACHE_BYTES | ||
40 | #endif | ||
41 | |||
34 | /* use the cache line size for the L2, which is where it counts */ | 42 | /* use the cache line size for the L2, which is where it counts */ |
35 | #define SMP_CACHE_BYTES_SHIFT L2_CACHE_SHIFT | 43 | #define SMP_CACHE_BYTES_SHIFT L2_CACHE_SHIFT |
36 | #define SMP_CACHE_BYTES L2_CACHE_BYTES | 44 | #define SMP_CACHE_BYTES L2_CACHE_BYTES |