patch-2.4.0-test6 linux/include/asm-sh/mmu_context.h

Next file: linux/include/asm-sh/page.h
Previous file: linux/include/asm-sh/machvec_init.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.0-test5/linux/include/asm-sh/mmu_context.h linux/include/asm-sh/mmu_context.h
@@ -164,15 +164,15 @@
 				 struct mm_struct *next,
 				 struct task_struct *tsk, unsigned int cpu)
 {
-	set_bit(cpu, &next->cpu_vm_mask);
 	if (prev != next) {
 		unsigned long __pgdir = (unsigned long)next->pgd;
 
+		clear_bit(cpu, &prev->cpu_vm_mask);
+		set_bit(cpu, &next->cpu_vm_mask);
 		__asm__ __volatile__("mov.l	%0, %1"
 				     : /* no output */
 				     : "r" (__pgdir), "m" (__m(MMU_TTB)));
 		activate_context(next);
-		clear_bit(cpu, &prev->cpu_vm_mask);
 	}
 }
 

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