aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin/mach-common/cache.S
diff options
context:
space:
mode:
authorMike Frysinger <vapier.adi@gmail.com>2008-11-18 17:48:22 +0800
committerBryan Wu <cooloney@kernel.org>2008-11-18 17:48:22 +0800
commit39e96c8835c36b6867b4e18698b06746972cdfcc (patch)
treeb2913d1dad2492adba6413a820c80372fbb2b208 /arch/blackfin/mach-common/cache.S
parentBlackfin arch: Fix typo when adding CONFIG_DEBUG_VERBOSE (diff)
downloadlinux-dev-39e96c8835c36b6867b4e18698b06746972cdfcc.tar.xz
linux-dev-39e96c8835c36b6867b4e18698b06746972cdfcc.zip
Blackfin arch: fix bug - dmacopy test case fail on all platform
The cache code I added flushes 1 line too little if the start address is not aligned to the cache size. Cache align the start address so that when we straddle cache aligns, we get the right count. Signed-off-by: Mike Frysinger <vapier.adi@gmail.com> Signed-off-by: Bryan Wu <cooloney@kernel.org>
Diffstat (limited to 'arch/blackfin/mach-common/cache.S')
-rw-r--r--arch/blackfin/mach-common/cache.S6
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/blackfin/mach-common/cache.S b/arch/blackfin/mach-common/cache.S
index db532181fbde..d6780b495241 100644
--- a/arch/blackfin/mach-common/cache.S
+++ b/arch/blackfin/mach-common/cache.S
@@ -25,9 +25,13 @@
*/
.macro do_flush flushins:req optflushins optnopins label
+ R2 = -L1_CACHE_BYTES;
+
+ /* start = (start & -L1_CACHE_BYTES) */
+ R0 = R0 & R2;
+
/* end = ((end - 1) & -L1_CACHE_BYTES) + L1_CACHE_BYTES; */
R1 += -1;
- R2 = -L1_CACHE_BYTES;
R1 = R1 & R2;
R1 += L1_CACHE_BYTES;