changelog shortlog tags branches files raw gz bz2 help

Mercurial > hg > plan9front / changeset: pc/pc64: backing out new mp startup code (caused issues with ramnode)

changeset 5060: 15d83d59eaf2
parent 5059: 10e2a609032c
child 5061: de5acea74ecf
author: cinap_lenrek@felloff.net
date: Wed, 13 Jan 2016 23:18:25 +0100
files: sys/src/9/pc/mp.c sys/src/9/pc/squidboy.c sys/src/9/pc64/squidboy.c
description: 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.
     1.1--- a/sys/src/9/pc/mp.c
     1.2+++ b/sys/src/9/pc/mp.c
     1.3@@ -196,7 +196,9 @@ mpinit(void)
     1.4 		ncpu = MAXMACH;
     1.5 	memmove((void*)APBOOTSTRAP, apbootstrap, sizeof(apbootstrap));
     1.6 	for(i=0; i<nelem(mpapic); i++){
     1.7-		if((apic = mpapic[i]) == nil || apic->machno == 0 || apic->machno >= MAXMACH)
     1.8+		if((apic = mpapic[i]) == nil)
     1.9+			continue;
    1.10+		if(apic->machno >= MAXMACH)
    1.11 			continue;
    1.12 		if(ncpu <= 1)
    1.13 			break;
    1.14@@ -204,17 +206,6 @@ mpinit(void)
    1.15 			mpstartap(apic);
    1.16 			conf.nmach++;
    1.17 			ncpu--;
    1.18-
    1.19-			if(!apic->online){
    1.20-				print("LAPIC%d: cpu%d did not startup\n", i, apic->machno);
    1.21-				continue;
    1.22-			}
    1.23-
    1.24-			/* update tscticks for ap's syncclock() */
    1.25-			while(!active.machs[apic->machno]){
    1.26-				if(arch->fastclock == tscticks)
    1.27-					cycles(&m->tscticks);
    1.28-			}
    1.29 		}
    1.30 	}
    1.31 
     2.1--- a/sys/src/9/pc/squidboy.c
     2.2+++ b/sys/src/9/pc/squidboy.c
     2.3@@ -34,7 +34,7 @@ squidboy(Apic* apic)
     2.4 	unlock(&active);
     2.5 
     2.6 	while(!active.thunderbirdsarego)
     2.7-		idlehands();
     2.8+		microdelay(100);
     2.9 
    2.10 	schedinit();
    2.11 }
     3.1--- a/sys/src/9/pc64/squidboy.c
     3.2+++ b/sys/src/9/pc64/squidboy.c
     3.3@@ -15,7 +15,6 @@ squidboy(Apic* apic)
     3.4 	mmuinit();
     3.5 	cpuidentify();
     3.6 	cpuidprint();
     3.7-
     3.8 	apic->online = 1;
     3.9 	coherence();
    3.10 
    3.11@@ -29,7 +28,7 @@ squidboy(Apic* apic)
    3.12 	unlock(&active);
    3.13 
    3.14 	while(!active.thunderbirdsarego)
    3.15-		idlehands();
    3.16+		microdelay(100);
    3.17 
    3.18 	schedinit();
    3.19 }