ref: 04a93463dd8553aadf876a091d0a8e35294f35ca
parent: 3273cf434468a0fd346ffa68350c1661963dfc72
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Thu May 29 14:24:40 EDT 2014
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.
--- a/sys/src/9/pc/mp.c
+++ b/sys/src/9/pc/mp.c
@@ -620,9 +620,10 @@
void
mpshutdown(void)
{- static Lock shutdownlock;
-
- if(active.rebooting || !canlock(&shutdownlock)){+ /*
+ * Park application processors.
+ */
+ if(active.rebooting || m->machno != 0){splhi();
arch->introff();
idle();
--
⑨