diff options
author | peter <peter@FreeBSD.org> | 2004-11-05 18:29:10 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 2004-11-05 18:29:10 +0000 |
commit | 667f6bfd57f3cddc59927e5aa27142f08b1a6932 (patch) | |
tree | 97a30621d1c731979e24904d12c69cea600072e6 /sys/kern/kern_shutdown.c | |
parent | 56b95b228cd911dad423bb6f4fbebaf72b3c84e1 (diff) | |
download | FreeBSD-src-667f6bfd57f3cddc59927e5aa27142f08b1a6932.zip FreeBSD-src-667f6bfd57f3cddc59927e5aa27142f08b1a6932.tar.gz |
Bind to cpu0 for boot() processing. (Note this is reboot, not startup)
This means we'll always call the event hooks, device_shutdown etc on the
BSP and theoretically means we can de-cruftify the cpu_reset_proxy stuff.
Diffstat (limited to 'sys/kern/kern_shutdown.c')
-rw-r--r-- | sys/kern/kern_shutdown.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sys/kern/kern_shutdown.c b/sys/kern/kern_shutdown.c index 29608b1..1e83e07 100644 --- a/sys/kern/kern_shutdown.c +++ b/sys/kern/kern_shutdown.c @@ -59,6 +59,7 @@ __FBSDID("$FreeBSD$"); #include <sys/proc.h> #include <sys/reboot.h> #include <sys/resourcevar.h> +#include <sys/sched.h> #include <sys/smp.h> /* smp_active */ #include <sys/sysctl.h> #include <sys/sysproto.h> @@ -246,6 +247,13 @@ boot(int howto) { static int first_buf_printf = 1; +#ifdef SMP + /* Do all shutdown processing on cpu0 */ + mtx_lock_spin(&sched_lock); + sched_bind(curthread, 0); + mtx_unlock_spin(&sched_lock); +#endif + /* collect extra flags that shutdown_nice might have set */ howto |= shutdown_howto; |