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:
parent
9ad69266e1
commit
20e25d7de5
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user