diff options
-rw-r--r-- | include/asm-parisc/tlbflush.h | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/include/asm-parisc/tlbflush.h b/include/asm-parisc/tlbflush.h index f662e837dea1..67b3814a71dd 100644 --- a/include/asm-parisc/tlbflush.h +++ b/include/asm-parisc/tlbflush.h | |||
@@ -39,21 +39,19 @@ extern void flush_tlb_all_local(void *); | |||
39 | * etc. do not do that). | 39 | * etc. do not do that). |
40 | */ | 40 | */ |
41 | 41 | ||
42 | static inline void flush_tlb_mm(struct mm_struct *mm) | 42 | static inline void __flush_tlb_mm(void *mmv) |
43 | { | 43 | { |
44 | BUG_ON(mm == &init_mm); /* Should never happen */ | 44 | struct mm_struct *mm = (struct mm_struct *)mmv; |
45 | if (mm == current->active_mm) | ||
46 | load_context(mm->context); | ||
47 | } | ||
45 | 48 | ||
46 | #ifdef CONFIG_SMP | 49 | static inline void flush_tlb_mm(struct mm_struct *mm) |
47 | flush_tlb_all(); | 50 | { |
48 | #else | 51 | if (mm->context != 0) |
49 | if (mm) { | 52 | free_sid(mm->context); |
50 | if (mm->context != 0) | 53 | mm->context = alloc_sid(); |
51 | free_sid(mm->context); | 54 | on_each_cpu(__flush_tlb_mm, mm, 1, 1); |
52 | mm->context = alloc_sid(); | ||
53 | if (mm == current->active_mm) | ||
54 | load_context(mm->context); | ||
55 | } | ||
56 | #endif | ||
57 | } | 55 | } |
58 | 56 | ||
59 | extern __inline__ void flush_tlb_pgtables(struct mm_struct *mm, unsigned long start, unsigned long end) | 57 | extern __inline__ void flush_tlb_pgtables(struct mm_struct *mm, unsigned long start, unsigned long end) |