]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
Blackfin arch: fix bug - dmacopy test case fail on all platform
authorMike Frysinger <vapier.adi@gmail.com>
Tue, 18 Nov 2008 09:48:22 +0000 (17:48 +0800)
committerBryan Wu <cooloney@kernel.org>
Tue, 18 Nov 2008 09:48:22 +0000 (17:48 +0800)
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>
arch/blackfin/mach-common/cache.S

index db532181fbdeb9200a6d445b6f7fd940cd088830..d6780b4952415ef0f01bd39e6e0724517b5f244e 100644 (file)
  */
 .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;