diff options
author | Nathan Whitehorn <nwhitehorn@FreeBSD.org> | 2017-11-25 23:41:05 +0000 |
---|---|---|
committer | Nathan Whitehorn <nwhitehorn@FreeBSD.org> | 2017-11-25 23:41:05 +0000 |
commit | efe67753ccbbbba0013dac241c79d2dc124d76a2 (patch) | |
tree | 4be85fd57c569410684dbdb83ad09998aa8530c4 /sys/kern/kern_shutdown.c | |
parent | 91419bdafdfee515afb4e20e5c92035cc19074bb (diff) | |
download | src-efe67753ccbbbba0013dac241c79d2dc124d76a2.tar.gz src-efe67753ccbbbba0013dac241c79d2dc124d76a2.zip |
Remove some, but not all, assumptions that the BSP is CPU 0 and that CPUs
are numbered densely from there to n_cpus.
MFC after: 1 month
Notes
Notes:
svn path=/head/; revision=326218
Diffstat (limited to 'sys/kern/kern_shutdown.c')
-rw-r--r-- | sys/kern/kern_shutdown.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/kern/kern_shutdown.c b/sys/kern/kern_shutdown.c index 93d89ec84c08..ad080ad07f71 100644 --- a/sys/kern/kern_shutdown.c +++ b/sys/kern/kern_shutdown.c @@ -373,15 +373,16 @@ kern_reboot(int howto) #if defined(SMP) /* - * Bind us to CPU 0 so that all shutdown code runs there. Some + * Bind us to the first CPU so that all shutdown code runs there. Some * systems don't shutdown properly (i.e., ACPI power off) if we * run on another processor. */ if (!SCHEDULER_STOPPED()) { thread_lock(curthread); - sched_bind(curthread, 0); + sched_bind(curthread, CPU_FIRST()); thread_unlock(curthread); - KASSERT(PCPU_GET(cpuid) == 0, ("boot: not running on cpu 0")); + KASSERT(PCPU_GET(cpuid) == CPU_FIRST(), + ("boot: not running on cpu 0")); } #endif /* We're in the process of rebooting. */ |