vserver 1.9.5.x5
[linux-2.6.git] / include / asm-ppc64 / mmu_context.h
index bfce357..37f6ea0 100644 (file)
@@ -51,14 +51,6 @@ extern void switch_slb(struct task_struct *tsk, struct mm_struct *mm);
 static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next,
                             struct task_struct *tsk)
 {
-#ifdef CONFIG_ALTIVEC
-       asm volatile (
- BEGIN_FTR_SECTION
-       "dssall;\n"
- END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC)
-        : : );
-#endif /* CONFIG_ALTIVEC */
-
        if (!cpu_isset(smp_processor_id(), next->cpu_vm_mask))
                cpu_set(smp_processor_id(), next->cpu_vm_mask);
 
@@ -66,6 +58,11 @@ static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next,
        if (prev == next)
                return;
 
+#ifdef CONFIG_ALTIVEC
+       if (cur_cpu_spec->cpu_features & CPU_FTR_ALTIVEC)
+               asm volatile ("dssall");
+#endif /* CONFIG_ALTIVEC */
+
        if (cur_cpu_spec->cpu_features & CPU_FTR_SLB)
                switch_slb(tsk, next);
        else