svn commit: r222070 - head/sys/powerpc/booke
Attilio Rao
attilio at FreeBSD.org
Wed May 18 16:50:14 UTC 2011
Author: attilio
Date: Wed May 18 16:50:13 2011
New Revision: 222070
URL: http://svn.freebsd.org/changeset/base/222070
Log:
Revert r222069,222068 as they were intended to be committed to the
largeSMP branch.
Reported by: pluknet
Modified:
head/sys/powerpc/booke/platform_bare.c
head/sys/powerpc/booke/pmap.c
Modified: head/sys/powerpc/booke/platform_bare.c
==============================================================================
--- head/sys/powerpc/booke/platform_bare.c Wed May 18 16:42:01 2011 (r222069)
+++ head/sys/powerpc/booke/platform_bare.c Wed May 18 16:50:13 2011 (r222070)
@@ -241,7 +241,7 @@ bare_smp_start_cpu(platform_t plat, stru
int timeout;
eebpcr = ccsr_read4(OCP85XX_EEBPCR);
- if ((eebpcr & (1 << (pc->pc_cpuid + 24))) != 0) {
+ if ((eebpcr & (pc->pc_cpumask << 24)) != 0) {
printf("%s: CPU=%d already out of hold-off state!\n",
__func__, pc->pc_cpuid);
return (ENXIO);
@@ -259,8 +259,7 @@ bare_smp_start_cpu(platform_t plat, stru
/*
* Release AP from hold-off state
*/
-
- eebpcr |= (1 << (pc->pc_cpuid + 24));
+ eebpcr |= (pc->pc_cpumask << 24);
ccsr_write4(OCP85XX_EEBPCR, eebpcr);
__asm __volatile("isync; msync");
Modified: head/sys/powerpc/booke/pmap.c
==============================================================================
--- head/sys/powerpc/booke/pmap.c Wed May 18 16:42:01 2011 (r222069)
+++ head/sys/powerpc/booke/pmap.c Wed May 18 16:50:13 2011 (r222070)
@@ -63,7 +63,6 @@ __FBSDID("$FreeBSD$");
#include <sys/msgbuf.h>
#include <sys/lock.h>
#include <sys/mutex.h>
-#include <sys/sched.h>
#include <sys/smp.h>
#include <sys/vmmeter.h>
@@ -1229,7 +1228,7 @@ mmu_booke_bootstrap(mmu_t mmu, vm_offset
PTE_VALID;
}
/* Mark kernel_pmap active on all CPUs */
- CPU_FILL(&kernel_pmap->pm_active);
+ kernel_pmap->pm_active = ~0;
/*******************************************************/
/* Final setup */
@@ -1484,7 +1483,7 @@ mmu_booke_pinit(mmu_t mmu, pmap_t pmap)
PMAP_LOCK_INIT(pmap);
for (i = 0; i < MAXCPU; i++)
pmap->pm_tid[i] = TID_NONE;
- CPU_ZERO(&kernel_pmap->pm_active);
+ pmap->pm_active = 0;
bzero(&pmap->pm_stats, sizeof(pmap->pm_stats));
bzero(&pmap->pm_pdir, sizeof(pte_t *) * PDIR_NENTRIES);
TAILQ_INIT(&pmap->pm_ptbl_list);
@@ -1839,7 +1838,7 @@ mmu_booke_activate(mmu_t mmu, struct thr
mtx_lock_spin(&sched_lock);
- CPU_OR_ATOMIC(&pmap->pm_active, PCPU_PTR(cpumask));
+ atomic_set_int(&pmap->pm_active, PCPU_GET(cpumask));
PCPU_SET(curpmap, pmap);
if (pmap->pm_tid[PCPU_GET(cpuid)] == TID_NONE)
@@ -1868,9 +1867,7 @@ mmu_booke_deactivate(mmu_t mmu, struct t
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);
- sched_pin();
- CPU_NAND_ATOMIC(&pmap->pm_active, PCPU_PTR(cpumask));
- sched_unpin();
+ atomic_clear_int(&pmap->pm_active, PCPU_GET(cpumask));
PCPU_SET(curpmap, NULL);
}
More information about the svn-src-head
mailing list