diff options
Diffstat (limited to 'include/asm-parisc/tlbflush.h')
-rw-r--r-- | include/asm-parisc/tlbflush.h | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/include/asm-parisc/tlbflush.h b/include/asm-parisc/tlbflush.h index e97aa8d1eff5..825994a90e2d 100644 --- a/include/asm-parisc/tlbflush.h +++ b/include/asm-parisc/tlbflush.h | |||
@@ -12,22 +12,17 @@ | |||
12 | * N class systems, only one PxTLB inter processor broadcast can be | 12 | * N class systems, only one PxTLB inter processor broadcast can be |
13 | * active at any one time on the Merced bus. This tlb purge | 13 | * active at any one time on the Merced bus. This tlb purge |
14 | * synchronisation is fairly lightweight and harmless so we activate | 14 | * synchronisation is fairly lightweight and harmless so we activate |
15 | * it on all SMP systems not just the N class. */ | 15 | * it on all SMP systems not just the N class. We also need to have |
16 | #ifdef CONFIG_SMP | 16 | * preemption disabled on uniprocessor machines, and spin_lock does that |
17 | * nicely. | ||
18 | */ | ||
17 | extern spinlock_t pa_tlb_lock; | 19 | extern spinlock_t pa_tlb_lock; |
18 | 20 | ||
19 | #define purge_tlb_start(x) spin_lock(&pa_tlb_lock) | 21 | #define purge_tlb_start(x) spin_lock(&pa_tlb_lock) |
20 | #define purge_tlb_end(x) spin_unlock(&pa_tlb_lock) | 22 | #define purge_tlb_end(x) spin_unlock(&pa_tlb_lock) |
21 | 23 | ||
22 | #else | ||
23 | |||
24 | #define purge_tlb_start(x) do { } while(0) | ||
25 | #define purge_tlb_end(x) do { } while (0) | ||
26 | |||
27 | #endif | ||
28 | |||
29 | |||
30 | extern void flush_tlb_all(void); | 24 | extern void flush_tlb_all(void); |
25 | extern void flush_tlb_all_local(void *); | ||
31 | 26 | ||
32 | /* | 27 | /* |
33 | * flush_tlb_mm() | 28 | * flush_tlb_mm() |
@@ -88,7 +83,6 @@ static inline void flush_tlb_range(struct vm_area_struct *vma, | |||
88 | if (npages >= 512) /* 2MB of space: arbitrary, should be tuned */ | 83 | if (npages >= 512) /* 2MB of space: arbitrary, should be tuned */ |
89 | flush_tlb_all(); | 84 | flush_tlb_all(); |
90 | else { | 85 | else { |
91 | preempt_disable(); | ||
92 | mtsp(vma->vm_mm->context,1); | 86 | mtsp(vma->vm_mm->context,1); |
93 | purge_tlb_start(); | 87 | purge_tlb_start(); |
94 | if (split_tlb) { | 88 | if (split_tlb) { |
@@ -102,7 +96,6 @@ static inline void flush_tlb_range(struct vm_area_struct *vma, | |||
102 | pdtlb(start); | 96 | pdtlb(start); |
103 | start += PAGE_SIZE; | 97 | start += PAGE_SIZE; |
104 | } | 98 | } |
105 | preempt_enable(); | ||
106 | } | 99 | } |
107 | purge_tlb_end(); | 100 | purge_tlb_end(); |
108 | } | 101 | } |