aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/include
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2009-08-21 04:23:14 -0400
committerPaul Mundt <lethal@linux-sh.org>2009-08-21 04:23:14 -0400
commitf26b2a562b46ab186c8383993ab1332673ac4a47 (patch)
tree5cf52089da5ca762c07cf6c1364a6aa411fb3038 /arch/sh/include
parentf9bd71f255b4349c4f9f596863161fd5182f67fa (diff)
sh: Make cache flushers SMP-aware.
This does a bit of rework for making the cache flushers SMP-aware. The function pointer-based flushers are renamed to local variants with the exported interface being commonly implemented and wrapping as necessary. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/include')
-rw-r--r--arch/sh/include/asm/cacheflush.h41
1 files changed, 29 insertions, 12 deletions
diff --git a/arch/sh/include/asm/cacheflush.h b/arch/sh/include/asm/cacheflush.h
index 32299b7c2b48..11e416630585 100644
--- a/arch/sh/include/asm/cacheflush.h
+++ b/arch/sh/include/asm/cacheflush.h
@@ -19,23 +19,40 @@
19 * - flush_icache_page(vma, pg) flushes(invalidates) a page for icache 19 * - flush_icache_page(vma, pg) flushes(invalidates) a page for icache
20 * - flush_cache_sigtramp(vaddr) flushes the signal trampoline 20 * - flush_cache_sigtramp(vaddr) flushes the signal trampoline
21 */ 21 */
22extern void (*flush_cache_all)(void); 22extern void (*local_flush_cache_all)(void *args);
23extern void (*flush_cache_mm)(struct mm_struct *mm); 23extern void (*local_flush_cache_mm)(void *args);
24extern void (*flush_cache_dup_mm)(struct mm_struct *mm); 24extern void (*local_flush_cache_dup_mm)(void *args);
25extern void (*flush_cache_page)(struct vm_area_struct *vma, 25extern void (*local_flush_cache_page)(void *args);
26 unsigned long addr, unsigned long pfn); 26extern void (*local_flush_cache_range)(void *args);
27extern void (*flush_cache_range)(struct vm_area_struct *vma, 27extern void (*local_flush_dcache_page)(void *args);
28 unsigned long start, unsigned long end); 28extern void (*local_flush_icache_range)(void *args);
29extern void (*flush_dcache_page)(struct page *page); 29extern void (*local_flush_icache_page)(void *args);
30extern void (*flush_icache_range)(unsigned long start, unsigned long end); 30extern void (*local_flush_cache_sigtramp)(void *args);
31extern void (*flush_icache_page)(struct vm_area_struct *vma, 31
32 struct page *page); 32static inline void cache_noop(void *args) { }
33extern void (*flush_cache_sigtramp)(unsigned long address);
34 33
35extern void (*__flush_wback_region)(void *start, int size); 34extern void (*__flush_wback_region)(void *start, int size);
36extern void (*__flush_purge_region)(void *start, int size); 35extern void (*__flush_purge_region)(void *start, int size);
37extern void (*__flush_invalidate_region)(void *start, int size); 36extern void (*__flush_invalidate_region)(void *start, int size);
38 37
38extern void flush_cache_all(void);
39extern void flush_cache_mm(struct mm_struct *mm);
40extern void flush_cache_dup_mm(struct mm_struct *mm);
41extern void flush_cache_page(struct vm_area_struct *vma,
42 unsigned long addr, unsigned long pfn);
43extern void flush_cache_range(struct vm_area_struct *vma,
44 unsigned long start, unsigned long end);
45extern void flush_dcache_page(struct page *page);
46extern void flush_icache_range(unsigned long start, unsigned long end);
47extern void flush_icache_page(struct vm_area_struct *vma,
48 struct page *page);
49extern void flush_cache_sigtramp(unsigned long address);
50
51struct flusher_data {
52 struct vm_area_struct *vma;
53 unsigned long addr1, addr2;
54};
55
39#define ARCH_HAS_FLUSH_ANON_PAGE 56#define ARCH_HAS_FLUSH_ANON_PAGE
40extern void __flush_anon_page(struct page *page, unsigned long); 57extern void __flush_anon_page(struct page *page, unsigned long);
41 58