From e0204409df29fe1b7d18f81dfc3ae6f9d90e7a63 Mon Sep 17 00:00:00 2001 From: "David S. Miller" Date: Mon, 16 Jul 2007 03:49:40 -0700 Subject: [SPARC64]: dr-cpu unconfigure support. Signed-off-by: David S. Miller --- include/asm-sparc64/mmu_context.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include/asm-sparc64/mmu_context.h') diff --git a/include/asm-sparc64/mmu_context.h b/include/asm-sparc64/mmu_context.h index 8d129032013e..9fc225ed5500 100644 --- a/include/asm-sparc64/mmu_context.h +++ b/include/asm-sparc64/mmu_context.h @@ -76,6 +76,9 @@ static inline void switch_mm(struct mm_struct *old_mm, struct mm_struct *mm, str unsigned long ctx_valid, flags; int cpu; + if (unlikely(mm == &init_mm)) + return; + spin_lock_irqsave(&mm->context.lock, flags); ctx_valid = CTX_VALID(mm->context); if (!ctx_valid) -- cgit v1.2.1