diff options
author | attilio <attilio@FreeBSD.org> | 2011-05-09 16:16:15 +0000 |
---|---|---|
committer | attilio <attilio@FreeBSD.org> | 2011-05-09 16:16:15 +0000 |
commit | 804b67ba6f3c9599eb747562e13e498f7111cbb4 (patch) | |
tree | 81196a94e9f93ef5c4919ea2c59e006d1b03351c /sys/powerpc/aim/mmu_oea.c | |
parent | 76bdb089757672665285495e9f8a29d1fccd1d7d (diff) | |
download | FreeBSD-src-804b67ba6f3c9599eb747562e13e498f7111cbb4.zip FreeBSD-src-804b67ba6f3c9599eb747562e13e498f7111cbb4.tar.gz |
Add the powerpc support.
Note that there is a dirty hack for calling openpic_write(), but
nwhitehorn approved it.
Discussed with: nwhitehorn
Diffstat (limited to 'sys/powerpc/aim/mmu_oea.c')
-rw-r--r-- | sys/powerpc/aim/mmu_oea.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/sys/powerpc/aim/mmu_oea.c b/sys/powerpc/aim/mmu_oea.c index 30435f5..4410141 100644 --- a/sys/powerpc/aim/mmu_oea.c +++ b/sys/powerpc/aim/mmu_oea.c @@ -118,11 +118,14 @@ __FBSDID("$FreeBSD$"); #include <sys/param.h> #include <sys/kernel.h> +#include <sys/queue.h> +#include <sys/cpuset.h> #include <sys/ktr.h> #include <sys/lock.h> #include <sys/msgbuf.h> #include <sys/mutex.h> #include <sys/proc.h> +#include <sys/sched.h> #include <sys/sysctl.h> #include <sys/systm.h> #include <sys/vmmeter.h> @@ -838,7 +841,7 @@ moea_bootstrap(mmu_t mmup, vm_offset_t kernelstart, vm_offset_t kernelend) PMAP_LOCK_INIT(kernel_pmap); for (i = 0; i < 16; i++) kernel_pmap->pm_sr[i] = EMPTY_SEGMENT + i; - kernel_pmap->pm_active = ~0; + CPU_FILL(&kernel_pmap->pm_active); /* * Set up the Open Firmware mappings @@ -960,7 +963,9 @@ moea_activate(mmu_t mmu, struct thread *td) pm = &td->td_proc->p_vmspace->vm_pmap; pmr = pm->pmap_phys; - pm->pm_active |= PCPU_GET(cpumask); + sched_pin(); + CPU_OR(&pm->pm_active, PCPU_PTR(cpumask)); + sched_unpin(); PCPU_SET(curpmap, pmr); } @@ -970,7 +975,9 @@ moea_deactivate(mmu_t mmu, struct thread *td) pmap_t pm; pm = &td->td_proc->p_vmspace->vm_pmap; - pm->pm_active &= ~PCPU_GET(cpumask); + sched_pin(); + CPU_NAND(&pm->pm_active, PCPU_PTR(cpumask)); + sched_unpin(); PCPU_SET(curpmap, NULL); } |