shithub: riscv

Download patch

ref: 8177d20fb2709ba9290dfd41308b8e5bee4e00f8
parent: a7f8ebca2f09f6bb5195354a8f00c23a68dbd935
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Sat Mar 11 11:30:51 EST 2017

kernel: get rid of active.Lock and active.thunderbirdsargo

--- a/sys/src/9/bcm/dat.h
+++ b/sys/src/9/bcm/dat.h
@@ -222,7 +222,6 @@
 
 struct
 {
-	Lock;
 	char	machs[MAXMACH];		/* active CPUs */
 	int	exiting;		/* shutdown */
 }active;
--- a/sys/src/9/kw/dat.h
+++ b/sys/src/9/kw/dat.h
@@ -193,7 +193,6 @@
 
 struct
 {
-	Lock;
 	char	machs[MAXMACH];		/* active CPUs */
 	int	exiting;		/* shutdown */
 }active;
--- a/sys/src/9/mtx/dat.h
+++ b/sys/src/9/mtx/dat.h
@@ -180,7 +180,6 @@
 
 struct
 {
-	Lock;
 	char	machs[MAXMACH];
 	int	exiting;
 }active;
--- a/sys/src/9/omap/dat.h
+++ b/sys/src/9/omap/dat.h
@@ -215,7 +215,6 @@
 
 struct
 {
-	Lock;
 	char	machs[MAXMACH];		/* active CPUs */
 	int	exiting;		/* shutdown */
 }active;
--- a/sys/src/9/pc/dat.h
+++ b/sys/src/9/pc/dat.h
@@ -269,10 +269,8 @@
 
 struct
 {
-	Lock;
 	char	machs[MAXMACH];		/* active CPUs */
 	int	exiting;		/* shutdown */
-	int	thunderbirdsarego;	/* lets the added processors continue to schedinit */
 }active;
 
 /*
--- a/sys/src/9/pc/main.c
+++ b/sys/src/9/pc/main.c
@@ -167,7 +167,6 @@
 	pageinit();
 	swapinit();
 	userinit();
-	active.thunderbirdsarego = 1;
 	schedinit();
 }
 
--- a/sys/src/9/pc64/dat.h
+++ b/sys/src/9/pc64/dat.h
@@ -232,10 +232,8 @@
 
 struct
 {
-	Lock;
 	char	machs[MAXMACH];		/* bitmap of active CPUs */
 	int	exiting;		/* shutdown */
-	int	thunderbirdsarego;	/* lets the added processors continue to schedinit */
 }active;
 
 /*
--- a/sys/src/9/pc64/main.c
+++ b/sys/src/9/pc64/main.c
@@ -518,7 +518,6 @@
 	pageinit();
 	swapinit();
 	userinit();
-	active.thunderbirdsarego = 1;
 	schedinit();
 }
 
--- a/sys/src/9/port/devcons.c
+++ b/sys/src/9/port/devcons.c
@@ -1008,11 +1008,9 @@
 {
 	int ms, once;
 
-	lock(&active);
 	once = active.machs[m->machno];
 	active.machs[m->machno] = 0;
 	active.exiting = 1;
-	unlock(&active);
 
 	if(once)
 		iprint("cpu%d: exiting\n", m->machno);
--- a/sys/src/9/ppc/dat.h
+++ b/sys/src/9/ppc/dat.h
@@ -188,7 +188,6 @@
 
 struct
 {
-	Lock;
 	char	machs[MAXMACH];
 	int	exiting;
 }active;
--- a/sys/src/9/sgi/dat.h
+++ b/sys/src/9/sgi/dat.h
@@ -203,7 +203,6 @@
 
 struct
 {
-	Lock;
 	char	machs[MAXMACH];		/* active cpus */
 	short	exiting;
 }active;
--- a/sys/src/9/teg2/dat.h
+++ b/sys/src/9/teg2/dat.h
@@ -250,7 +250,6 @@
 	int	wfi;			/* bitmap of CPUs in WFI state */
 	int	stopped;		/* bitmap of CPUs stopped */
 	int	exiting;		/* shutdown */
-	int	thunderbirdsarego;	/* lets the added processors continue to schedinit */
 }active;
 
 extern register Mach* m;			/* R10 */
--- a/sys/src/9/xen/main.c
+++ b/sys/src/9/xen/main.c
@@ -106,7 +106,6 @@
 
 	swapinit();
 	userinit();
-	active.thunderbirdsarego = 1;
 	schedinit();
 }
 
--- a/sys/src/9/zynq/dat.h
+++ b/sys/src/9/zynq/dat.h
@@ -174,7 +174,6 @@
 
 struct
 {
-	Lock;
 	char	machs[MAXMACH];		/* active CPUs */
 	int	exiting;		/* shutdown */
 }active;