aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-sparc64/mmu_context.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-sparc64/mmu_context.h')
-rw-r--r--include/asm-sparc64/mmu_context.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/asm-sparc64/mmu_context.h b/include/asm-sparc64/mmu_context.h
index 4be40c58e3c1..ca36ea96f64b 100644
--- a/include/asm-sparc64/mmu_context.h
+++ b/include/asm-sparc64/mmu_context.h
@@ -67,14 +67,14 @@ extern void __flush_tlb_mm(unsigned long, unsigned long);
67/* Switch the current MM context. Interrupts are disabled. */ 67/* Switch the current MM context. Interrupts are disabled. */
68static inline void switch_mm(struct mm_struct *old_mm, struct mm_struct *mm, struct task_struct *tsk) 68static inline void switch_mm(struct mm_struct *old_mm, struct mm_struct *mm, struct task_struct *tsk)
69{ 69{
70 unsigned long ctx_valid; 70 unsigned long ctx_valid, flags;
71 int cpu; 71 int cpu;
72 72
73 spin_lock(&mm->context.lock); 73 spin_lock_irqsave(&mm->context.lock, flags);
74 ctx_valid = CTX_VALID(mm->context); 74 ctx_valid = CTX_VALID(mm->context);
75 if (!ctx_valid) 75 if (!ctx_valid)
76 get_new_mmu_context(mm); 76 get_new_mmu_context(mm);
77 spin_unlock(&mm->context.lock); 77 spin_unlock_irqrestore(&mm->context.lock, flags);
78 78
79 if (!ctx_valid || (old_mm != mm)) { 79 if (!ctx_valid || (old_mm != mm)) {
80 load_secondary_context(mm); 80 load_secondary_context(mm);