Re: [uClinux-dev] [PATCH 1/2] m68knommu: reorganize the no-MMU cache flushing to match m68k

2012-05-20 Thread Greg Ungerer

Hi Geert,

On 05/20/2012 07:07 PM, Geert Uytterhoeven wrote:

On Fri, May 4, 2012 at 8:50 AM,  wrote:

In particular by reorganizing the __flush_caceh_all() code and separating


__flush_cache_all()


I'll fix that up.

Thanks for all the other acks too, I'll update the patches.

Regards
Greg



Greg Ungerer  --  Principal EngineerEMAIL: g...@snapgear.com
SnapGear Group, McAfee  PHONE:   +61 7 3435 2888
8 Gardner Close,FAX: +61 7 3891 3630
Milton, QLD, 4064, AustraliaWEB: http://www.SnapGear.com
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


Re: [uClinux-dev] [PATCH 1/2] m68knommu: reorganize the no-MMU cache flushing to match m68k

2012-05-20 Thread Geert Uytterhoeven
On Fri, May 4, 2012 at 8:50 AM,   wrote:
> In particular by reorganizing the __flush_caceh_all() code and separating

__flush_cache_all()

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org

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
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev

[uClinux-dev] [PATCH 1/2] m68knommu: reorganize the no-MMU cache flushing to match m68k

2012-05-03 Thread gerg
From: Greg Ungerer 

Introduce cache_push() and cache_clear() functions for the non-MMU m68k
devices. With these in place we can more easily merge some of the common
m68k arch code.

In particular by reorganizing the __flush_caceh_all() code and separating
the cache push and clear functions it becomes trivial to implement the
new cache_push() and cache_clear() functions.

Signed-off-by: Greg Ungerer 
---
 arch/m68k/include/asm/cacheflush_no.h |   32 
 1 files changed, 28 insertions(+), 4 deletions(-)

diff --git a/arch/m68k/include/asm/cacheflush_no.h 
b/arch/m68k/include/asm/cacheflush_no.h
index cb88aa9..7cafb53 100644
--- a/arch/m68k/include/asm/cacheflush_no.h
+++ b/arch/m68k/include/asm/cacheflush_no.h
@@ -30,11 +30,8 @@
 
 void mcf_cache_push(void);
 
-static inline void __flush_cache_all(void)
+static inline void __clear_cache_all(void)
 {
-#ifdef CACHE_PUSH
-   mcf_cache_push();
-#endif
 #ifdef CACHE_INVALIDATE
__asm__ __volatile__ (
"movel  %0, %%d0\n\t"
@@ -44,6 +41,14 @@ static inline void __flush_cache_all(void)
 #endif
 }
 
+static inline void __flush_cache_all(void)
+{
+#ifdef CACHE_PUSH
+   mcf_cache_push();
+#endif
+   __clear_cache_all();
+}
+
 /*
  * Some ColdFire parts implement separate instruction and data caches,
  * on those we should just flush the appropriate cache. If we don't need
@@ -76,4 +81,23 @@ static inline void __flush_dcache_all(void)
__asm__ __volatile__ ( "nop" );
 #endif
 }
+
+/*
+ * Push cache entries at supplied address. We want to write back any dirty
+ * data and the invalidate the cache lines associated with this address.
+ */
+static inline void cache_push(unsigned long paddr, int len)
+{
+   __flush_cache_all();
+}
+
+/*
+ * Clear cache entries at supplied address (that is don't write back any
+ * dirty data).
+ */
+static inline void cache_clear(unsigned long paddr, int len)
+{
+   __clear_cache_all();
+}
+
 #endif /* _M68KNOMMU_CACHEFLUSH_H */
-- 
1.7.0.4

___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev