aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/pcpu.h
diff options
context:
space:
mode:
authorNathan Whitehorn <nwhitehorn@FreeBSD.org>2011-05-31 15:11:43 +0000
committerNathan Whitehorn <nwhitehorn@FreeBSD.org>2011-05-31 15:11:43 +0000
commitd098f93019ca215163773034de59731e92c2e52e (patch)
tree02ea093d9809e917fd683ac9ee2c87d27aa454e6 /sys/sys/pcpu.h
parentc9385548e7a298c7e3185a32dddaaba375cb4caa (diff)
downloadsrc-d098f93019ca215163773034de59731e92c2e52e.tar.gz
src-d098f93019ca215163773034de59731e92c2e52e.zip
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
Notes
Notes: svn path=/head/; revision=222531
Diffstat (limited to 'sys/sys/pcpu.h')
-rw-r--r--sys/sys/pcpu.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/sys/pcpu.h b/sys/sys/pcpu.h
index ad1cf33e05b2..0bb2cbd196f3 100644
--- a/sys/sys/pcpu.h
+++ b/sys/sys/pcpu.h
@@ -164,7 +164,7 @@ struct pcpu {
u_int pc_cpuid; /* This cpu number */
cpumask_t pc_cpumask; /* This cpu mask */
cpumask_t pc_other_cpus; /* Mask of all other cpus */
- SLIST_ENTRY(pcpu) pc_allcpu;
+ STAILQ_ENTRY(pcpu) pc_allcpu;
struct lock_list_entry *pc_spinlocks;
#ifdef KTR
char pc_name[PCPU_NAME_LEN]; /* String name for KTR */
@@ -201,7 +201,7 @@ struct pcpu {
#ifdef _KERNEL
-SLIST_HEAD(cpuhead, pcpu);
+STAILQ_HEAD(cpuhead, pcpu);
extern struct cpuhead cpuhead;
extern struct pcpu *cpuid_to_pcpu[MAXCPU];