Index: include/asm-mips/mmu_context.h =================================================================== RCS file: /home/cvs/linux/include/asm-mips/mmu_context.h,v retrieving revision 1.34 diff -u -r1.34 mmu_context.h --- include/asm-mips/mmu_context.h 14 Feb 2003 11:04:19 -0000 1.34 +++ include/asm-mips/mmu_context.h 1 Mar 2003 01:23:15 -0000 @@ -129,15 +129,20 @@ activate_mm(struct mm_struct *prev, struct mm_struct *next) { unsigned long flags; + int cpu = smp_processor_id(); local_irq_save(flags); /* Unconditionally get a new ASID. */ - get_new_mmu_context(next, smp_processor_id()); + get_new_mmu_context(next, cpu); - write_c0_entryhi(cpu_context(smp_processor_id(), next)); + write_c0_entryhi(cpu_context(cpu, next)); TLBMISS_HANDLER_SETUP_PGD(next->pgd); - + + /* mark mmu ownership change */ + clear_bit(cpu, &prev->cpu_vm_mask); + set_bit(cpu, &next->cpu_vm_mask); + local_irq_restore(flags); } Index: include/asm-mips64/mmu_context.h =================================================================== RCS file: /home/cvs/linux/include/asm-mips64/mmu_context.h,v retrieving revision 1.35 diff -u -r1.35 mmu_context.h --- include/asm-mips64/mmu_context.h 14 Feb 2003 11:04:22 -0000 1.35 +++ include/asm-mips64/mmu_context.h 1 Mar 2003 01:23:16 -0000 @@ -120,15 +120,20 @@ activate_mm(struct mm_struct *prev, struct mm_struct *next) { unsigned long flags; + int cpu = smp_processor_id(); local_irq_save(flags); /* Unconditionally get a new ASID. */ - get_new_mmu_context(next, smp_processor_id()); + get_new_mmu_context(next, cpu); - write_c0_entryhi(cpu_context(smp_processor_id(), next)); + write_c0_entryhi(cpu_context(cpu, next)); TLBMISS_HANDLER_SETUP_PGD(next->pgd); - + + /* mark mmu ownership change */ + clear_bit(cpu, &prev->cpu_vm_mask); + set_bit(cpu, &next->cpu_vm_mask); + local_irq_restore(flags); }