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