diff --git a/sys/alpha/alpha/machdep.c b/sys/alpha/alpha/machdep.c index 931e24e11848..eecd53f97d7d 100644 --- a/sys/alpha/alpha/machdep.c +++ b/sys/alpha/alpha/machdep.c @@ -92,6 +92,7 @@ __FBSDID("$FreeBSD$"); #include "opt_compat.h" #include "opt_ddb.h" +#include "opt_kstack_pages.h" #include "opt_msgbuf.h" #include "opt_maxmem.h" diff --git a/sys/alpha/alpha/mp_machdep.c b/sys/alpha/alpha/mp_machdep.c index f37d0f143af9..78f9c8668eb7 100644 --- a/sys/alpha/alpha/mp_machdep.c +++ b/sys/alpha/alpha/mp_machdep.c @@ -27,6 +27,8 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_kstack_pages.h" + #include #include #include diff --git a/sys/alpha/alpha/vm_machdep.c b/sys/alpha/alpha/vm_machdep.c index cd0a1b7ae8db..dfac21713124 100644 --- a/sys/alpha/alpha/vm_machdep.c +++ b/sys/alpha/alpha/vm_machdep.c @@ -69,6 +69,8 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_kstack_pages.h" + #include #include #include diff --git a/sys/alpha/include/param.h b/sys/alpha/include/param.h index 60957140a890..324219bb627b 100644 --- a/sys/alpha/include/param.h +++ b/sys/alpha/include/param.h @@ -117,7 +117,9 @@ #define SSIZE 1 /* initial stack size/NBPG */ #define SINCR 1 /* increment of stack/NBPG */ +#ifndef KSTACK_PAGES #define KSTACK_PAGES 2 /* pages of kstack (with pcb) */ +#endif #define KSTACK_GUARD_PAGES 1 /* pages of kstack guard; 0 disables */ #define UAREA_PAGES 1 /* pages of u-area */ diff --git a/sys/ia64/ia64/mp_machdep.c b/sys/ia64/ia64/mp_machdep.c index f06e0cc1c3c3..1284e8ee2a15 100644 --- a/sys/ia64/ia64/mp_machdep.c +++ b/sys/ia64/ia64/mp_machdep.c @@ -26,6 +26,8 @@ * $FreeBSD$ */ +#include "opt_kstack_pages.h" + #include #include #include diff --git a/sys/ia64/ia64/vm_machdep.c b/sys/ia64/ia64/vm_machdep.c index 2aa78fdedd22..b8aa99accc25 100644 --- a/sys/ia64/ia64/vm_machdep.c +++ b/sys/ia64/ia64/vm_machdep.c @@ -67,6 +67,8 @@ * rights to redistribute these changes. */ +#include "opt_kstack_pages.h" + #include #include #include diff --git a/sys/ia64/include/param.h b/sys/ia64/include/param.h index 1b3bf0c6d33e..c0d18a4c9191 100644 --- a/sys/ia64/include/param.h +++ b/sys/ia64/include/param.h @@ -134,7 +134,9 @@ #define SSIZE 1 /* initial stack size/NBPG */ #define SINCR 1 /* increment of stack/NBPG */ +#ifndef KSTACK_PAGES #define KSTACK_PAGES 4 /* pages of kernel stack */ +#endif #define KSTACK_GUARD_PAGES 0 /* pages of kstack guard; 0 disables */ #define UAREA_PAGES 1 /* pages of u-area */ diff --git a/sys/powerpc/aim/machdep.c b/sys/powerpc/aim/machdep.c index ddc26705b644..ce2f85c55bd3 100644 --- a/sys/powerpc/aim/machdep.c +++ b/sys/powerpc/aim/machdep.c @@ -59,6 +59,7 @@ __FBSDID("$FreeBSD$"); #include "opt_ddb.h" #include "opt_compat.h" +#include "opt_kstack_pages.h" #include "opt_msgbuf.h" #include diff --git a/sys/powerpc/aim/mmu_oea.c b/sys/powerpc/aim/mmu_oea.c index 0ef6e0d4304a..4ca3a98dc2a8 100644 --- a/sys/powerpc/aim/mmu_oea.c +++ b/sys/powerpc/aim/mmu_oea.c @@ -114,6 +114,8 @@ __FBSDID("$FreeBSD$"); * correct. */ +#include "opt_kstack_pages.h" + #include #include #include diff --git a/sys/powerpc/aim/vm_machdep.c b/sys/powerpc/aim/vm_machdep.c index b9aa06b640c5..b067b321698f 100644 --- a/sys/powerpc/aim/vm_machdep.c +++ b/sys/powerpc/aim/vm_machdep.c @@ -67,6 +67,8 @@ * rights to redistribute these changes. */ +#include "opt_kstack_pages.h" + #include #include #include diff --git a/sys/powerpc/include/param.h b/sys/powerpc/include/param.h index cf4d4a49e77d..19494f9d64f9 100644 --- a/sys/powerpc/include/param.h +++ b/sys/powerpc/include/param.h @@ -97,10 +97,10 @@ #define KERNBASE 0x100000 /* start of kernel virtual */ #define BTOPKERNBASE ((u_long)KERNBASE >> PGSHIFT) -#ifndef KSTACK_UPAGES +#ifndef KSTACK_PAGES #define KSTACK_PAGES 4 /* includes pcb */ -#define KSTACK_GUARD_PAGES 1 /* pages of kstack guard; 0 disables */ #endif +#define KSTACK_GUARD_PAGES 1 /* pages of kstack guard; 0 disables */ #define USPACE (KSTACK_PAGES * PAGE_SIZE) /* total size of pcb */ #define UAREA_PAGES 1 /* holds struct user WITHOUT PCB */ diff --git a/sys/powerpc/powerpc/machdep.c b/sys/powerpc/powerpc/machdep.c index ddc26705b644..ce2f85c55bd3 100644 --- a/sys/powerpc/powerpc/machdep.c +++ b/sys/powerpc/powerpc/machdep.c @@ -59,6 +59,7 @@ __FBSDID("$FreeBSD$"); #include "opt_ddb.h" #include "opt_compat.h" +#include "opt_kstack_pages.h" #include "opt_msgbuf.h" #include diff --git a/sys/powerpc/powerpc/mmu_oea.c b/sys/powerpc/powerpc/mmu_oea.c index 0ef6e0d4304a..4ca3a98dc2a8 100644 --- a/sys/powerpc/powerpc/mmu_oea.c +++ b/sys/powerpc/powerpc/mmu_oea.c @@ -114,6 +114,8 @@ __FBSDID("$FreeBSD$"); * correct. */ +#include "opt_kstack_pages.h" + #include #include #include diff --git a/sys/powerpc/powerpc/pmap.c b/sys/powerpc/powerpc/pmap.c index 0ef6e0d4304a..4ca3a98dc2a8 100644 --- a/sys/powerpc/powerpc/pmap.c +++ b/sys/powerpc/powerpc/pmap.c @@ -114,6 +114,8 @@ __FBSDID("$FreeBSD$"); * correct. */ +#include "opt_kstack_pages.h" + #include #include #include diff --git a/sys/powerpc/powerpc/vm_machdep.c b/sys/powerpc/powerpc/vm_machdep.c index b9aa06b640c5..b067b321698f 100644 --- a/sys/powerpc/powerpc/vm_machdep.c +++ b/sys/powerpc/powerpc/vm_machdep.c @@ -67,6 +67,8 @@ * rights to redistribute these changes. */ +#include "opt_kstack_pages.h" + #include #include #include diff --git a/sys/sparc64/include/param.h b/sys/sparc64/include/param.h index 7ee63607d1ad..8a9726c9f677 100644 --- a/sys/sparc64/include/param.h +++ b/sys/sparc64/include/param.h @@ -104,7 +104,9 @@ #define PAGE_SIZE_MAX PAGE_SIZE_4M #define PAGE_MASK_MAX PAGE_MASK_4M +#ifndef KSTACK_PAGES #define KSTACK_PAGES 4 /* pages of kernel stack (with pcb) */ +#endif #define KSTACK_GUARD_PAGES 1 /* pages of kstack guard; 0 disables */ #define UAREA_PAGES 1 /* pages of user area */ #define PCPU_PAGES 1 diff --git a/sys/sparc64/sparc64/genassym.c b/sys/sparc64/sparc64/genassym.c index 6360b84f5e6a..ffa3c47667c7 100644 --- a/sys/sparc64/sparc64/genassym.c +++ b/sys/sparc64/sparc64/genassym.c @@ -27,6 +27,8 @@ * $FreeBSD$ */ +#include "opt_kstack_pages.h" + #include #include #include diff --git a/sys/sparc64/sparc64/machdep.c b/sys/sparc64/sparc64/machdep.c index aead2a48dade..7bd1451dbb38 100644 --- a/sys/sparc64/sparc64/machdep.c +++ b/sys/sparc64/sparc64/machdep.c @@ -42,6 +42,7 @@ #include "opt_compat.h" #include "opt_ddb.h" +#include "opt_kstack_pages.h" #include "opt_msgbuf.h" #include diff --git a/sys/sparc64/sparc64/pmap.c b/sys/sparc64/sparc64/pmap.c index d884220b5b88..29441cda33e5 100644 --- a/sys/sparc64/sparc64/pmap.c +++ b/sys/sparc64/sparc64/pmap.c @@ -63,6 +63,7 @@ * correct. */ +#include "opt_kstack_pages.h" #include "opt_msgbuf.h" #include "opt_pmap.h" diff --git a/sys/sparc64/sparc64/vm_machdep.c b/sys/sparc64/sparc64/vm_machdep.c index 5b4b9ab299e1..884b55fcc3b8 100644 --- a/sys/sparc64/sparc64/vm_machdep.c +++ b/sys/sparc64/sparc64/vm_machdep.c @@ -43,6 +43,7 @@ * $FreeBSD$ */ +#include "opt_kstack_pages.h" #include "opt_pmap.h" #include