]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] fix ColdFire 5407 cache flushing
authorGreg Ungerer <gerg@snapgear.com>
Sun, 25 May 2003 10:33:22 +0000 (03:33 -0700)
committerLinus Torvalds <torvalds@home.transmeta.com>
Sun, 25 May 2003 10:33:22 +0000 (03:33 -0700)
This fixes some ColdFire 5407 cache bogosity.  Previous code was pushing
all cache lines and the invalidating all of the cache.  The push should
be enough, and now with underlying fixes the the cache setup registers
it is.  Removed the whole invalidate cycle.

Original patch cam from Allessandro Rubini.

include/asm-m68knommu/cacheflush.h

index dfa537d547b187e59d1efba166e06f31c5b2e39a..5429ea10ed3cc94eebc985e207cddcdc45ca71cb 100644 (file)
 extern inline void __flush_cache_all(void)
 {
 #ifdef CONFIG_M5407
+       /*
+        *      Use cpushl to push and invalidate all cache lines.
+        *      Gas doesn't seem to know how to generate the ColdFire
+        *      cpushl instruction... Oh well, bit stuff it for now.
+        */
        __asm__ __volatile__ (
                "nop\n\t"
                "clrl   %%d0\n\t"
@@ -33,11 +38,6 @@ extern inline void __flush_cache_all(void)
                "addql  #1,%%d0\n\t"
                "cmpil  #4,%%d0\n\t"
                "bne    1b\n\t"
-               "movel  #0x01040100,%%d0\n\t"
-               "movec  %%d0,%%CACR\n\t"
-               "nop\n\t"
-               "movel  #0x86088400,%%d0\n\t"
-               "movec  %%d0,%%CACR\n\t"
                : : : "d0", "a0" );
 #endif /* CONFIG_M5407 */
 #ifdef CONFIG_M5272