ref: ed4c8127658eec28f70947c738abb4b24244c909
parent: 21b70c782a6c62abf959564534d83147065981d6
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Wed Jan 13 18:18:25 EST 2016
pc/pc64: backing out new mp startup code (caused issues with ramnode) apparently, this causes some quadcore ramnode vm to hang on boot, even tho all cores successfully started up and are operational. i suspect some side effect from timersinit()... this would also mean *notsc= would break it (syncclock() would continue)... its unclear. i'm reverting this for now until the problem is better understood.
--- a/sys/src/9/pc/mp.c
+++ b/sys/src/9/pc/mp.c
@@ -196,8 +196,10 @@
ncpu = MAXMACH;
memmove((void*)APBOOTSTRAP, apbootstrap, sizeof(apbootstrap));
for(i=0; i<nelem(mpapic); i++){
- if((apic = mpapic[i]) == nil || apic->machno == 0 || apic->machno >= MAXMACH)
+ if((apic = mpapic[i]) == nil)
continue;
+ if(apic->machno >= MAXMACH)
+ continue;
if(ncpu <= 1)
break;
if((apic->flags & (PcmpBP|PcmpEN)) == PcmpEN){
@@ -204,17 +206,6 @@
mpstartap(apic);
conf.nmach++;
ncpu--;
-
- if(!apic->online){
- print("LAPIC%d: cpu%d did not startup\n", i, apic->machno);
- continue;
- }
-
- /* update tscticks for ap's syncclock() */
- while(!active.machs[apic->machno]){
- if(arch->fastclock == tscticks)
- cycles(&m->tscticks);
- }
}
}
--- a/sys/src/9/pc/squidboy.c
+++ b/sys/src/9/pc/squidboy.c
@@ -34,7 +34,7 @@
unlock(&active);
while(!active.thunderbirdsarego)
- idlehands();
+ microdelay(100);
schedinit();
}
--- a/sys/src/9/pc64/squidboy.c
+++ b/sys/src/9/pc64/squidboy.c
@@ -15,7 +15,6 @@
mmuinit();
cpuidentify();
cpuidprint();
-
apic->online = 1;
coherence();
@@ -29,7 +28,7 @@
unlock(&active);
while(!active.thunderbirdsarego)
- idlehands();
+ microdelay(100);
schedinit();
}