X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=include%2Fasm-sparc64%2Fmmu_context.h;h=9fc225ed5500d20c5372653389d8783ffc49ef4b;hb=cfd299dffe6f47c04c47b95893708cdc65876fbd;hp=2337eb48771908ca86f94a1a5d4cba3d42c0e43d;hpb=b7ad6d75028d021362221d9b2db19fcff995c3f8;p=linux-2.6 diff --git a/include/asm-sparc64/mmu_context.h b/include/asm-sparc64/mmu_context.h index 2337eb4877..9fc225ed55 100644 --- a/include/asm-sparc64/mmu_context.h +++ b/include/asm-sparc64/mmu_context.h @@ -9,6 +9,7 @@ #include #include #include +#include static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk) { @@ -75,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)