diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2006-12-12 12:14:57 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-13 12:27:08 -0500 |
commit | ec8c0446b6e2b67b5c8813eb517f4bf00efa99a9 (patch) | |
tree | e7c12d7c486c958a5e38888b41cfcd6a558f1aff /include | |
parent | bcd022801ee514e28c32837f0b3ce18c775f1a7b (diff) |
[PATCH] Optimize D-cache alias handling on fork
Virtually index, physically tagged cache architectures can get away
without cache flushing when forking. This patch adds a new cache
flushing function flush_cache_dup_mm(struct mm_struct *) which for the
moment I've implemented to do the same thing on all architectures
except on MIPS where it's a no-op.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include')
25 files changed, 36 insertions, 0 deletions
diff --git a/include/asm-alpha/cacheflush.h b/include/asm-alpha/cacheflush.h index 805640b4107..b686cc7fc44 100644 --- a/include/asm-alpha/cacheflush.h +++ b/include/asm-alpha/cacheflush.h | |||
@@ -6,6 +6,7 @@ | |||
6 | /* Caches aren't brain-dead on the Alpha. */ | 6 | /* Caches aren't brain-dead on the Alpha. */ |
7 | #define flush_cache_all() do { } while (0) | 7 | #define flush_cache_all() do { } while (0) |
8 | #define flush_cache_mm(mm) do { } while (0) | 8 | #define flush_cache_mm(mm) do { } while (0) |
9 | #define flush_cache_dup_mm(mm) do { } while (0) | ||
9 | #define flush_cache_range(vma, start, end) do { } while (0) | 10 | #define flush_cache_range(vma, start, end) do { } while (0) |
10 | #define flush_cache_page(vma, vmaddr, pfn) do { } while (0) | 11 | #define flush_cache_page(vma, vmaddr, pfn) do { } while (0) |
11 | #define flush_dcache_page(page) do { } while (0) | 12 | #define flush_dcache_page(page) do { } while (0) |
diff --git a/include/asm-arm/cacheflush.h b/include/asm-arm/cacheflush.h index f0845646aac..378a3a2ce8d 100644 --- a/include/asm-arm/cacheflush.h +++ b/include/asm-arm/cacheflush.h | |||
@@ -319,6 +319,8 @@ extern void flush_ptrace_access(struct vm_area_struct *vma, struct page *page, | |||
319 | unsigned long len, int write); | 319 | unsigned long len, int write); |
320 | #endif | 320 | #endif |
321 | 321 | ||
322 | #define flush_cache_dup_mm(mm) flush_cache_mm(mm) | ||
323 | |||
322 | /* | 324 | /* |
323 | * flush_cache_user_range is used when we want to ensure that the | 325 | * flush_cache_user_range is used when we want to ensure that the |
324 | * Harvard caches are synchronised for the user space address range. | 326 | * Harvard caches are synchronised for the user space address range. |
diff --git a/include/asm-arm26/cacheflush.h b/include/asm-arm26/cacheflush.h index 9c1b9c7f2eb..14ae15b6faa 100644 --- a/include/asm-arm26/cacheflush.h +++ b/include/asm-arm26/cacheflush.h | |||
@@ -22,6 +22,7 @@ | |||
22 | 22 | ||
23 | #define flush_cache_all() do { } while (0) | 23 | #define flush_cache_all() do { } while (0) |
24 | #define flush_cache_mm(mm) do { } while (0) | 24 | #define flush_cache_mm(mm) do { } while (0) |
25 | #define flush_cache_dup_mm(mm) do { } while (0) | ||
25 | #define flush_cache_range(vma,start,end) do { } while (0) | 26 | #define flush_cache_range(vma,start,end) do { } while (0) |
26 | #define flush_cache_page(vma,vmaddr,pfn) do { } while (0) | 27 | #define flush_cache_page(vma,vmaddr,pfn) do { } while (0) |
27 | #define flush_cache_vmap(start, end) do { } while (0) | 28 | #define flush_cache_vmap(start, end) do { } while (0) |
diff --git a/include/asm-avr32/cacheflush.h b/include/asm-avr32/cacheflush.h index f1bf1708980..dfaaa88cd41 100644 --- a/include/asm-avr32/cacheflush.h +++ b/include/asm-avr32/cacheflush.h | |||
@@ -87,6 +87,7 @@ void invalidate_icache_region(void *start, size_t len); | |||
87 | */ | 87 | */ |
88 | #define flush_cache_all() do { } while (0) | 88 | #define flush_cache_all() do { } while (0) |
89 | #define flush_cache_mm(mm) do { } while (0) | 89 | #define flush_cache_mm(mm) do { } while (0) |
90 | #define flush_cache_dup_mm(mm) do { } while (0) | ||
90 | #define flush_cache_range(vma, start, end) do { } while (0) | 91 | #define flush_cache_range(vma, start, end) do { } while (0) |
91 | #define flush_cache_page(vma, vmaddr, pfn) do { } while (0) | 92 | #define flush_cache_page(vma, vmaddr, pfn) do { } while (0) |
92 | #define flush_cache_vmap(start, end) do { } while (0) | 93 | #define flush_cache_vmap(start, end) do { } while (0) |
diff --git a/include/asm-cris/cacheflush.h b/include/asm-cris/cacheflush.h index 72cc71dffe7..01af2de27c5 100644 --- a/include/asm-cris/cacheflush.h +++ b/include/asm-cris/cacheflush.h | |||
@@ -9,6 +9,7 @@ | |||
9 | */ | 9 | */ |
10 | #define flush_cache_all() do { } while (0) | 10 | #define flush_cache_all() do { } while (0) |
11 | #define flush_cache_mm(mm) do { } while (0) | 11 | #define flush_cache_mm(mm) do { } while (0) |
12 | #define flush_cache_dup_mm(mm) do { } while (0) | ||
12 | #define flush_cache_range(vma, start, end) do { } while (0) | 13 | #define flush_cache_range(vma, start, end) do { } while (0) |
13 | #define flush_cache_page(vma, vmaddr, pfn) do { } while (0) | 14 | #define flush_cache_page(vma, vmaddr, pfn) do { } while (0) |
14 | #define flush_dcache_page(page) do { } while (0) | 15 | #define flush_dcache_page(page) do { } while (0) |
diff --git a/include/asm-frv/cacheflush.h b/include/asm-frv/cacheflush.h index eaa5826bc1c..02500405a6f 100644 --- a/include/asm-frv/cacheflush.h +++ b/include/asm-frv/cacheflush.h | |||
@@ -20,6 +20,7 @@ | |||
20 | */ | 20 | */ |
21 | #define flush_cache_all() do {} while(0) | 21 | #define flush_cache_all() do {} while(0) |
22 | #define flush_cache_mm(mm) do {} while(0) | 22 | #define flush_cache_mm(mm) do {} while(0) |
23 | #define flush_cache_dup_mm(mm) do {} while(0) | ||
23 | #define flush_cache_range(mm, start, end) do {} while(0) | 24 | #define flush_cache_range(mm, start, end) do {} while(0) |
24 | #define flush_cache_page(vma, vmaddr, pfn) do {} while(0) | 25 | #define flush_cache_page(vma, vmaddr, pfn) do {} while(0) |
25 | #define flush_cache_vmap(start, end) do {} while(0) | 26 | #define flush_cache_vmap(start, end) do {} while(0) |
diff --git a/include/asm-h8300/cacheflush.h b/include/asm-h8300/cacheflush.h index 1e4d95bb5ec..71210d141b6 100644 --- a/include/asm-h8300/cacheflush.h +++ b/include/asm-h8300/cacheflush.h | |||
@@ -12,6 +12,7 @@ | |||
12 | 12 | ||
13 | #define flush_cache_all() | 13 | #define flush_cache_all() |
14 | #define flush_cache_mm(mm) | 14 | #define flush_cache_mm(mm) |
15 | #define flush_cache_dup_mm(mm) do { } while (0) | ||
15 | #define flush_cache_range(vma,a,b) | 16 | #define flush_cache_range(vma,a,b) |
16 | #define flush_cache_page(vma,p,pfn) | 17 | #define flush_cache_page(vma,p,pfn) |
17 | #define flush_dcache_page(page) | 18 | #define flush_dcache_page(page) |
diff --git a/include/asm-i386/cacheflush.h b/include/asm-i386/cacheflush.h index 7199f7b326f..74e03c8f2e5 100644 --- a/include/asm-i386/cacheflush.h +++ b/include/asm-i386/cacheflush.h | |||
@@ -7,6 +7,7 @@ | |||
7 | /* Caches aren't brain-dead on the intel. */ | 7 | /* Caches aren't brain-dead on the intel. */ |
8 | #define flush_cache_all() do { } while (0) | 8 | #define flush_cache_all() do { } while (0) |
9 | #define flush_cache_mm(mm) do { } while (0) | 9 | #define flush_cache_mm(mm) do { } while (0) |
10 | #define flush_cache_dup_mm(mm) do { } while (0) | ||
10 | #define flush_cache_range(vma, start, end) do { } while (0) | 11 | #define flush_cache_range(vma, start, end) do { } while (0) |
11 | #define flush_cache_page(vma, vmaddr, pfn) do { } while (0) | 12 | #define flush_cache_page(vma, vmaddr, pfn) do { } while (0) |
12 | #define flush_dcache_page(page) do { } while (0) | 13 | #define flush_dcache_page(page) do { } while (0) |
diff --git a/include/asm-ia64/cacheflush.h b/include/asm-ia64/cacheflush.h index f2dacb4245e..4906916d715 100644 --- a/include/asm-ia64/cacheflush.h +++ b/include/asm-ia64/cacheflush.h | |||
@@ -18,6 +18,7 @@ | |||
18 | 18 | ||
19 | #define flush_cache_all() do { } while (0) | 19 | #define flush_cache_all() do { } while (0) |
20 | #define flush_cache_mm(mm) do { } while (0) | 20 | #define flush_cache_mm(mm) do { } while (0) |
21 | #define flush_cache_dup_mm(mm) do { } while (0) | ||
21 | #define flush_cache_range(vma, start, end) do { } while (0) | 22 | #define flush_cache_range(vma, start, end) do { } while (0) |
22 | #define flush_cache_page(vma, vmaddr, pfn) do { } while (0) | 23 | #define flush_cache_page(vma, vmaddr, pfn) do { } while (0) |
23 | #define flush_icache_page(vma,page) do { } while (0) | 24 | #define flush_icache_page(vma,page) do { } while (0) |
diff --git a/include/asm-m32r/cacheflush.h b/include/asm-m32r/cacheflush.h index 8b261b49149..56961a9511b 100644 --- a/include/asm-m32r/cacheflush.h +++ b/include/asm-m32r/cacheflush.h | |||
@@ -9,6 +9,7 @@ extern void _flush_cache_copyback_all(void); | |||
9 | #if defined(CONFIG_CHIP_M32700) || defined(CONFIG_CHIP_OPSP) || defined(CONFIG_CHIP_M32104) | 9 | #if defined(CONFIG_CHIP_M32700) || defined(CONFIG_CHIP_OPSP) || defined(CONFIG_CHIP_M32104) |
10 | #define flush_cache_all() do { } while (0) | 10 | #define flush_cache_all() do { } while (0) |
11 | #define flush_cache_mm(mm) do { } while (0) | 11 | #define flush_cache_mm(mm) do { } while (0) |
12 | #define flush_cache_dup_mm(mm) do { } while (0) | ||
12 | #define flush_cache_range(vma, start, end) do { } while (0) | 13 | #define flush_cache_range(vma, start, end) do { } while (0) |
13 | #define flush_cache_page(vma, vmaddr, pfn) do { } while (0) | 14 | #define flush_cache_page(vma, vmaddr, pfn) do { } while (0) |
14 | #define flush_dcache_page(page) do { } while (0) | 15 | #define flush_dcache_page(page) do { } while (0) |
@@ -29,6 +30,7 @@ extern void smp_flush_cache_all(void); | |||
29 | #elif defined(CONFIG_CHIP_M32102) | 30 | #elif defined(CONFIG_CHIP_M32102) |
30 | #define flush_cache_all() do { } while (0) | 31 | #define flush_cache_all() do { } while (0) |
31 | #define flush_cache_mm(mm) do { } while (0) | 32 | #define flush_cache_mm(mm) do { } while (0) |
33 | #define flush_cache_dup_mm(mm) do { } while (0) | ||
32 | #define flush_cache_range(vma, start, end) do { } while (0) | 34 | #define flush_cache_range(vma, start, end) do { } while (0) |
33 | #define flush_cache_page(vma, vmaddr, pfn) do { } while (0) | 35 | #define flush_cache_page(vma, vmaddr, pfn) do { } while (0) |
34 | #define flush_dcache_page(page) do { } while (0) | 36 | #define flush_dcache_page(page) do { } while (0) |
@@ -41,6 +43,7 @@ extern void smp_flush_cache_all(void); | |||
41 | #else | 43 | #else |
42 | #define flush_cache_all() do { } while (0) | 44 | #define flush_cache_all() do { } while (0) |
43 | #define flush_cache_mm(mm) do { } while (0) | 45 | #define flush_cache_mm(mm) do { } while (0) |
46 | #define flush_cache_dup_mm(mm) do { } while (0) | ||
44 | #define flush_cache_range(vma, start, end) do { } while (0) | 47 | #define flush_cache_range(vma, start, end) do { } while (0) |
45 | #define flush_cache_page(vma, vmaddr, pfn) do { } while (0) | 48 | #define flush_cache_page(vma, vmaddr, pfn) do { } while (0) |
46 | #define flush_dcache_page(page) do { } while (0) | 49 | #define flush_dcache_page(page) do { } while (0) |
diff --git a/include/asm-m68k/cacheflush.h b/include/asm-m68k/cacheflush.h index 24d3ff44913..16bf375fdbe 100644 --- a/include/asm-m68k/cacheflush.h +++ b/include/asm-m68k/cacheflush.h | |||
@@ -89,6 +89,8 @@ static inline void flush_cache_mm(struct mm_struct *mm) | |||
89 | __flush_cache_030(); | 89 | __flush_cache_030(); |
90 | } | 90 | } |
91 | 91 | ||
92 | #define flush_cache_dup_mm(mm) flush_cache_mm(mm) | ||
93 | |||
92 | /* flush_cache_range/flush_cache_page must be macros to avoid | 94 | /* flush_cache_range/flush_cache_page must be macros to avoid |
93 | a dependency on linux/mm.h, which includes this file... */ | 95 | a dependency on linux/mm.h, which includes this file... */ |
94 | static inline void flush_cache_range(struct vm_area_struct *vma, | 96 | static inline void flush_cache_range(struct vm_area_struct *vma, |
diff --git a/include/asm-m68knommu/cacheflush.h b/include/asm-m68knommu/cacheflush.h index c3aadf3b0d8..163dcb1a968 100644 --- a/include/asm-m68knommu/cacheflush.h +++ b/include/asm-m68knommu/cacheflush.h | |||
@@ -8,6 +8,7 @@ | |||
8 | 8 | ||
9 | #define flush_cache_all() __flush_cache_all() | 9 | #define flush_cache_all() __flush_cache_all() |
10 | #define flush_cache_mm(mm) do { } while (0) | 10 | #define flush_cache_mm(mm) do { } while (0) |
11 | #define flush_cache_dup_mm(mm) do { } while (0) | ||
11 | #define flush_cache_range(vma, start, end) __flush_cache_all() | 12 | #define flush_cache_range(vma, start, end) __flush_cache_all() |
12 | #define flush_cache_page(vma, vmaddr) do { } while (0) | 13 | #define flush_cache_page(vma, vmaddr) do { } while (0) |
13 | #define flush_dcache_range(start,len) __flush_cache_all() | 14 | #define flush_dcache_range(start,len) __flush_cache_all() |
diff --git a/include/asm-mips/cacheflush.h b/include/asm-mips/cacheflush.h index e3c9925876a..0ddada3bb0b 100644 --- a/include/asm-mips/cacheflush.h +++ b/include/asm-mips/cacheflush.h | |||
@@ -17,6 +17,7 @@ | |||
17 | * | 17 | * |
18 | * - flush_cache_all() flushes entire cache | 18 | * - flush_cache_all() flushes entire cache |
19 | * - flush_cache_mm(mm) flushes the specified mm context's cache lines | 19 | * - flush_cache_mm(mm) flushes the specified mm context's cache lines |
20 | * - flush_cache_dup mm(mm) handles cache flushing when forking | ||
20 | * - flush_cache_page(mm, vmaddr, pfn) flushes a single page | 21 | * - flush_cache_page(mm, vmaddr, pfn) flushes a single page |
21 | * - flush_cache_range(vma, start, end) flushes a range of pages | 22 | * - flush_cache_range(vma, start, end) flushes a range of pages |
22 | * - flush_icache_range(start, end) flush a range of instructions | 23 | * - flush_icache_range(start, end) flush a range of instructions |
@@ -31,6 +32,7 @@ | |||
31 | extern void (*flush_cache_all)(void); | 32 | extern void (*flush_cache_all)(void); |
32 | extern void (*__flush_cache_all)(void); | 33 | extern void (*__flush_cache_all)(void); |
33 | extern void (*flush_cache_mm)(struct mm_struct *mm); | 34 | extern void (*flush_cache_mm)(struct mm_struct *mm); |
35 | #define flush_cache_dup_mm(mm) do { (void) (mm); } while (0) | ||
34 | extern void (*flush_cache_range)(struct vm_area_struct *vma, | 36 | extern void (*flush_cache_range)(struct vm_area_struct *vma, |
35 | unsigned long start, unsigned long end); | 37 | unsigned long start, unsigned long end); |
36 | extern void (*flush_cache_page)(struct vm_area_struct *vma, unsigned long page, unsigned long pfn); | 38 | extern void (*flush_cache_page)(struct vm_area_struct *vma, unsigned long page, unsigned long pfn); |
diff --git a/include/asm-parisc/cacheflush.h b/include/asm-parisc/cacheflush.h index 2bc41f2e027..aedb0512cb0 100644 --- a/include/asm-parisc/cacheflush.h +++ b/include/asm-parisc/cacheflush.h | |||
@@ -15,6 +15,8 @@ | |||
15 | #define flush_cache_mm(mm) flush_cache_all_local() | 15 | #define flush_cache_mm(mm) flush_cache_all_local() |
16 | #endif | 16 | #endif |
17 | 17 | ||
18 | #define flush_cache_dup_mm(mm) flush_cache_mm(mm) | ||
19 | |||
18 | #define flush_kernel_dcache_range(start,size) \ | 20 | #define flush_kernel_dcache_range(start,size) \ |
19 | flush_kernel_dcache_range_asm((start), (start)+(size)); | 21 | flush_kernel_dcache_range_asm((start), (start)+(size)); |
20 | 22 | ||
diff --git a/include/asm-powerpc/cacheflush.h b/include/asm-powerpc/cacheflush.h index 8a740c88d93..08e93e78921 100644 --- a/include/asm-powerpc/cacheflush.h +++ b/include/asm-powerpc/cacheflush.h | |||
@@ -18,6 +18,7 @@ | |||
18 | */ | 18 | */ |
19 | #define flush_cache_all() do { } while (0) | 19 | #define flush_cache_all() do { } while (0) |
20 | #define flush_cache_mm(mm) do { } while (0) | 20 | #define flush_cache_mm(mm) do { } while (0) |
21 | #define flush_cache_dup_mm(mm) do { } while (0) | ||
21 | #define flush_cache_range(vma, start, end) do { } while (0) | 22 | #define flush_cache_range(vma, start, end) do { } while (0) |
22 | #define flush_cache_page(vma, vmaddr, pfn) do { } while (0) | 23 | #define flush_cache_page(vma, vmaddr, pfn) do { } while (0) |
23 | #define flush_icache_page(vma, page) do { } while (0) | 24 | #define flush_icache_page(vma, page) do { } while (0) |
diff --git a/include/asm-s390/cacheflush.h b/include/asm-s390/cacheflush.h index e399a8ba2ed..f7cade8083f 100644 --- a/include/asm-s390/cacheflush.h +++ b/include/asm-s390/cacheflush.h | |||
@@ -7,6 +7,7 @@ | |||
7 | /* Caches aren't brain-dead on the s390. */ | 7 | /* Caches aren't brain-dead on the s390. */ |
8 | #define flush_cache_all() do { } while (0) | 8 | #define flush_cache_all() do { } while (0) |
9 | #define flush_cache_mm(mm) do { } while (0) | 9 | #define flush_cache_mm(mm) do { } while (0) |
10 | #define flush_cache_dup_mm(mm) do { } while (0) | ||
10 | #define flush_cache_range(vma, start, end) do { } while (0) | 11 | #define flush_cache_range(vma, start, end) do { } while (0) |
11 | #define flush_cache_page(vma, vmaddr, pfn) do { } while (0) | 12 | #define flush_cache_page(vma, vmaddr, pfn) do { } while (0) |
12 | #define flush_dcache_page(page) do { } while (0) | 13 | #define flush_dcache_page(page) do { } while (0) |
diff --git a/include/asm-sh/cpu-sh2/cacheflush.h b/include/asm-sh/cpu-sh2/cacheflush.h index f556fa80ea9..2979efb26de 100644 --- a/include/asm-sh/cpu-sh2/cacheflush.h +++ b/include/asm-sh/cpu-sh2/cacheflush.h | |||
@@ -15,6 +15,7 @@ | |||
15 | * | 15 | * |
16 | * - flush_cache_all() flushes entire cache | 16 | * - flush_cache_all() flushes entire cache |
17 | * - flush_cache_mm(mm) flushes the specified mm context's cache lines | 17 | * - flush_cache_mm(mm) flushes the specified mm context's cache lines |
18 | * - flush_cache_dup mm(mm) handles cache flushing when forking | ||
18 | * - flush_cache_page(mm, vmaddr, pfn) flushes a single page | 19 | * - flush_cache_page(mm, vmaddr, pfn) flushes a single page |
19 | * - flush_cache_range(vma, start, end) flushes a range of pages | 20 | * - flush_cache_range(vma, start, end) flushes a range of pages |
20 | * | 21 | * |
@@ -27,6 +28,7 @@ | |||
27 | */ | 28 | */ |
28 | #define flush_cache_all() do { } while (0) | 29 | #define flush_cache_all() do { } while (0) |
29 | #define flush_cache_mm(mm) do { } while (0) | 30 | #define flush_cache_mm(mm) do { } while (0) |
31 | #define flush_cache_dup_mm(mm) do { } while (0) | ||
30 | #define flush_cache_range(vma, start, end) do { } while (0) | 32 | #define flush_cache_range(vma, start, end) do { } while (0) |
31 | #define flush_cache_page(vma, vmaddr, pfn) do { } while (0) | 33 | #define flush_cache_page(vma, vmaddr, pfn) do { } while (0) |
32 | #define flush_dcache_page(page) do { } while (0) | 34 | #define flush_dcache_page(page) do { } while (0) |
diff --git a/include/asm-sh/cpu-sh3/cacheflush.h b/include/asm-sh/cpu-sh3/cacheflush.h index 03fde97a7fd..f70d8ef76a1 100644 --- a/include/asm-sh/cpu-sh3/cacheflush.h +++ b/include/asm-sh/cpu-sh3/cacheflush.h | |||
@@ -15,6 +15,7 @@ | |||
15 | * | 15 | * |
16 | * - flush_cache_all() flushes entire cache | 16 | * - flush_cache_all() flushes entire cache |
17 | * - flush_cache_mm(mm) flushes the specified mm context's cache lines | 17 | * - flush_cache_mm(mm) flushes the specified mm context's cache lines |
18 | * - flush_cache_dup mm(mm) handles cache flushing when forking | ||
18 | * - flush_cache_page(mm, vmaddr, pfn) flushes a single page | 19 | * - flush_cache_page(mm, vmaddr, pfn) flushes a single page |
19 | * - flush_cache_range(vma, start, end) flushes a range of pages | 20 | * - flush_cache_range(vma, start, end) flushes a range of pages |
20 | * | 21 | * |
@@ -39,6 +40,7 @@ | |||
39 | 40 | ||
40 | void flush_cache_all(void); | 41 | void flush_cache_all(void); |
41 | void flush_cache_mm(struct mm_struct *mm); | 42 | void flush_cache_mm(struct mm_struct *mm); |
43 | #define flush_cache_dup_mm(mm) flush_cache_mm(mm) | ||
42 | void flush_cache_range(struct vm_area_struct *vma, unsigned long start, | 44 | void flush_cache_range(struct vm_area_struct *vma, unsigned long start, |
43 | unsigned long end); | 45 | unsigned long end); |
44 | void flush_cache_page(struct vm_area_struct *vma, unsigned long addr, unsigned long pfn); | 46 | void flush_cache_page(struct vm_area_struct *vma, unsigned long addr, unsigned long pfn); |
@@ -48,6 +50,7 @@ void flush_icache_page(struct vm_area_struct *vma, struct page *page); | |||
48 | #else | 50 | #else |
49 | #define flush_cache_all() do { } while (0) | 51 | #define flush_cache_all() do { } while (0) |
50 | #define flush_cache_mm(mm) do { } while (0) | 52 | #define flush_cache_mm(mm) do { } while (0) |
53 | #define flush_cache_dup_mm(mm) do { } while (0) | ||
51 | #define flush_cache_range(vma, start, end) do { } while (0) | 54 | #define flush_cache_range(vma, start, end) do { } while (0) |
52 | #define flush_cache_page(vma, vmaddr, pfn) do { } while (0) | 55 | #define flush_cache_page(vma, vmaddr, pfn) do { } while (0) |
53 | #define flush_dcache_page(page) do { } while (0) | 56 | #define flush_dcache_page(page) do { } while (0) |
diff --git a/include/asm-sh/cpu-sh4/cacheflush.h b/include/asm-sh/cpu-sh4/cacheflush.h index 515fd574267..b01a10f3122 100644 --- a/include/asm-sh/cpu-sh4/cacheflush.h +++ b/include/asm-sh/cpu-sh4/cacheflush.h | |||
@@ -18,6 +18,7 @@ | |||
18 | */ | 18 | */ |
19 | void flush_cache_all(void); | 19 | void flush_cache_all(void); |
20 | void flush_cache_mm(struct mm_struct *mm); | 20 | void flush_cache_mm(struct mm_struct *mm); |
21 | #define flush_cache_dup_mm(mm) flush_cache_mm(mm) | ||
21 | void flush_cache_range(struct vm_area_struct *vma, unsigned long start, | 22 | void flush_cache_range(struct vm_area_struct *vma, unsigned long start, |
22 | unsigned long end); | 23 | unsigned long end); |
23 | void flush_cache_page(struct vm_area_struct *vma, unsigned long addr, | 24 | void flush_cache_page(struct vm_area_struct *vma, unsigned long addr, |
diff --git a/include/asm-sh64/cacheflush.h b/include/asm-sh64/cacheflush.h index 55f71aa0aa6..1e53a47bdc9 100644 --- a/include/asm-sh64/cacheflush.h +++ b/include/asm-sh64/cacheflush.h | |||
@@ -21,6 +21,8 @@ extern void flush_icache_user_range(struct vm_area_struct *vma, | |||
21 | struct page *page, unsigned long addr, | 21 | struct page *page, unsigned long addr, |
22 | int len); | 22 | int len); |
23 | 23 | ||
24 | #define flush_cache_dup_mm(mm) flush_cache_mm(mm) | ||
25 | |||
24 | #define flush_dcache_mmap_lock(mapping) do { } while (0) | 26 | #define flush_dcache_mmap_lock(mapping) do { } while (0) |
25 | #define flush_dcache_mmap_unlock(mapping) do { } while (0) | 27 | #define flush_dcache_mmap_unlock(mapping) do { } while (0) |
26 | 28 | ||
diff --git a/include/asm-sparc/cacheflush.h b/include/asm-sparc/cacheflush.h index fc632f811cd..68ac1091027 100644 --- a/include/asm-sparc/cacheflush.h +++ b/include/asm-sparc/cacheflush.h | |||
@@ -48,6 +48,7 @@ BTFIXUPDEF_CALL(void, flush_cache_page, struct vm_area_struct *, unsigned long) | |||
48 | 48 | ||
49 | #define flush_cache_all() BTFIXUP_CALL(flush_cache_all)() | 49 | #define flush_cache_all() BTFIXUP_CALL(flush_cache_all)() |
50 | #define flush_cache_mm(mm) BTFIXUP_CALL(flush_cache_mm)(mm) | 50 | #define flush_cache_mm(mm) BTFIXUP_CALL(flush_cache_mm)(mm) |
51 | #define flush_cache_dup_mm(mm) BTFIXUP_CALL(flush_cache_mm)(mm) | ||
51 | #define flush_cache_range(vma,start,end) BTFIXUP_CALL(flush_cache_range)(vma,start,end) | 52 | #define flush_cache_range(vma,start,end) BTFIXUP_CALL(flush_cache_range)(vma,start,end) |
52 | #define flush_cache_page(vma,addr,pfn) BTFIXUP_CALL(flush_cache_page)(vma,addr) | 53 | #define flush_cache_page(vma,addr,pfn) BTFIXUP_CALL(flush_cache_page)(vma,addr) |
53 | #define flush_icache_range(start, end) do { } while (0) | 54 | #define flush_icache_range(start, end) do { } while (0) |
diff --git a/include/asm-sparc64/cacheflush.h b/include/asm-sparc64/cacheflush.h index 745d1ab6037..122e4058dd9 100644 --- a/include/asm-sparc64/cacheflush.h +++ b/include/asm-sparc64/cacheflush.h | |||
@@ -12,6 +12,7 @@ | |||
12 | /* These are the same regardless of whether this is an SMP kernel or not. */ | 12 | /* These are the same regardless of whether this is an SMP kernel or not. */ |
13 | #define flush_cache_mm(__mm) \ | 13 | #define flush_cache_mm(__mm) \ |
14 | do { if ((__mm) == current->mm) flushw_user(); } while(0) | 14 | do { if ((__mm) == current->mm) flushw_user(); } while(0) |
15 | #define flush_cache_dup_mm(mm) flush_cache_mm(mm) | ||
15 | #define flush_cache_range(vma, start, end) \ | 16 | #define flush_cache_range(vma, start, end) \ |
16 | flush_cache_mm((vma)->vm_mm) | 17 | flush_cache_mm((vma)->vm_mm) |
17 | #define flush_cache_page(vma, page, pfn) \ | 18 | #define flush_cache_page(vma, page, pfn) \ |
diff --git a/include/asm-v850/cacheflush.h b/include/asm-v850/cacheflush.h index e1a87f82f1a..9ece05a202e 100644 --- a/include/asm-v850/cacheflush.h +++ b/include/asm-v850/cacheflush.h | |||
@@ -24,6 +24,7 @@ | |||
24 | systems with MMUs, so we don't need them. */ | 24 | systems with MMUs, so we don't need them. */ |
25 | #define flush_cache_all() ((void)0) | 25 | #define flush_cache_all() ((void)0) |
26 | #define flush_cache_mm(mm) ((void)0) | 26 | #define flush_cache_mm(mm) ((void)0) |
27 | #define flush_cache_dup_mm(mm) ((void)0) | ||
27 | #define flush_cache_range(vma, start, end) ((void)0) | 28 | #define flush_cache_range(vma, start, end) ((void)0) |
28 | #define flush_cache_page(vma, vmaddr, pfn) ((void)0) | 29 | #define flush_cache_page(vma, vmaddr, pfn) ((void)0) |
29 | #define flush_dcache_page(page) ((void)0) | 30 | #define flush_dcache_page(page) ((void)0) |
diff --git a/include/asm-x86_64/cacheflush.h b/include/asm-x86_64/cacheflush.h index d32f7f58752..ab1cb5c7dc9 100644 --- a/include/asm-x86_64/cacheflush.h +++ b/include/asm-x86_64/cacheflush.h | |||
@@ -7,6 +7,7 @@ | |||
7 | /* Caches aren't brain-dead on the intel. */ | 7 | /* Caches aren't brain-dead on the intel. */ |
8 | #define flush_cache_all() do { } while (0) | 8 | #define flush_cache_all() do { } while (0) |
9 | #define flush_cache_mm(mm) do { } while (0) | 9 | #define flush_cache_mm(mm) do { } while (0) |
10 | #define flush_cache_dup_mm(mm) do { } while (0) | ||
10 | #define flush_cache_range(vma, start, end) do { } while (0) | 11 | #define flush_cache_range(vma, start, end) do { } while (0) |
11 | #define flush_cache_page(vma, vmaddr, pfn) do { } while (0) | 12 | #define flush_cache_page(vma, vmaddr, pfn) do { } while (0) |
12 | #define flush_dcache_page(page) do { } while (0) | 13 | #define flush_dcache_page(page) do { } while (0) |
diff --git a/include/asm-xtensa/cacheflush.h b/include/asm-xtensa/cacheflush.h index 337765b629d..22ef901b784 100644 --- a/include/asm-xtensa/cacheflush.h +++ b/include/asm-xtensa/cacheflush.h | |||
@@ -75,6 +75,7 @@ extern void __flush_invalidate_dcache_range(unsigned long, unsigned long); | |||
75 | 75 | ||
76 | #define flush_cache_all() __flush_invalidate_cache_all(); | 76 | #define flush_cache_all() __flush_invalidate_cache_all(); |
77 | #define flush_cache_mm(mm) __flush_invalidate_cache_all(); | 77 | #define flush_cache_mm(mm) __flush_invalidate_cache_all(); |
78 | #define flush_cache_dup_mm(mm) __flush_invalidate_cache_all(); | ||
78 | 79 | ||
79 | #define flush_cache_vmap(start,end) __flush_invalidate_cache_all(); | 80 | #define flush_cache_vmap(start,end) __flush_invalidate_cache_all(); |
80 | #define flush_cache_vunmap(start,end) __flush_invalidate_cache_all(); | 81 | #define flush_cache_vunmap(start,end) __flush_invalidate_cache_all(); |
@@ -88,6 +89,7 @@ extern void flush_cache_page(struct vm_area_struct*, unsigned long, unsigned lon | |||
88 | 89 | ||
89 | #define flush_cache_all() do { } while (0) | 90 | #define flush_cache_all() do { } while (0) |
90 | #define flush_cache_mm(mm) do { } while (0) | 91 | #define flush_cache_mm(mm) do { } while (0) |
92 | #define flush_cache_dup_mm(mm) do { } while (0) | ||
91 | 93 | ||
92 | #define flush_cache_vmap(start,end) do { } while (0) | 94 | #define flush_cache_vmap(start,end) do { } while (0) |
93 | #define flush_cache_vunmap(start,end) do { } while (0) | 95 | #define flush_cache_vunmap(start,end) do { } while (0) |