summaryrefslogtreecommitdiffstats
path: root/sys/mips
diff options
context:
space:
mode:
authornwhitehorn <nwhitehorn@FreeBSD.org>2011-05-31 15:11:43 +0000
committernwhitehorn <nwhitehorn@FreeBSD.org>2011-05-31 15:11:43 +0000
commita69e106b2fac0817484b6b395a4bfcabef513310 (patch)
tree02ea093d9809e917fd683ac9ee2c87d27aa454e6 /sys/mips
parent3e43795a7a21a21ba53f04ea258e3e79a7a34e9d (diff)
downloadFreeBSD-src-a69e106b2fac0817484b6b395a4bfcabef513310.zip
FreeBSD-src-a69e106b2fac0817484b6b395a4bfcabef513310.tar.gz
On multi-core, multi-threaded PPC systems, it is important that the threads
be brought up in the order they are enumerated in the device tree (in particular, that thread 0 on each core be brought up first). The SLIST through which we loop to start the CPUs has all of its entries added with SLIST_INSERT_HEAD(), which means it is in reverse order of enumeration and so AP startup would always fail in such situations (causing a machine check or RTAS failure). Fix this by changing the SLIST into an STAILQ, and inserting new CPUs at the end. Reviewed by: jhb
Diffstat (limited to 'sys/mips')
-rw-r--r--sys/mips/mips/mp_machdep.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/mips/mips/mp_machdep.c b/sys/mips/mips/mp_machdep.c
index e945736..7191b37 100644
--- a/sys/mips/mips/mp_machdep.c
+++ b/sys/mips/mips/mp_machdep.c
@@ -86,7 +86,7 @@ ipi_selected(cpumask_t cpus, int ipi)
CTR3(KTR_SMP, "%s: cpus: %x, ipi: %x\n", __func__, cpus, ipi);
- SLIST_FOREACH(pc, &cpuhead, pc_allcpu) {
+ STAILQ_FOREACH(pc, &cpuhead, pc_allcpu) {
if ((cpus & pc->pc_cpumask) != 0)
ipi_send(pc, ipi);
}
OpenPOWER on IntegriCloud