summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorQuinn Jensen <quinn.jensen@freescale.com>2007-04-04 17:45:59 -0600
committerQuinn Jensen <quinn.jensen@freescale.com>2007-05-24 16:26:26 -0600
commit4cb875484e494df06acf346898d8c5c7ebb746eb (patch)
tree0adf59f2855d320421a2245e40aea03abda10331 /arch
parent78947a2f2dd87f25c82f8c5239e102671f340c82 (diff)
ARM926 (MX27) D-cache writethrough bug fix.
Source: linux-arm-kernel list, posted by Gilles Maigne on 11/17/06. Text from e-mail posting: arm926_dma_flush_range write the content of dcache in memory when linux is configured with CONFIG_CPU_DCACHE_WRITETHROUGH ( cache in write-through) and does not invalidate the virtual address range. This is wrong for two reasons : 1/ the cache line does not need to be written because the cache is write-through 2/ the cache line is not invalidated, so next read at this address may come from the cache, which is wrong because main memory may contain valid data resulting of a DMA transaction. This patch applies to linux 2.6.18 http://www.bitshrine.org/gpp/linux-2.6.19.2-mx-arm926_dcache_writethrough_flush_fix.patch
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mm/proc-arm926.S2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/mm/proc-arm926.S b/arch/arm/mm/proc-arm926.S
index 44a7a652d625..879fb492e6ee 100644
--- a/arch/arm/mm/proc-arm926.S
+++ b/arch/arm/mm/proc-arm926.S
@@ -291,7 +291,7 @@ ENTRY(arm926_dma_flush_range)
#ifndef CONFIG_CPU_DCACHE_WRITETHROUGH
mcr p15, 0, r0, c7, c14, 1 @ clean+invalidate D entry
#else
- mcr p15, 0, r0, c7, c10, 1 @ clean D entry
+ mcr p15, 0, r0, c7, c6, 1 @ invalidate D entry
#endif
add r0, r0, #CACHE_DLINESIZE
cmp r0, r1