]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
ARM: 5994/1: ARM: Add outer_cache_fns.sync function pointer (2/4)
authorCatalin Marinas <catalin.marinas@arm.com>
Wed, 24 Mar 2010 15:47:53 +0000 (16:47 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Thu, 25 Mar 2010 21:13:49 +0000 (21:13 +0000)
This patch introduces the outer_cache_fns.sync function pointer together
with the OUTER_CACHE_SYNC config option that can be used to drain the
write buffer of the outer cache.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/include/asm/outercache.h
arch/arm/mm/Kconfig

index c8571cbb5574e0c7ccbaca71fa4eae894fecee08..25f76bae57ab4e169cc03c977160e28f046e0ca1 100644 (file)
@@ -25,6 +25,9 @@ struct outer_cache_fns {
        void (*inv_range)(unsigned long, unsigned long);
        void (*clean_range)(unsigned long, unsigned long);
        void (*flush_range)(unsigned long, unsigned long);
+#ifdef CONFIG_OUTER_CACHE_SYNC
+       void (*sync)(void);
+#endif
 };
 
 #ifdef CONFIG_OUTER_CACHE
@@ -58,4 +61,15 @@ static inline void outer_flush_range(unsigned long start, unsigned long end)
 
 #endif
 
+#ifdef CONFIG_OUTER_CACHE_SYNC
+static inline void outer_sync(void)
+{
+       if (outer_cache.sync)
+               outer_cache.sync();
+}
+#else
+static inline void outer_sync(void)
+{ }
+#endif
+
 #endif /* __ASM_OUTERCACHE_H */
index c4ed9f93f646be93fbdcc048a326c5d7db995bcd..88a24de55aaf5a6b840a68a469b24fd3d58c2a5e 100644 (file)
@@ -736,6 +736,12 @@ config NEEDS_SYSCALL_FOR_CMPXCHG
 config OUTER_CACHE
        bool
 
+config OUTER_CACHE_SYNC
+       bool
+       help
+         The outer cache has a outer_cache_fns.sync function pointer
+         that can be used to drain the write buffer of the outer cache.
+
 config CACHE_FEROCEON_L2
        bool "Enable the Feroceon L2 cache controller"
        depends on ARCH_KIRKWOOD || ARCH_MV78XX0