aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-parisc
diff options
context:
space:
mode:
authorRandolph Chung <tausq@debian.org>2006-12-11 19:07:51 -0500
committerKyle McMartin <kyle@athena.road.mcmartin.ca>2007-02-17 00:41:27 -0500
commit592ac93a607109e0643da6c23ae07ac749e973b1 (patch)
treecddb6ef701a2e76e8e38daf592745065f65aa4e4 /include/asm-parisc
parente7b3ca08549caccf5d6e1cf066780bf4f0ae77a7 (diff)
[PARISC] Optimize TLB flush on SMP systems
Signed-off-by: Randolph Chung <tausq@debian.org> Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
Diffstat (limited to 'include/asm-parisc')
-rw-r--r--include/asm-parisc/tlbflush.h24
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
42static inline void flush_tlb_mm(struct mm_struct *mm) 42static 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 49static 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
59extern __inline__ void flush_tlb_pgtables(struct mm_struct *mm, unsigned long start, unsigned long end) 57extern __inline__ void flush_tlb_pgtables(struct mm_struct *mm, unsigned long start, unsigned long end)