diff options
author | benno <benno@FreeBSD.org> | 2002-02-28 11:55:44 +0000 |
---|---|---|
committer | benno <benno@FreeBSD.org> | 2002-02-28 11:55:44 +0000 |
commit | 2f6cdd214040fc3b853032788fddac338d42f73c (patch) | |
tree | 0aa954800debefac81d0d0ad43987160f2bc6ee3 | |
parent | 5c807e00f8ff8b61f1e36093c70a0ae2d1dbb05b (diff) | |
download | FreeBSD-src-2f6cdd214040fc3b853032788fddac338d42f73c.zip FreeBSD-src-2f6cdd214040fc3b853032788fddac338d42f73c.tar.gz |
- Modify pmap_activate so it only marks the pmap as active.
- Add a pmap_deactivate function.
-rw-r--r-- | sys/powerpc/aim/mmu_oea.c | 12 | ||||
-rw-r--r-- | sys/powerpc/include/pmap.h | 1 | ||||
-rw-r--r-- | sys/powerpc/powerpc/mmu_oea.c | 12 | ||||
-rw-r--r-- | sys/powerpc/powerpc/pmap.c | 12 |
4 files changed, 37 insertions, 0 deletions
diff --git a/sys/powerpc/aim/mmu_oea.c b/sys/powerpc/aim/mmu_oea.c index 741faf4..20f9bae 100644 --- a/sys/powerpc/aim/mmu_oea.c +++ b/sys/powerpc/aim/mmu_oea.c @@ -750,7 +750,9 @@ pmap_activate(struct thread *td) /* * XXX: Address this again later? + * NetBSD only change the segment registers on return to userland. */ +#if 0 critical_enter(); for (i = 0; i < 16; i++) { @@ -759,6 +761,16 @@ pmap_activate(struct thread *td) __asm __volatile("sync; isync"); critical_exit(); +#endif +} + +void +pmap_deactivate(struct thread *td) +{ + pmap_t pm; + + pm = &td->td_proc->p_vmspace->vm_pmap; + pm->pm_active &= ~(PCPU_GET(cpumask)); } vm_offset_t diff --git a/sys/powerpc/include/pmap.h b/sys/powerpc/include/pmap.h index 080c5a3..841e55a 100644 --- a/sys/powerpc/include/pmap.h +++ b/sys/powerpc/include/pmap.h @@ -69,6 +69,7 @@ extern struct pmap kernel_pmap_store; #ifdef _KERNEL void pmap_bootstrap(vm_offset_t, vm_offset_t); +void pmap_deactivate(struct thread *); vm_offset_t pmap_kextract(vm_offset_t); int pmap_pte_spill(vm_offset_t); diff --git a/sys/powerpc/powerpc/mmu_oea.c b/sys/powerpc/powerpc/mmu_oea.c index 741faf4..20f9bae 100644 --- a/sys/powerpc/powerpc/mmu_oea.c +++ b/sys/powerpc/powerpc/mmu_oea.c @@ -750,7 +750,9 @@ pmap_activate(struct thread *td) /* * XXX: Address this again later? + * NetBSD only change the segment registers on return to userland. */ +#if 0 critical_enter(); for (i = 0; i < 16; i++) { @@ -759,6 +761,16 @@ pmap_activate(struct thread *td) __asm __volatile("sync; isync"); critical_exit(); +#endif +} + +void +pmap_deactivate(struct thread *td) +{ + pmap_t pm; + + pm = &td->td_proc->p_vmspace->vm_pmap; + pm->pm_active &= ~(PCPU_GET(cpumask)); } vm_offset_t diff --git a/sys/powerpc/powerpc/pmap.c b/sys/powerpc/powerpc/pmap.c index 741faf4..20f9bae 100644 --- a/sys/powerpc/powerpc/pmap.c +++ b/sys/powerpc/powerpc/pmap.c @@ -750,7 +750,9 @@ pmap_activate(struct thread *td) /* * XXX: Address this again later? + * NetBSD only change the segment registers on return to userland. */ +#if 0 critical_enter(); for (i = 0; i < 16; i++) { @@ -759,6 +761,16 @@ pmap_activate(struct thread *td) __asm __volatile("sync; isync"); critical_exit(); +#endif +} + +void +pmap_deactivate(struct thread *td) +{ + pmap_t pm; + + pm = &td->td_proc->p_vmspace->vm_pmap; + pm->pm_active &= ~(PCPU_GET(cpumask)); } vm_offset_t |