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.
This commit is contained in:
Peter Wemm 2004-11-05 18:29:10 +00:00
parent 9ad69266e1
commit 20e25d7de5
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=137263

View File

@ -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;