diff options
author | Nathan Whitehorn <nwhitehorn@FreeBSD.org> | 2011-05-31 15:11:43 +0000 |
---|---|---|
committer | Nathan Whitehorn <nwhitehorn@FreeBSD.org> | 2011-05-31 15:11:43 +0000 |
commit | d098f93019ca215163773034de59731e92c2e52e (patch) | |
tree | 02ea093d9809e917fd683ac9ee2c87d27aa454e6 /sys/kern/subr_kdb.c | |
parent | c9385548e7a298c7e3185a32dddaaba375cb4caa (diff) | |
download | src-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/kern/subr_kdb.c')
-rw-r--r-- | sys/kern/subr_kdb.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/subr_kdb.c b/sys/kern/subr_kdb.c index 342c5ca1879d..5d68ae250d47 100644 --- a/sys/kern/subr_kdb.c +++ b/sys/kern/subr_kdb.c @@ -412,7 +412,7 @@ kdb_thr_ctx(struct thread *thr) return (&kdb_pcb); #if defined(SMP) && defined(KDB_STOPPEDPCB) - SLIST_FOREACH(pc, &cpuhead, pc_allcpu) { + STAILQ_FOREACH(pc, &cpuhead, pc_allcpu) { if (pc->pc_curthread == thr && (stopped_cpus & pc->pc_cpumask)) return (KDB_STOPPEDPCB(pc)); } |