From: catalin.marinas@arm.com (Catalin Marinas)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 4/8] ARM: The v6_dma_inv_range() function must preserve data on SMP
Date: Wed, 02 Jun 2010 18:02:34 +0100 [thread overview]
Message-ID: <20100602170234.18569.57694.stgit@e102109-lin.cambridge.arm.com> (raw)
In-Reply-To: <20100602170039.18569.41823.stgit@e102109-lin.cambridge.arm.com>
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.
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Reported-by: Ronen Shitrit <rshitrit@marvell.com>
---
arch/arm/mm/cache-v6.S | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/arch/arm/mm/cache-v6.S b/arch/arm/mm/cache-v6.S
index e46ecd8..332b48c 100644
--- a/arch/arm/mm/cache-v6.S
+++ b/arch/arm/mm/cache-v6.S
@@ -212,7 +212,8 @@ v6_dma_inv_range:
#endif
1:
#ifdef CONFIG_SMP
- str r0, [r0] @ write for ownership
+ ldr r2, [r0] @ read for ownership
+ str r2, [r0] @ write for ownership
#endif
#ifdef HARVARD_CACHE
mcr p15, 0, r0, c7, c6, 1 @ invalidate D line
next prev parent reply other threads:[~2010-06-02 17:02 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-02 17:02 [PATCH v2 0/8] Patches for 2.6.35 Catalin Marinas
2010-06-02 17:02 ` [PATCH v2 1/8] ARM: Improve the L2 cache performance when PL310 is used Catalin Marinas
2010-06-02 17:02 ` [PATCH v2 2/8] ARM: Align machine_desc.phys_io to a 1MB section Catalin Marinas
2010-06-02 17:02 ` [PATCH v2 3/8] ARM: Avoid the CONSISTENT_DMA_SIZE warning on noMMU builds Catalin Marinas
2010-06-02 17:02 ` Catalin Marinas [this message]
2010-06-02 17:02 ` [PATCH v2 5/8] ARM: Add a config option for the ARM11MPCore DMA cache maintenance workaround Catalin Marinas
2010-06-02 17:02 ` [PATCH v2 6/8] ARM: Add support for the MOVW/MOVT relocations in Thumb-2 Catalin Marinas
2010-06-02 17:02 ` [PATCH v2 7/8] ARM: Remove dummy loads from the original relocation address Catalin Marinas
2010-06-02 17:02 ` [PATCH v2 8/8] ARM: Do not compile the Thumb-2 module relocations on an ARM kernel Catalin Marinas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100602170234.18569.57694.stgit@e102109-lin.cambridge.arm.com \
--to=catalin.marinas@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).