diff options
author | peter <peter@FreeBSD.org> | 2001-08-25 02:20:02 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 2001-08-25 02:20:02 +0000 |
commit | 70aca15c211e6081406e6a0b661a41594a64187a (patch) | |
tree | 507801bec2b11b2c70916032367a1906891044d6 /sys/amd64 | |
parent | d244a653e5b56edafe3e4993347279dff7000cff (diff) | |
download | FreeBSD-src-70aca15c211e6081406e6a0b661a41594a64187a.zip FreeBSD-src-70aca15c211e6081406e6a0b661a41594a64187a.tar.gz |
Optionize UPAGES for the i386. As part of this I split some of the low
level implementation stuff out of machine/globaldata.h to avoid exposing
UPAGES to lots more places. The end result is that we can double
the kernel stack size with 'options UPAGES=4' etc.
This is mainly being done for the benefit of a MFC to RELENG_4 at some
point. -current doesn't really need this so much since each interrupt
runs on its own kstack.
Diffstat (limited to 'sys/amd64')
-rw-r--r-- | sys/amd64/amd64/genassym.c | 2 | ||||
-rw-r--r-- | sys/amd64/amd64/machdep.c | 4 | ||||
-rw-r--r-- | sys/amd64/amd64/mp_machdep.c | 2 | ||||
-rw-r--r-- | sys/amd64/amd64/mptable.c | 2 | ||||
-rw-r--r-- | sys/amd64/amd64/pmap.c | 1 | ||||
-rw-r--r-- | sys/amd64/amd64/sys_machdep.c | 2 | ||||
-rw-r--r-- | sys/amd64/amd64/vm_machdep.c | 1 | ||||
-rw-r--r-- | sys/amd64/conf/GENERIC | 4 | ||||
-rw-r--r-- | sys/amd64/include/mptable.h | 2 | ||||
-rw-r--r-- | sys/amd64/include/pcpu.h | 20 |
10 files changed, 19 insertions, 21 deletions
diff --git a/sys/amd64/amd64/genassym.c b/sys/amd64/amd64/genassym.c index ac664e8..0704db7 100644 --- a/sys/amd64/amd64/genassym.c +++ b/sys/amd64/amd64/genassym.c @@ -37,6 +37,8 @@ * $FreeBSD$ */ +#include "opt_upages.h" + #include <sys/param.h> #include <sys/systm.h> #include <sys/assym.h> diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c index c74e9cb..c1148e9 100644 --- a/sys/amd64/amd64/machdep.c +++ b/sys/amd64/amd64/machdep.c @@ -49,6 +49,7 @@ #include "opt_msgbuf.h" #include "opt_npx.h" #include "opt_perfmon.h" +#include "opt_upages.h" /* #include "opt_userconfig.h" */ #include <sys/param.h> @@ -106,6 +107,9 @@ #ifdef PERFMON #include <machine/perfmon.h> #endif +#ifdef SMP +#include <machine/privatespace.h> +#endif #include <i386/isa/icu.h> #include <i386/isa/intr_machdep.h> diff --git a/sys/amd64/amd64/mp_machdep.c b/sys/amd64/amd64/mp_machdep.c index eaf508c..d912e0c 100644 --- a/sys/amd64/amd64/mp_machdep.c +++ b/sys/amd64/amd64/mp_machdep.c @@ -26,6 +26,7 @@ */ #include "opt_cpu.h" +#include "opt_upages.h" #ifdef SMP #include <machine/smptests.h> @@ -70,6 +71,7 @@ #include <machine/tss.h> #include <machine/specialreg.h> #include <machine/globaldata.h> +#include <machine/privatespace.h> #if defined(APIC_IO) #include <machine/md_var.h> /* setidt() */ diff --git a/sys/amd64/amd64/mptable.c b/sys/amd64/amd64/mptable.c index eaf508c..d912e0c 100644 --- a/sys/amd64/amd64/mptable.c +++ b/sys/amd64/amd64/mptable.c @@ -26,6 +26,7 @@ */ #include "opt_cpu.h" +#include "opt_upages.h" #ifdef SMP #include <machine/smptests.h> @@ -70,6 +71,7 @@ #include <machine/tss.h> #include <machine/specialreg.h> #include <machine/globaldata.h> +#include <machine/privatespace.h> #if defined(APIC_IO) #include <machine/md_var.h> /* setidt() */ diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index f6d0984..a872622 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -71,6 +71,7 @@ #include "opt_disable_pse.h" #include "opt_pmap.h" #include "opt_msgbuf.h" +#include "opt_upages.h" #include <sys/param.h> #include <sys/systm.h> diff --git a/sys/amd64/amd64/sys_machdep.c b/sys/amd64/amd64/sys_machdep.c index 8d47b5f..23c1cdd 100644 --- a/sys/amd64/amd64/sys_machdep.c +++ b/sys/amd64/amd64/sys_machdep.c @@ -35,6 +35,8 @@ * */ +#include "opt_upages.h" + #include <sys/param.h> #include <sys/systm.h> #include <sys/lock.h> diff --git a/sys/amd64/amd64/vm_machdep.c b/sys/amd64/amd64/vm_machdep.c index 05efb4d..573c41b 100644 --- a/sys/amd64/amd64/vm_machdep.c +++ b/sys/amd64/amd64/vm_machdep.c @@ -47,6 +47,7 @@ #endif #include "opt_reset.h" #include "opt_isa.h" +#include "opt_upages.h" #include <sys/param.h> #include <sys/systm.h> diff --git a/sys/amd64/conf/GENERIC b/sys/amd64/conf/GENERIC index 420dff6..4323127 100644 --- a/sys/amd64/conf/GENERIC +++ b/sys/amd64/conf/GENERIC @@ -25,7 +25,7 @@ ident GENERIC maxusers 32 #To statically compile in device wiring instead of /boot/device.hints -#hints "GENERIC.hints" #Default places to look for devices. +hints "GENERIC.hints" #Default places to look for devices. makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols @@ -58,6 +58,8 @@ options DDB options INVARIANTS options INVARIANT_SUPPORT options WITNESS +options UPAGES=4 +options CPU_ENABLE_SSE # To make an SMP kernel, the next two are needed #options SMP # Symmetric MultiProcessor Kernel diff --git a/sys/amd64/include/mptable.h b/sys/amd64/include/mptable.h index eaf508c..d912e0c 100644 --- a/sys/amd64/include/mptable.h +++ b/sys/amd64/include/mptable.h @@ -26,6 +26,7 @@ */ #include "opt_cpu.h" +#include "opt_upages.h" #ifdef SMP #include <machine/smptests.h> @@ -70,6 +71,7 @@ #include <machine/tss.h> #include <machine/specialreg.h> #include <machine/globaldata.h> +#include <machine/privatespace.h> #if defined(APIC_IO) #include <machine/md_var.h> /* setidt() */ diff --git a/sys/amd64/include/pcpu.h b/sys/amd64/include/pcpu.h index cda7b1e..37388aa 100644 --- a/sys/amd64/include/pcpu.h +++ b/sys/amd64/include/pcpu.h @@ -74,26 +74,6 @@ struct globaldata { #endif }; -#ifdef SMP -/* - * This is the upper (0xff800000) address space layout that is per-cpu. - * It is setup in locore.s and pmap.c for the BSP and in mp_machdep.c for - * each AP. genassym helps export this to the assembler code. - */ -struct privatespace { - /* page 0 - data page */ - struct globaldata globaldata; - char __filler0[PAGE_SIZE - sizeof(struct globaldata)]; - - /* page 1 - idle stack (UPAGES pages) */ - char idlestack[UPAGES * PAGE_SIZE]; - /* page 1+UPAGES... */ -}; - -extern struct privatespace SMP_prvspace[]; - -#endif - #endif /* _KERNEL */ #endif /* ! _MACHINE_GLOBALDATA_H_ */ |