Re: [PATCH v2] m68k: fix ColdFire clear cache operation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jul 11, 2012 at 2:37 AM,  <gerg@xxxxxxxxxxxx> wrote:
--- a/arch/m68k/include/asm/cacheflush_mm.h
+++ b/arch/m68k/include/asm/cacheflush_mm.h
@@ -17,6 +17,41 @@
 #define DCACHE_SETMASK 0
 #endif

+/*
+ * ColdFire architecture has no way to clear individual cache lines, so we
+ * are stuck invalidating all the cache entries when we want a clear operation.
+ */
+static inline void clear_cf_icache(unsigned long start, unsigned long end)
+{
+       __asm__ __volatile__ (
+               "movec  %0,%%cacr\n\t"
+               "nop\n\t"
+               :
+               : "r" (CACHE_MODE | CACR_ICINVA | CACR_BCINVA));

These new functions should be moved inside the #ifdef CONFIG_COLDFIRE
at the top of the file:

arch/m68k/include/asm/cacheflush_mm.h:30:10: error: 'CACHE_MODE'
undeclared (first use in this function)
arch/m68k/include/asm/cacheflush_mm.h:30:23: error: 'CACR_ICINVA'
undeclared (first use in this function)
arch/m68k/include/asm/cacheflush_mm.h:30:37: error: 'CACR_BCINVA'
undeclared (first use in this function)
arch/m68k/include/asm/cacheflush_mm.h:39:10: error: 'CACHE_MODE'
undeclared (first use in this function)
arch/m68k/include/asm/cacheflush_mm.h:39:23: error: 'CACR_DCINVA'
undeclared (first use in this function)
arch/m68k/include/asm/cacheflush_mm.h:48:10: error: 'CACHE_MODE'
undeclared (first use in this function)
arch/m68k/include/asm/cacheflush_mm.h:48:23: error: 'CACR_ICINVA'
undeclared (first use in this function)
arch/m68k/include/asm/cacheflush_mm.h:48:37: error: 'CACR_BCINVA'
undeclared (first use in this function)
arch/m68k/include/asm/cacheflush_mm.h:48:51: error: 'CACR_DCINVA'
undeclared (first use in this function)

http://kisskb.ellerman.id.au/kisskb/buildresult/6720541/

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe linux-m68k" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Video for Linux]     [Yosemite News]     [Linux S/390]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux