diff options
Diffstat (limited to 'arch/xtensa/include/asm/tlbflush.h')
-rw-r--r-- | arch/xtensa/include/asm/tlbflush.h | 42 |
1 files changed, 31 insertions, 11 deletions
diff --git a/arch/xtensa/include/asm/tlbflush.h b/arch/xtensa/include/asm/tlbflush.h index 43dd348a5a47..fc34274ce41b 100644 --- a/arch/xtensa/include/asm/tlbflush.h +++ b/arch/xtensa/include/asm/tlbflush.h | |||
@@ -1,18 +1,14 @@ | |||
1 | /* | 1 | /* |
2 | * include/asm-xtensa/tlbflush.h | ||
3 | * | ||
4 | * This file is subject to the terms and conditions of the GNU General Public | 2 | * This file is subject to the terms and conditions of the GNU General Public |
5 | * License. See the file "COPYING" in the main directory of this archive | 3 | * License. See the file "COPYING" in the main directory of this archive |
6 | * for more details. | 4 | * for more details. |
7 | * | 5 | * |
8 | * Copyright (C) 2001 - 2005 Tensilica Inc. | 6 | * Copyright (C) 2001 - 2013 Tensilica Inc. |
9 | */ | 7 | */ |
10 | 8 | ||
11 | #ifndef _XTENSA_TLBFLUSH_H | 9 | #ifndef _XTENSA_TLBFLUSH_H |
12 | #define _XTENSA_TLBFLUSH_H | 10 | #define _XTENSA_TLBFLUSH_H |
13 | 11 | ||
14 | #ifdef __KERNEL__ | ||
15 | |||
16 | #include <linux/stringify.h> | 12 | #include <linux/stringify.h> |
17 | #include <asm/processor.h> | 13 | #include <asm/processor.h> |
18 | 14 | ||
@@ -34,12 +30,37 @@ | |||
34 | * - flush_tlb_range(mm, start, end) flushes a range of pages | 30 | * - flush_tlb_range(mm, start, end) flushes a range of pages |
35 | */ | 31 | */ |
36 | 32 | ||
37 | extern void flush_tlb_all(void); | 33 | void local_flush_tlb_all(void); |
38 | extern void flush_tlb_mm(struct mm_struct*); | 34 | void local_flush_tlb_mm(struct mm_struct *mm); |
39 | extern void flush_tlb_page(struct vm_area_struct*,unsigned long); | 35 | void local_flush_tlb_page(struct vm_area_struct *vma, |
40 | extern void flush_tlb_range(struct vm_area_struct*,unsigned long,unsigned long); | 36 | unsigned long page); |
37 | void local_flush_tlb_range(struct vm_area_struct *vma, | ||
38 | unsigned long start, unsigned long end); | ||
39 | |||
40 | #ifdef CONFIG_SMP | ||
41 | |||
42 | void flush_tlb_all(void); | ||
43 | void flush_tlb_mm(struct mm_struct *); | ||
44 | void flush_tlb_page(struct vm_area_struct *, unsigned long); | ||
45 | void flush_tlb_range(struct vm_area_struct *, unsigned long, | ||
46 | unsigned long); | ||
47 | |||
48 | static inline void flush_tlb_kernel_range(unsigned long start, | ||
49 | unsigned long end) | ||
50 | { | ||
51 | flush_tlb_all(); | ||
52 | } | ||
53 | |||
54 | #else /* !CONFIG_SMP */ | ||
55 | |||
56 | #define flush_tlb_all() local_flush_tlb_all() | ||
57 | #define flush_tlb_mm(mm) local_flush_tlb_mm(mm) | ||
58 | #define flush_tlb_page(vma, page) local_flush_tlb_page(vma, page) | ||
59 | #define flush_tlb_range(vma, vmaddr, end) local_flush_tlb_range(vma, vmaddr, \ | ||
60 | end) | ||
61 | #define flush_tlb_kernel_range(start, end) local_flush_tlb_all() | ||
41 | 62 | ||
42 | #define flush_tlb_kernel_range(start,end) flush_tlb_all() | 63 | #endif /* CONFIG_SMP */ |
43 | 64 | ||
44 | /* TLB operations. */ | 65 | /* TLB operations. */ |
45 | 66 | ||
@@ -187,5 +208,4 @@ static inline unsigned long read_itlb_translation (int way) | |||
187 | } | 208 | } |
188 | 209 | ||
189 | #endif /* __ASSEMBLY__ */ | 210 | #endif /* __ASSEMBLY__ */ |
190 | #endif /* __KERNEL__ */ | ||
191 | #endif /* _XTENSA_TLBFLUSH_H */ | 211 | #endif /* _XTENSA_TLBFLUSH_H */ |