Commit b3a8b751 authored by Lennert Buytenhek's avatar Lennert Buytenhek Committed by Russell King

[ARM] 5034/1: fix arm{925,926,940,946} dma_flush_range() in WT mode

The CPU's dma_flush_range() operation needs to clean+invalidate the
given memory area if the cache is in writeback mode, or do just the
invalidate part if the cache is in writethrough mode, but the current
proc-arm{925,926,940,946} (incorrectly) do a cache clean in the
latter case.  This patch fixes that.
Signed-off-by: default avatarLennert Buytenhek <buytenh@marvell.com>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent db2c4392
...@@ -332,7 +332,7 @@ ENTRY(arm925_dma_flush_range) ...@@ -332,7 +332,7 @@ ENTRY(arm925_dma_flush_range)
#ifndef CONFIG_CPU_DCACHE_WRITETHROUGH #ifndef CONFIG_CPU_DCACHE_WRITETHROUGH
mcr p15, 0, r0, c7, c14, 1 @ clean+invalidate D entry mcr p15, 0, r0, c7, c14, 1 @ clean+invalidate D entry
#else #else
mcr p15, 0, r0, c7, c10, 1 @ clean D entry mcr p15, 0, r0, c7, c6, 1 @ invalidate D entry
#endif #endif
add r0, r0, #CACHE_DLINESIZE add r0, r0, #CACHE_DLINESIZE
cmp r0, r1 cmp r0, r1
......
...@@ -295,7 +295,7 @@ ENTRY(arm926_dma_flush_range) ...@@ -295,7 +295,7 @@ ENTRY(arm926_dma_flush_range)
#ifndef CONFIG_CPU_DCACHE_WRITETHROUGH #ifndef CONFIG_CPU_DCACHE_WRITETHROUGH
mcr p15, 0, r0, c7, c14, 1 @ clean+invalidate D entry mcr p15, 0, r0, c7, c14, 1 @ clean+invalidate D entry
#else #else
mcr p15, 0, r0, c7, c10, 1 @ clean D entry mcr p15, 0, r0, c7, c6, 1 @ invalidate D entry
#endif #endif
add r0, r0, #CACHE_DLINESIZE add r0, r0, #CACHE_DLINESIZE
cmp r0, r1 cmp r0, r1
......
...@@ -222,7 +222,7 @@ ENTRY(arm940_dma_flush_range) ...@@ -222,7 +222,7 @@ ENTRY(arm940_dma_flush_range)
#ifndef CONFIG_CPU_DCACHE_WRITETHROUGH #ifndef CONFIG_CPU_DCACHE_WRITETHROUGH
mcr p15, 0, r3, c7, c14, 2 @ clean/flush D entry mcr p15, 0, r3, c7, c14, 2 @ clean/flush D entry
#else #else
mcr p15, 0, r3, c7, c10, 2 @ clean D entry mcr p15, 0, r3, c7, c6, 2 @ invalidate D entry
#endif #endif
subs r3, r3, #1 << 26 subs r3, r3, #1 << 26
bcs 2b @ entries 63 to 0 bcs 2b @ entries 63 to 0
......
...@@ -265,7 +265,7 @@ ENTRY(arm946_dma_flush_range) ...@@ -265,7 +265,7 @@ ENTRY(arm946_dma_flush_range)
#ifndef CONFIG_CPU_DCACHE_WRITETHROUGH #ifndef CONFIG_CPU_DCACHE_WRITETHROUGH
mcr p15, 0, r0, c7, c14, 1 @ clean+invalidate D entry mcr p15, 0, r0, c7, c14, 1 @ clean+invalidate D entry
#else #else
mcr p15, 0, r0, c7, c10, 1 @ clean D entry mcr p15, 0, r0, c7, c6, 1 @ invalidate D entry
#endif #endif
add r0, r0, #CACHE_DLINESIZE add r0, r0, #CACHE_DLINESIZE
cmp r0, r1 cmp r0, r1
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment