diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2007-11-19 09:25:06 +0100 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-11-20 01:37:43 +0100 |
commit | 52142e756e9bf6485d3d53596e8aff2e816a7253 (patch) | |
tree | 63ce9329dad3cefae84fec67535500f1f23d52e3 /include/asm-powerpc/page_32.h | |
parent | [POWERPC] Fix build failure on legacy iSeries (diff) | |
download | linux-52142e756e9bf6485d3d53596e8aff2e816a7253.tar.xz linux-52142e756e9bf6485d3d53596e8aff2e816a7253.zip |
[POWERPC] Fix kmalloc alignment on non-coherent DMA platforms
On platforms doing non-coherent DMA (4xx, 8xx, ...), it's important
that the kmalloc minimum alignment is set to the cache line size, to
avoid sharing cache lines between different objects, so that DMA to
one of the objects doesn't corrupt the other.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to '')
-rw-r--r-- | include/asm-powerpc/page_32.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/asm-powerpc/page_32.h b/include/asm-powerpc/page_32.h index 374d0db37e1c..17110aff26e7 100644 --- a/include/asm-powerpc/page_32.h +++ b/include/asm-powerpc/page_32.h @@ -6,6 +6,10 @@ #define PPC_MEMSTART 0 +#ifdef CONFIG_NOT_COHERENT_CACHE +#define ARCH_KMALLOC_MINALIGN L1_CACHE_BYTES +#endif + #ifndef __ASSEMBLY__ /* * The basic type of a PTE - 64 bits for those CPUs with > 32 bit |