aboutsummaryrefslogtreecommitdiff
path: root/sys/ia64/ia64/mp_machdep.c
diff options
context:
space:
mode:
authorAttilio Rao <attilio@FreeBSD.org>2011-05-05 14:39:14 +0000
committerAttilio Rao <attilio@FreeBSD.org>2011-05-05 14:39:14 +0000
commit71a19bdc640eb9d54e7db3d1d135753888f3469c (patch)
treee5d54bcefbf1fe0c4c6804bdc5c4852b1b64518a /sys/ia64/ia64/mp_machdep.c
parenta7a347967f3856b66bc2358cf86ee8ee957fc5bf (diff)
downloadsrc-71a19bdc640eb9d54e7db3d1d135753888f3469c.tar.gz
src-71a19bdc640eb9d54e7db3d1d135753888f3469c.zip
Commit the support for removing cpumask_t and replacing it directly with
cpuset_t objects. That is going to offer the underlying support for a simple bump of MAXCPU and then support for number of cpus > 32 (as it is today). Right now, cpumask_t is an int, 32 bits on all our supported architecture. cpumask_t on the other side is implemented as an array of longs, and easilly extendible by definition. The architectures touched by this commit are the following: - amd64 - i386 - pc98 - arm - ia64 - XEN while the others are still missing. Userland is believed to be fully converted with the changes contained here. Some technical notes: - This commit may be considered an ABI nop for all the architectures different from amd64 and ia64 (and sparc64 in the future) - per-cpu members, which are now converted to cpuset_t, needs to be accessed avoiding migration, because the size of cpuset_t should be considered unknown - size of cpuset_t objects is different from kernel and userland (this is primirally done in order to leave some more space in userland to cope with KBI extensions). If you need to access kernel cpuset_t from the userland please refer to example in this patch on how to do that correctly (kgdb may be a good source, for example). - Support for other architectures is going to be added soon - Only MAXCPU for amd64 is bumped now The patch has been tested by sbruno and Nicholas Esborn on opteron 4 x 12 pack CPUs. More testing on big SMP is expected to came soon. pluknet tested the patch with his 8-ways on both amd64 and i386. Tested by: pluknet, sbruno, gianni, Nicholas Esborn Reviewed by: jeff, jhb, sbruno
Notes
Notes: svn path=/projects/largeSMP/; revision=221499
Diffstat (limited to 'sys/ia64/ia64/mp_machdep.c')
-rw-r--r--sys/ia64/ia64/mp_machdep.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/ia64/ia64/mp_machdep.c b/sys/ia64/ia64/mp_machdep.c
index 5804f8cd69b7..015378514687 100644
--- a/sys/ia64/ia64/mp_machdep.c
+++ b/sys/ia64/ia64/mp_machdep.c
@@ -139,18 +139,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)
{
- cpumask_t mybit;
+ cpuset_t mybit;
PCPU_INC(md.stats.pcs_nstops);
mybit = PCPU_GET(cpumask);
savectx(PCPU_PTR(md.pcb));
- atomic_set_int(&stopped_cpus, mybit);
- while ((started_cpus & mybit) == 0)
+ CPU_OR_ATOMIC(&stopped_cpus, &mybit);
+ while (!CPU_OVERLAP(&started_cpus, &mybit))
cpu_spinwait();
- atomic_clear_int(&started_cpus, mybit);
- atomic_clear_int(&stopped_cpus, mybit);
+ CPU_NAND_ATOMIC(&started_cpus, &mybit);
+ CPU_NAND_ATOMIC(&stopped_cpus, &mybit);
return (0);
}
@@ -458,12 +458,12 @@ cpu_mp_unleash(void *dummy)
* send an IPI to a set of cpus.
*/
void
-ipi_selected(cpumask_t cpus, int ipi)
+ipi_selected(cpuset_t cpus, int ipi)
{
struct pcpu *pc;
SLIST_FOREACH(pc, &cpuhead, pc_allcpu) {
- if (cpus & pc->pc_cpumask)
+ if (CPU_OVERLAP(&cpus, &pc->pc_cpumask))
ipi_send(pc, ipi);
}
}