summaryrefslogtreecommitdiff
path: root/sys/src/9/pc/mp.c
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2014-05-29 18:24:40 +0200
committercinap_lenrek <cinap_lenrek@felloff.net>2014-05-29 18:24:40 +0200
commit215f6cc64a65efbe0a71b8fdba72311201aca4fc (patch)
tree2de43257f7385df6aec34c16bc2344fa80279878 /sys/src/9/pc/mp.c
parentaa125d37e9fcec887dddafc1e4725f0875ed38d9 (diff)
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.
Diffstat (limited to 'sys/src/9/pc/mp.c')
-rw-r--r--sys/src/9/pc/mp.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/src/9/pc/mp.c b/sys/src/9/pc/mp.c
index ead78ae17..a3afc885d 100644
--- a/sys/src/9/pc/mp.c
+++ b/sys/src/9/pc/mp.c
@@ -620,9 +620,10 @@ mpintrenable(Vctl* v)
void
mpshutdown(void)
{
- static Lock shutdownlock;
-
- if(active.rebooting || !canlock(&shutdownlock)){
+ /*
+ * Park application processors.
+ */
+ if(active.rebooting || m->machno != 0){
splhi();
arch->introff();
idle();