]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/cris/arch-v32/mm/tlb.c
Pull platform-drivers into test branch
[linux-2.6-omap-h63xx.git] / arch / cris / arch-v32 / mm / tlb.c
index 8233406798d3d99a87e741a0889b269ccda8f7cd..9d75d7692303fca512713743952403f07cab07fe 100644 (file)
@@ -175,6 +175,8 @@ init_new_context(struct task_struct *tsk, struct mm_struct *mm)
        return 0;
 }
 
+static DEFINE_SPINLOCK(mmu_context_lock);
+
 /* Called in schedule() just before actually doing the switch_to. */
 void
 switch_mm(struct mm_struct *prev, struct mm_struct *next,
@@ -183,10 +185,10 @@ switch_mm(struct mm_struct *prev, struct mm_struct *next,
        int cpu = smp_processor_id();
 
        /* Make sure there is a MMU context. */
-       spin_lock(&next->page_table_lock);
+       spin_lock(&mmu_context_lock);
        get_mmu_context(next);
        cpu_set(cpu, next->cpu_vm_mask);
-       spin_unlock(&next->page_table_lock);
+       spin_unlock(&mmu_context_lock);
 
        /*
         * Remember the pgd for the fault handlers. Keep a seperate copy of it
@@ -196,9 +198,9 @@ switch_mm(struct mm_struct *prev, struct mm_struct *next,
        per_cpu(current_pgd, cpu) = next->pgd;
 
        /* Switch context in the MMU. */
-        if (tsk && tsk->thread_info)
+        if (tsk && task_thread_info(tsk))
         {
-          SPEC_REG_WR(SPEC_REG_PID, next->context.page_id | tsk->thread_info->tls);
+          SPEC_REG_WR(SPEC_REG_PID, next->context.page_id | task_thread_info(tsk)->tls);
         }
         else
         {