|
@@ -190,6 +190,12 @@ struct cpu_cache_fns {
|
|
|
void (*dma_flush_range)(unsigned long, unsigned long);
|
|
|
};
|
|
|
|
|
|
+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);
|
|
|
+};
|
|
|
+
|
|
|
/*
|
|
|
* Select the calling method
|
|
|
*/
|
|
@@ -246,6 +252,37 @@ extern void dmac_flush_range(unsigned long, unsigned long);
|
|
|
|
|
|
#endif
|
|
|
|
|
|
+#ifdef CONFIG_OUTER_CACHE
|
|
|
+
|
|
|
+extern struct outer_cache_fns outer_cache;
|
|
|
+
|
|
|
+static inline void outer_inv_range(unsigned long start, unsigned long end)
|
|
|
+{
|
|
|
+ if (outer_cache.inv_range)
|
|
|
+ outer_cache.inv_range(start, end);
|
|
|
+}
|
|
|
+static inline void outer_clean_range(unsigned long start, unsigned long end)
|
|
|
+{
|
|
|
+ if (outer_cache.clean_range)
|
|
|
+ outer_cache.clean_range(start, end);
|
|
|
+}
|
|
|
+static inline void outer_flush_range(unsigned long start, unsigned long end)
|
|
|
+{
|
|
|
+ if (outer_cache.flush_range)
|
|
|
+ outer_cache.flush_range(start, end);
|
|
|
+}
|
|
|
+
|
|
|
+#else
|
|
|
+
|
|
|
+static inline void outer_inv_range(unsigned long start, unsigned long end)
|
|
|
+{ }
|
|
|
+static inline void outer_clean_range(unsigned long start, unsigned long end)
|
|
|
+{ }
|
|
|
+static inline void outer_flush_range(unsigned long start, unsigned long end)
|
|
|
+{ }
|
|
|
+
|
|
|
+#endif
|
|
|
+
|
|
|
/*
|
|
|
* flush_cache_vmap() is used when creating mappings (eg, via vmap,
|
|
|
* vmalloc, ioremap etc) in kernel space for pages. Since the
|