aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorCatalin Marinas <catalin.marinas@arm.com>2010-06-21 10:09:36 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2010-07-01 05:12:14 -0400
commitca57926d53580f7c950496cb7ef6d7930610e1dd (patch)
tree93a559372fcc905726c6e253e463d101a5916837 /arch
parenta5e9d38b226686c89fd78413456535d5b66e8b1f (diff)
ARM: 6187/1: The v6_dma_inv_range() function must preserve data on SMP
A recent patch for DMA cache maintenance on ARM11MPCore added a write for ownership trick to the v6_dma_inv_range() function. Such operation destroys data already present in the buffer. However, this function is used with with dma_sync_single_for_device() which is supposed to preserve the existing data transfered into the buffer. This patch adds a combination of read/write for ownership to preserve the original data. Reported-by: Ronen Shitrit <rshitrit@marvell.com> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mm/cache-v6.S3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/arm/mm/cache-v6.S b/arch/arm/mm/cache-v6.S
index e46ecd847138..332b48c6d4ff 100644
--- a/arch/arm/mm/cache-v6.S
+++ b/arch/arm/mm/cache-v6.S
@@ -212,7 +212,8 @@ v6_dma_inv_range:
212#endif 212#endif
2131: 2131:
214#ifdef CONFIG_SMP 214#ifdef CONFIG_SMP
215 str r0, [r0] @ write for ownership 215 ldr r2, [r0] @ read for ownership
216 str r2, [r0] @ write for ownership
216#endif 217#endif
217#ifdef HARVARD_CACHE 218#ifdef HARVARD_CACHE
218 mcr p15, 0, r0, c7, c6, 1 @ invalidate D line 219 mcr p15, 0, r0, c7, c6, 1 @ invalidate D line