summaryrefslogtreecommitdiffstats
path: root/sys/ia64
diff options
context:
space:
mode:
authorattilio <attilio@FreeBSD.org>2011-07-04 12:04:52 +0000
committerattilio <attilio@FreeBSD.org>2011-07-04 12:04:52 +0000
commit364d0522f778b206262efce0932d6cea821879c6 (patch)
treef85bc4cd83b575a0c42f08d746e644f6dfc0e2ef /sys/ia64
parent95ca970257de274a90a1a867048c5ace5acf532d (diff)
downloadFreeBSD-src-364d0522f778b206262efce0932d6cea821879c6.zip
FreeBSD-src-364d0522f778b206262efce0932d6cea821879c6.tar.gz
With retirement of cpumask_t and usage of cpuset_t for representing a
mask of CPUs, pc_other_cpus and pc_cpumask become highly inefficient. Remove them and replace their usage with custom pc_cpuid magic (as, atm, pc_cpumask can be easilly represented by (1 << pc_cpuid) and pc_other_cpus by (all_cpus & ~(1 << pc_cpuid))). This change is not targeted for MFC because of struct pcpu members removal and dependency by cpumask_t retirement. MD review by: marcel, marius, alc Tested by: pluknet MD testing by: marcel, marius, gonzo, andreast
Diffstat (limited to 'sys/ia64')
-rw-r--r--sys/ia64/ia64/mp_machdep.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/sys/ia64/ia64/mp_machdep.c b/sys/ia64/ia64/mp_machdep.c
index 59b14d0..0d8f241 100644
--- a/sys/ia64/ia64/mp_machdep.c
+++ b/sys/ia64/ia64/mp_machdep.c
@@ -150,18 +150,18 @@ ia64_ih_rndzvs(struct thread *td, u_int xiv, struct trapframe *tf)
static u_int
ia64_ih_stop(struct thread *td, u_int xiv, struct trapframe *tf)
{
- cpuset_t mybit;
+ u_int cpuid;
PCPU_INC(md.stats.pcs_nstops);
- mybit = PCPU_GET(cpumask);
+ cpuid = PCPU_GET(cpuid);
savectx(PCPU_PTR(md.pcb));
- CPU_OR_ATOMIC(&stopped_cpus, &mybit);
- while (!CPU_OVERLAP(&started_cpus, &mybit))
+ CPU_SET_ATOMIC(cpuid, &stopped_cpus);
+ while (!CPU_ISSET(cpuid, &started_cpus))
cpu_spinwait();
- CPU_NAND_ATOMIC(&started_cpus, &mybit);
- CPU_NAND_ATOMIC(&stopped_cpus, &mybit);
+ CPU_CLR_ATOMIC(cpuid, &started_cpus);
+ CPU_CLR_ATOMIC(cpuid, &stopped_cpus);
return (0);
}
@@ -371,8 +371,6 @@ cpu_mp_start()
STAILQ_FOREACH(pc, &cpuhead, pc_allcpu) {
pc->pc_md.current_pmap = kernel_pmap;
- pc->pc_other_cpus = all_cpus;
- CPU_NAND(&pc->pc_other_cpus, &pc->pc_cpumask);
/* The BSP is obviously running already. */
if (pc->pc_cpuid == 0) {
pc->pc_md.awake = 1;
@@ -478,7 +476,7 @@ ipi_selected(cpuset_t cpus, int ipi)
struct pcpu *pc;
STAILQ_FOREACH(pc, &cpuhead, pc_allcpu) {
- if (CPU_OVERLAP(&cpus, &pc->pc_cpumask))
+ if (CPU_ISSET(pc->pc_cpuid, &cpus))
ipi_send(pc, ipi);
}
}
OpenPOWER on IntegriCloud