diff options
author | Paul Mundt <lethal@linux-sh.org> | 2009-08-21 04:23:14 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2009-08-21 04:23:14 -0400 |
commit | f26b2a562b46ab186c8383993ab1332673ac4a47 (patch) | |
tree | 5cf52089da5ca762c07cf6c1364a6aa411fb3038 /arch/sh/include | |
parent | f9bd71f255b4349c4f9f596863161fd5182f67fa (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.h | 41 |
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 | */ |
22 | extern void (*flush_cache_all)(void); | 22 | extern void (*local_flush_cache_all)(void *args); |
23 | extern void (*flush_cache_mm)(struct mm_struct *mm); | 23 | extern void (*local_flush_cache_mm)(void *args); |
24 | extern void (*flush_cache_dup_mm)(struct mm_struct *mm); | 24 | extern void (*local_flush_cache_dup_mm)(void *args); |
25 | extern void (*flush_cache_page)(struct vm_area_struct *vma, | 25 | extern void (*local_flush_cache_page)(void *args); |
26 | unsigned long addr, unsigned long pfn); | 26 | extern void (*local_flush_cache_range)(void *args); |
27 | extern void (*flush_cache_range)(struct vm_area_struct *vma, | 27 | extern void (*local_flush_dcache_page)(void *args); |
28 | unsigned long start, unsigned long end); | 28 | extern void (*local_flush_icache_range)(void *args); |
29 | extern void (*flush_dcache_page)(struct page *page); | 29 | extern void (*local_flush_icache_page)(void *args); |
30 | extern void (*flush_icache_range)(unsigned long start, unsigned long end); | 30 | extern void (*local_flush_cache_sigtramp)(void *args); |
31 | extern void (*flush_icache_page)(struct vm_area_struct *vma, | 31 | |
32 | struct page *page); | 32 | static inline void cache_noop(void *args) { } |
33 | extern void (*flush_cache_sigtramp)(unsigned long address); | ||
34 | 33 | ||
35 | extern void (*__flush_wback_region)(void *start, int size); | 34 | extern void (*__flush_wback_region)(void *start, int size); |
36 | extern void (*__flush_purge_region)(void *start, int size); | 35 | extern void (*__flush_purge_region)(void *start, int size); |
37 | extern void (*__flush_invalidate_region)(void *start, int size); | 36 | extern void (*__flush_invalidate_region)(void *start, int size); |
38 | 37 | ||
38 | extern void flush_cache_all(void); | ||
39 | extern void flush_cache_mm(struct mm_struct *mm); | ||
40 | extern void flush_cache_dup_mm(struct mm_struct *mm); | ||
41 | extern void flush_cache_page(struct vm_area_struct *vma, | ||
42 | unsigned long addr, unsigned long pfn); | ||
43 | extern void flush_cache_range(struct vm_area_struct *vma, | ||
44 | unsigned long start, unsigned long end); | ||
45 | extern void flush_dcache_page(struct page *page); | ||
46 | extern void flush_icache_range(unsigned long start, unsigned long end); | ||
47 | extern void flush_icache_page(struct vm_area_struct *vma, | ||
48 | struct page *page); | ||
49 | extern void flush_cache_sigtramp(unsigned long address); | ||
50 | |||
51 | struct 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 |
40 | extern void __flush_anon_page(struct page *page, unsigned long); | 57 | extern void __flush_anon_page(struct page *page, unsigned long); |
41 | 58 | ||