summaryrefslogtreecommitdiffstats
path: root/sys/powerpc/aim/mmu_oea64.c
diff options
context:
space:
mode:
authorattilio <attilio@FreeBSD.org>2011-05-09 16:16:15 +0000
committerattilio <attilio@FreeBSD.org>2011-05-09 16:16:15 +0000
commit804b67ba6f3c9599eb747562e13e498f7111cbb4 (patch)
tree81196a94e9f93ef5c4919ea2c59e006d1b03351c /sys/powerpc/aim/mmu_oea64.c
parent76bdb089757672665285495e9f8a29d1fccd1d7d (diff)
downloadFreeBSD-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_oea64.c')
-rw-r--r--sys/powerpc/aim/mmu_oea64.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/sys/powerpc/aim/mmu_oea64.c b/sys/powerpc/aim/mmu_oea64.c
index d20de53..775a17c 100644
--- a/sys/powerpc/aim/mmu_oea64.c
+++ b/sys/powerpc/aim/mmu_oea64.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>
@@ -845,7 +848,7 @@ moea64_mid_bootstrap(mmu_t mmup, vm_offset_t kernelstart, vm_offset_t kernelend)
#endif
kernel_pmap->pmap_phys = kernel_pmap;
- kernel_pmap->pm_active = ~0;
+ CPU_FILL(&kernel_pmap->pm_active);
PMAP_LOCK_INIT(kernel_pmap);
@@ -1013,7 +1016,9 @@ moea64_activate(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_OR(&pm->pm_active, PCPU_PTR(cpumask));
+ sched_unpin();
#ifdef __powerpc64__
PCPU_SET(userslb, pm->pm_slb);
@@ -1028,7 +1033,9 @@ moea64_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();
#ifdef __powerpc64__
PCPU_SET(userslb, NULL);
#else
OpenPOWER on IntegriCloud