shithub: riscv

Download patch

ref: 13c4b57c0cf7be531692ff5a170dbfffa9984072
parent: 0e2ff6fb1f613faf54235a3cd4765f17675988bc
author: cinap_lenrek <[email protected]>
date: Wed Dec 17 05:03:45 EST 2014

teg2, xen: remove unused bootdisk[] and fix conf.nswppo factor in kernel memory size calculation

--- a/sys/src/9/teg2/main.c
+++ b/sys/src/9/teg2/main.c
@@ -909,7 +909,7 @@
 		+ conf.nproc*sizeof(Proc)
 		+ conf.nimage*sizeof(Image)
 		+ conf.nswap
-		+ conf.nswppo*sizeof(Page);
+		+ conf.nswppo*sizeof(Page*);
 	mainmem->maxsize = kpages;
 	if(!cpuserver)
 		/*
--- a/sys/src/9/xen/main.c
+++ b/sys/src/9/xen/main.c
@@ -21,7 +21,6 @@
 	Ustkheadroom	= sizeof(Sargs) + sizeof(uintptr) + sizeof(Tos),
 };
 
-char bootdisk[KNAMELEN];
 Conf conf;
 char *confname[MAXCONF];
 char *confval[MAXCONF];
@@ -431,7 +430,7 @@
 		+ conf.nproc*sizeof(Proc)
 		+ conf.nimage*sizeof(Image)
 		+ conf.nswap
-		+ conf.nswppo*sizeof(Page);
+		+ conf.nswppo*sizeof(Page*);
 	mainmem->maxsize = kpages;
 	if(!cpuserver){
 		/*