X-Git-Url: http://git.cascardo.eti.br/?a=blobdiff_plain;f=include%2Fasm-sparc64%2Fmmu_context.h;h=9fc225ed5500d20c5372653389d8783ffc49ef4b;hb=4a19ec5800fc3bb64e2d87c4d9fdd9e636086fe0;hp=8d129032013e9b3e8fcf35a040f5438dab02959a;hpb=334d0dd8b660557608142f0f77abc6812b48f08b;p=cascardo%2Flinux.git 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)