diff options
Diffstat (limited to 'include/asm-parisc/tlbflush.h')
-rw-r--r-- | include/asm-parisc/tlbflush.h | 30 |
1 files changed, 4 insertions, 26 deletions
diff --git a/include/asm-parisc/tlbflush.h b/include/asm-parisc/tlbflush.h index f662e837dea1..3313da9ea00f 100644 --- a/include/asm-parisc/tlbflush.h +++ b/include/asm-parisc/tlbflush.h | |||
@@ -73,33 +73,11 @@ static inline void flush_tlb_page(struct vm_area_struct *vma, | |||
73 | purge_tlb_end(); | 73 | purge_tlb_end(); |
74 | } | 74 | } |
75 | 75 | ||
76 | static inline void flush_tlb_range(struct vm_area_struct *vma, | 76 | void __flush_tlb_range(unsigned long sid, |
77 | unsigned long start, unsigned long end) | 77 | unsigned long start, unsigned long end); |
78 | { | ||
79 | unsigned long npages; | ||
80 | 78 | ||
81 | npages = ((end - (start & PAGE_MASK)) + (PAGE_SIZE - 1)) >> PAGE_SHIFT; | 79 | #define flush_tlb_range(vma,start,end) __flush_tlb_range((vma)->vm_mm->context,start,end) |
82 | if (npages >= 512) /* 2MB of space: arbitrary, should be tuned */ | ||
83 | flush_tlb_all(); | ||
84 | else { | ||
85 | mtsp(vma->vm_mm->context,1); | ||
86 | purge_tlb_start(); | ||
87 | if (split_tlb) { | ||
88 | while (npages--) { | ||
89 | pdtlb(start); | ||
90 | pitlb(start); | ||
91 | start += PAGE_SIZE; | ||
92 | } | ||
93 | } else { | ||
94 | while (npages--) { | ||
95 | pdtlb(start); | ||
96 | start += PAGE_SIZE; | ||
97 | } | ||
98 | } | ||
99 | purge_tlb_end(); | ||
100 | } | ||
101 | } | ||
102 | 80 | ||
103 | #define flush_tlb_kernel_range(start, end) flush_tlb_all() | 81 | #define flush_tlb_kernel_range(start, end) __flush_tlb_range(0,start,end) |
104 | 82 | ||
105 | #endif | 83 | #endif |