patch-2.4.25 linux-2.4.25/include/asm-ppc64/mmu_context.h

Next file: linux-2.4.25/include/asm-ppc64/naca.h
Previous file: linux-2.4.25/include/asm-ppc64/mmu.h
Back to the patch index
Back to the overall index

diff -urN linux-2.4.24/include/asm-ppc64/mmu_context.h linux-2.4.25/include/asm-ppc64/mmu_context.h
@@ -6,7 +6,9 @@
 #include <linux/mm.h>	
 #include <asm/mmu.h>	
 #include <asm/ppcdebug.h>	
-
+#ifdef CONFIG_ALTIVEC
+#include <asm/cputable.h>
+#endif
 /*
  * Copyright (C) 2001 PPC 64 Team, IBM Corp
  *
@@ -130,6 +132,14 @@
 switch_mm(struct mm_struct *prev, struct mm_struct *next,
 	  struct task_struct *tsk, int cpu)
 {
+#ifdef CONFIG_ALTIVEC
+	 __asm__ __volatile__(
+		 BEGIN_FTR_SECTION
+		 "\tdssall\n"
+		  "\tsync\n"
+		 END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC)
+		 ::);
+#endif
 	flush_stab();
 }
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)