diff options
author | nwhitehorn <nwhitehorn@FreeBSD.org> | 2015-03-04 16:45:31 +0000 |
---|---|---|
committer | nwhitehorn <nwhitehorn@FreeBSD.org> | 2015-03-04 16:45:31 +0000 |
commit | 0d072699a7aac673a7f4c4dda00e84fc61d7de8c (patch) | |
tree | 9e93b30f557595d48110a8866a328a445afa4abd /sys/powerpc/booke | |
parent | a3c4ffd4f1fee6ece130de6c34a97485a6ab5da7 (diff) | |
download | FreeBSD-src-0d072699a7aac673a7f4c4dda00e84fc61d7de8c.zip FreeBSD-src-0d072699a7aac673a7f4c4dda00e84fc61d7de8c.tar.gz |
Move Book-E/AIM dependent bits for setting user PMAP during thread switch
out of cpu_switch() and into pmap_activate() where they belong. This also
removes all the #ifdef from cpu_switch().
Diffstat (limited to 'sys/powerpc/booke')
-rw-r--r-- | sys/powerpc/booke/pmap.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/powerpc/booke/pmap.c b/sys/powerpc/booke/pmap.c index 1a573cd..5ee5b0a 100644 --- a/sys/powerpc/booke/pmap.c +++ b/sys/powerpc/booke/pmap.c @@ -1946,6 +1946,8 @@ mmu_booke_activate(mmu_t mmu, struct thread *td) mtspr(SPR_PID0, pmap->pm_tid[cpuid]); __asm __volatile("isync"); + mtspr(SPR_DBCR0, td->td_pcb->pcb_cpu.booke.dbcr0); + sched_unpin(); CTR3(KTR_PMAP, "%s: e (tid = %d for '%s')", __func__, @@ -1965,6 +1967,8 @@ mmu_booke_deactivate(mmu_t mmu, struct thread *td) CTR5(KTR_PMAP, "%s: td=%p, proc = '%s', id = %d, pmap = 0x%08x", __func__, td, td->td_proc->p_comm, td->td_proc->p_pid, pmap); + td->td_pcb->pcb_cpu.booke.dbcr0 = mfspr(SPR_DBCR0); + CPU_CLR_ATOMIC(PCPU_GET(cpuid), &pmap->pm_active); PCPU_SET(curpmap, NULL); } |