diff options
Diffstat (limited to 'arch/powerpc/include/asm/tlbflush.h')
-rw-r--r-- | arch/powerpc/include/asm/tlbflush.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/arch/powerpc/include/asm/tlbflush.h b/arch/powerpc/include/asm/tlbflush.h index 361cd5c7a32b..a2c6bfd85fb7 100644 --- a/arch/powerpc/include/asm/tlbflush.h +++ b/arch/powerpc/include/asm/tlbflush.h | |||
@@ -29,6 +29,9 @@ | |||
29 | #include <linux/mm.h> | 29 | #include <linux/mm.h> |
30 | 30 | ||
31 | extern void _tlbie(unsigned long address, unsigned int pid); | 31 | extern void _tlbie(unsigned long address, unsigned int pid); |
32 | extern void _tlbil_all(void); | ||
33 | extern void _tlbil_pid(unsigned int pid); | ||
34 | extern void _tlbil_va(unsigned long address, unsigned int pid); | ||
32 | 35 | ||
33 | #if defined(CONFIG_40x) || defined(CONFIG_8xx) | 36 | #if defined(CONFIG_40x) || defined(CONFIG_8xx) |
34 | #define _tlbia() asm volatile ("tlbia; sync" : : : "memory") | 37 | #define _tlbia() asm volatile ("tlbia; sync" : : : "memory") |
@@ -38,31 +41,31 @@ extern void _tlbia(void); | |||
38 | 41 | ||
39 | static inline void flush_tlb_mm(struct mm_struct *mm) | 42 | static inline void flush_tlb_mm(struct mm_struct *mm) |
40 | { | 43 | { |
41 | _tlbia(); | 44 | _tlbil_pid(mm->context.id); |
42 | } | 45 | } |
43 | 46 | ||
44 | static inline void flush_tlb_page(struct vm_area_struct *vma, | 47 | static inline void flush_tlb_page(struct vm_area_struct *vma, |
45 | unsigned long vmaddr) | 48 | unsigned long vmaddr) |
46 | { | 49 | { |
47 | _tlbie(vmaddr, vma ? vma->vm_mm->context.id : 0); | 50 | _tlbil_va(vmaddr, vma ? vma->vm_mm->context.id : 0); |
48 | } | 51 | } |
49 | 52 | ||
50 | static inline void flush_tlb_page_nohash(struct vm_area_struct *vma, | 53 | static inline void flush_tlb_page_nohash(struct vm_area_struct *vma, |
51 | unsigned long vmaddr) | 54 | unsigned long vmaddr) |
52 | { | 55 | { |
53 | _tlbie(vmaddr, vma ? vma->vm_mm->context.id : 0); | 56 | flush_tlb_page(vma, vmaddr); |
54 | } | 57 | } |
55 | 58 | ||
56 | static inline void flush_tlb_range(struct vm_area_struct *vma, | 59 | static inline void flush_tlb_range(struct vm_area_struct *vma, |
57 | unsigned long start, unsigned long end) | 60 | unsigned long start, unsigned long end) |
58 | { | 61 | { |
59 | _tlbia(); | 62 | _tlbil_pid(vma->vm_mm->context.id); |
60 | } | 63 | } |
61 | 64 | ||
62 | static inline void flush_tlb_kernel_range(unsigned long start, | 65 | static inline void flush_tlb_kernel_range(unsigned long start, |
63 | unsigned long end) | 66 | unsigned long end) |
64 | { | 67 | { |
65 | _tlbia(); | 68 | _tlbil_pid(0); |
66 | } | 69 | } |
67 | 70 | ||
68 | #elif defined(CONFIG_PPC32) | 71 | #elif defined(CONFIG_PPC32) |