Update of /cvsroot/linux-vax/kernel-2.4/include/asm-vax/mm
In directory usw-pr-cvs1:/tmp/cvs-serv28248/include/asm-vax/mm
Modified Files:
mmu_context.h
Log Message:
DA: set P0/P1 page stuff at switch_mm stage - 2.4 lazy tlb stuff
this is the proper place set_page_dir is gone
Index: mmu_context.h
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-vax/mm/mmu_context.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- mmu_context.h 2001/01/18 15:52:28 1.1
+++ mmu_context.h 2001/05/19 12:04:25 1.2
@@ -1,6 +1,8 @@
#ifndef _ASM_VAX_MMU_CONTEXT_H
#define _ASM_VAX_MMU_CONTEXT_H
+#include <asm/mm/tlb.h>
+
/* mmu_contexts are part of process control block */
#define init_new_context(tsk,mm) 0
@@ -15,7 +17,15 @@
static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next,
struct task_struct *tsk, unsigned cpu)
{
- clear_bit(cpu, &prev->cpu_vm_mask);
+ if (prev!=next) {
+ clear_bit(cpu, &prev->cpu_vm_mask);
+ __mtpr(next->pgd[0].br, PR_P0BR);
+ __mtpr((next->pgd[0].lr * 8 | 0x04000000), PR_P0LR);
+ __mtpr(next->pgd[1].br, PR_P1BR);
+ __mtpr((next->pgd[1].lr * 8), PR_P1LR);
+ flush_tlb_all();
+
+ }
set_bit(cpu, &next->cpu_vm_mask);
}
|