shithub: riscv

Download patch

ref: 586ab94b05a41f3be994deb93d22208b7e3368fa
parent: 77a3391cf36cd24a3c01b0e45f512603b4d78e81
parent: 483f1ba6028d9b99d868d722715828bd6e739644
author: aiju <aiju@phicode.de>
date: Fri Mar 14 20:57:46 EDT 2014

merge

--- a/sys/src/9/bcm/main.c
+++ b/sys/src/9/bcm/main.c
@@ -430,17 +430,18 @@
 	uintptr pa;
 	char *p;
 
-	if(p = getconf("*kernelpercent"))
-		userpcnt = 100 - strtol(p, 0, 0);
-	else
-		userpcnt = 0;
-
-	if(0 && (p = getconf("service")) != nil){
+	if(p = getconf("service")){
 		if(strcmp(p, "cpu") == 0)
 			cpuserver = 1;
 		else if(strcmp(p,"terminal") == 0)
 			cpuserver = 0;
 	}
+
+	if(p = getconf("*kernelpercent"))
+		userpcnt = 100 - strtol(p, 0, 0);
+	else
+		userpcnt = 0;
+
 	if((p = getconf("*maxmem")) != nil){
 		memsize = strtoul(p, 0, 0) - PHYSDRAM;
 		if (memsize < 16*MB)		/* sanity */
--- a/sys/src/9/pc/main.c
+++ b/sys/src/9/pc/main.c
@@ -416,6 +416,13 @@
 	int i, userpcnt;
 	ulong kpages;
 
+	if(p = getconf("service")){
+		if(strcmp(p, "cpu") == 0)
+			cpuserver = 1;
+		else if(strcmp(p,"terminal") == 0)
+			cpuserver = 0;
+	}
+
 	if(p = getconf("*kernelpercent"))
 		userpcnt = 100 - strtol(p, 0, 0);
 	else
--- a/sys/src/9/pc64/main.c
+++ b/sys/src/9/pc64/main.c
@@ -140,6 +140,13 @@
 	int i, userpcnt;
 	ulong kpages;
 
+	if(p = getconf("service")){
+		if(strcmp(p, "cpu") == 0)
+			cpuserver = 1;
+		else if(strcmp(p,"terminal") == 0)
+			cpuserver = 0;
+	}
+
 	if(p = getconf("*kernelpercent"))
 		userpcnt = 100 - strtol(p, 0, 0);
 	else
--- a/sys/src/9/ppc/main.c
+++ b/sys/src/9/ppc/main.c
@@ -334,6 +334,13 @@
 	ulong pa, kpages;
 	/* passed in from ROM monitor: */
 
+	if(p = getconf("service")){
+		if(strcmp(p, "cpu") == 0)
+			cpuserver = 1;
+		else if(strcmp(p,"terminal") == 0)
+			cpuserver = 0;
+	}
+
 	if(p = getconf("*kernelpercent"))
 		userpcnt = 100 - strtol(p, 0, 0);
 	else
--- a/sys/src/9/teg2/main.c
+++ b/sys/src/9/teg2/main.c
@@ -833,6 +833,13 @@
 	uintptr pa;
 	char *p;
 
+	if(p = getconf("service")){
+		if(strcmp(p, "cpu") == 0)
+			cpuserver = 1;
+		else if(strcmp(p,"terminal") == 0)
+			cpuserver = 0;
+	}
+
 	/*
 	 * Copy the physical memory configuration to Conf.mem.
 	 */
@@ -912,8 +919,6 @@
 		 * be careful with 32-bit overflow.
 		 */
 		imagmem->maxsize = kpages;
-
-//	archconfinit();
 }
 
 int