]> err.no Git - linux-2.6/blobdiff - include/asm-sparc64/mmu_context.h
Merge branches 'at91', 'dyntick', 'ep93xx', 'iop', 'ixp', 'misc', 'orion', 'omap...
[linux-2.6] / include / asm-sparc64 / mmu_context.h
index 8d129032013e9b3e8fcf35a040f5438dab02959a..5693ab4826067056873803b6324b437e6275453f 100644 (file)
@@ -1,4 +1,3 @@
-/* $Id: mmu_context.h,v 1.54 2002/02/09 19:49:31 davem Exp $ */
 #ifndef __SPARC64_MMU_CONTEXT_H
 #define __SPARC64_MMU_CONTEXT_H
 
@@ -76,6 +75,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)