pc: initiate machine reset only from boot processors in mpshutdown()

in vmware, mpshutdown() used to hang in i8042reset() when not
called from the boot processor, so instead of reseting from first
cpu that acquires the shutdown lock, we park all application
processors and let the boot processor do the reset.
This commit is contained in:
cinap_lenrek 2014-05-29 18:24:40 +02:00
parent aa125d37e9
commit 215f6cc64a

View file

@ -620,9 +620,10 @@ mpintrenable(Vctl* v)
void void
mpshutdown(void) mpshutdown(void)
{ {
static Lock shutdownlock; /*
* Park application processors.
if(active.rebooting || !canlock(&shutdownlock)){ */
if(active.rebooting || m->machno != 0){
splhi(); splhi();
arch->introff(); arch->introff();
idle(); idle();