linux-stable/arch/powerpc/lib
Andrew Lewis 03d70617b8 powerpc: Prevent memory corruption due to cache invalidation of unaligned DMA buffer
On PowerPC processors with non-coherent cache architectures the DMA
subsystem calls invalidate_dcache_range() before performing a DMA read
operation.  If the address and length of the DMA buffer are not aligned
to a cache-line boundary this can result in memory outside of the DMA
buffer being invalidated in the cache.  If this memory has an
uncommitted store then the data will be lost and a subsequent read of
that address will result in an old value being returned from main memory.

Only when the DMA buffer starts on a cache-line boundary and is an exact
mutiple of the cache-line size can invalidate_dcache_range() be called,
otherwise flush_dcache_range() must be called.  flush_dcache_range()
will first flush uncommitted writes, and then invalidate the cache.

Signed-off-by: Andrew Lewis <andrew-lewis at netspace.net.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2008-07-01 11:28:54 +10:00
..
alloc.c [POWERPC] Limit range of __init_ref_ok somewhat 2007-10-03 11:48:44 +10:00
checksum_32.S
checksum_64.S
code-patching.c powerpc: Add tests of the code patching routines 2008-07-01 11:28:22 +10:00
copy_32.S Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
copypage_64.S [PATCH] powerpc: trivial: modify comments to refer to new location of files 2006-02-10 16:53:51 +11:00
copyuser_64.S [POWERPC] Use mtocrf instruction in asm when CONFIG_POWER4_ONLY=y 2007-04-13 03:55:13 +10:00
crtsavres.S [POWERPC] Fix -Os kernel builds with newer gcc versions 2008-06-16 15:00:54 +10:00
devres.c [POWERPC] devres: Add devm_ioremap_prot() 2008-05-05 16:47:14 +10:00
div64.S powerpc: Fix a corner case in __div64_32 2005-10-20 09:37:02 +10:00
dma-noncoherent.c powerpc: Prevent memory corruption due to cache invalidation of unaligned DMA buffer 2008-07-01 11:28:54 +10:00
feature-fixups-test.S powerpc: Add self-tests of the feature fixup code 2008-07-01 11:28:30 +10:00
feature-fixups.c powerpc: Add self-tests of the feature fixup code 2008-07-01 11:28:30 +10:00
locks.c [POWERPC] Make ppc64_defconfig without CONFIG_PPC_PSERIES build 2007-03-09 15:03:24 +11:00
Makefile powerpc: Add self-tests of the feature fixup code 2008-07-01 11:28:30 +10:00
mem_64.S [POWERPC] Use mtocrf instruction in asm when CONFIG_POWER4_ONLY=y 2007-04-13 03:55:13 +10:00
memcpy_64.S [POWERPC] Use mtocrf instruction in asm when CONFIG_POWER4_ONLY=y 2007-04-13 03:55:13 +10:00
rheap.c [POWERPC] Make rheap safe for spinlocks 2008-04-17 09:50:38 -05:00
sstep.c [POWERPC] Emulate more instructions in software 2007-04-24 21:31:57 +10:00
string.S [POWERPC] Add hand-coded assembly strcmp 2008-04-07 10:03:03 +10:00
usercopy_64.c