diff options
-rw-r--r-- | sys/sun4v/sun4v/mp_machdep.c | 10 | ||||
-rw-r--r-- | sys/sun4v/sun4v/tick.c | 4 | ||||
-rw-r--r-- | sys/sun4v/sun4v/trap.c | 8 |
3 files changed, 11 insertions, 11 deletions
diff --git a/sys/sun4v/sun4v/mp_machdep.c b/sys/sun4v/sun4v/mp_machdep.c index 01756d6..d3cea9d 100644 --- a/sys/sun4v/sun4v/mp_machdep.c +++ b/sys/sun4v/sun4v/mp_machdep.c @@ -395,8 +395,8 @@ cpu_mp_bootstrap(struct pcpu *pc) smp_cpus++; KASSERT(curthread != NULL, ("cpu_mp_bootstrap: curthread")); - PCPU_SET(other_cpus, all_cpus & ~(1 << PCPU_GET(cpuid))); - printf("AP: #%d\n", PCPU_GET(cpuid)); + PCPU_SET(other_cpus, all_cpus & ~(1 << curcpu)); + printf("AP: #%d\n", curcpu); csa->csa_count--; membar(StoreLoad); csa->csa_state = CPU_BOOTSTRAP; @@ -442,8 +442,8 @@ void cpu_ipi_stop(struct trapframe *tf) { - CTR1(KTR_SMP, "cpu_ipi_stop: stopped %d", PCPU_GET(cpuid)); - savectx(&stoppcbs[PCPU_GET(cpuid)]); + CTR1(KTR_SMP, "cpu_ipi_stop: stopped %d", curcpu); + savectx(&stoppcbs[curcpu]); atomic_set_acq_int(&stopped_cpus, PCPU_GET(cpumask)); while ((started_cpus & PCPU_GET(cpumask)) == 0) { if ((shutdown_cpus & PCPU_GET(cpumask)) != 0) { @@ -452,7 +452,7 @@ cpu_ipi_stop(struct trapframe *tf) } atomic_clear_rel_int(&started_cpus, PCPU_GET(cpumask)); atomic_clear_rel_int(&stopped_cpus, PCPU_GET(cpumask)); - CTR1(KTR_SMP, "cpu_ipi_stop: restarted %d", PCPU_GET(cpuid)); + CTR1(KTR_SMP, "cpu_ipi_stop: restarted %d", curcpu); } void diff --git a/sys/sun4v/sun4v/tick.c b/sys/sun4v/sun4v/tick.c index 0f0e1aa..4d91899 100644 --- a/sys/sun4v/sun4v/tick.c +++ b/sys/sun4v/sun4v/tick.c @@ -88,7 +88,7 @@ static __inline void tick_process(struct trapframe *tf) { - if (PCPU_GET(cpuid) == 0) + if (curcpu == 0) hardclock(TRAPF_USERMODE(tf), TRAPF_PC(tf)); else hardclock_cpu(TRAPF_USERMODE(tf)); @@ -177,7 +177,7 @@ tick_start(void) { u_long base, s; - if (PCPU_GET(cpuid) == 0) + if (curcpu == 0) intr_setup(PIL_TICK, tick_hardclock, -1, NULL, NULL); /* diff --git a/sys/sun4v/sun4v/trap.c b/sys/sun4v/sun4v/trap.c index c8a5f38..2698813 100644 --- a/sys/sun4v/sun4v/trap.c +++ b/sys/sun4v/sun4v/trap.c @@ -245,7 +245,7 @@ trap_init(void) vm_paddr_t mmfsa; int i; - mmfsa = mmu_fault_status_area + (MMFSA_SIZE*PCPU_GET(cpuid)); + mmfsa = mmu_fault_status_area + (MMFSA_SIZE*curcpu); set_wstate(WSTATE_KERN); set_mmfsa_scratchpad(mmfsa); @@ -276,7 +276,7 @@ trap(struct trapframe *tf, int64_t type, uint64_t data) register_t addr; ksiginfo_t ksi; - td = PCPU_GET(curthread); + td = curthread; CTR4(KTR_TRAP, "trap: %p type=%s (%s) pil=%#lx", td, trap_msg[trapno], @@ -474,7 +474,7 @@ trap_pfault(struct thread *td, struct trapframe *tf, int64_t type, uint64_t data #if 0 CTR4(KTR_TRAP, "trap_pfault: td=%p pm_ctx=%#lx va=%#lx ctx=%#lx", - td, p->p_vmspace->vm_pmap.pm_context[PCPU_GET(cpuid)], va, ctx); + td, p->p_vmspace->vm_pmap.pm_context, va, ctx); #endif KASSERT(td->td_pcb != NULL, ("trap_pfault: pcb NULL")); KASSERT(td->td_proc != NULL, ("trap_pfault: curproc NULL")); @@ -583,7 +583,7 @@ syscall(struct trapframe *tf) int narg; int error; - td = PCPU_GET(curthread); + td = curthread; KASSERT(td != NULL, ("trap: curthread NULL")); KASSERT(td->td_proc != NULL, ("trap: curproc NULL")); |