Index: sys/amd64/amd64/stack_machdep.c =================================================================== --- sys/amd64/amd64/stack_machdep.c +++ sys/amd64/amd64/stack_machdep.c @@ -27,6 +27,8 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_kstack_pages.h" + #include #include #include Index: sys/arm/arm/machdep.c =================================================================== --- sys/arm/arm/machdep.c +++ sys/arm/arm/machdep.c @@ -44,6 +44,7 @@ #include "opt_compat.h" #include "opt_ddb.h" +#include "opt_kstack_pages.h" #include "opt_platform.h" #include "opt_sched.h" #include "opt_timer.h" Index: sys/arm/at91/at91_machdep.c =================================================================== --- sys/arm/at91/at91_machdep.c +++ sys/arm/at91/at91_machdep.c @@ -43,6 +43,7 @@ * Created : 17/09/94 */ +#include "opt_kstack_pages.h" #include "opt_platform.h" #include Index: sys/arm/cavium/cns11xx/econa_machdep.c =================================================================== --- sys/arm/cavium/cns11xx/econa_machdep.c +++ sys/arm/cavium/cns11xx/econa_machdep.c @@ -38,6 +38,8 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_kstack_pages.h" + #define _ARM32_BUS_DMA_PRIVATE #include #include Index: sys/arm/samsung/s3c2xx0/s3c24x0_machdep.c =================================================================== --- sys/arm/samsung/s3c2xx0/s3c24x0_machdep.c +++ sys/arm/samsung/s3c2xx0/s3c24x0_machdep.c @@ -44,6 +44,7 @@ */ #include "opt_ddb.h" +#include "opt_kstack_pages.h" #include __FBSDID("$FreeBSD$"); Index: sys/arm/xscale/i80321/ep80219_machdep.c =================================================================== --- sys/arm/xscale/i80321/ep80219_machdep.c +++ sys/arm/xscale/i80321/ep80219_machdep.c @@ -48,6 +48,8 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_kstack_pages.h" + #define _ARM32_BUS_DMA_PRIVATE #include #include Index: sys/arm/xscale/i80321/iq31244_machdep.c =================================================================== --- sys/arm/xscale/i80321/iq31244_machdep.c +++ sys/arm/xscale/i80321/iq31244_machdep.c @@ -48,6 +48,8 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_kstack_pages.h" + #define _ARM32_BUS_DMA_PRIVATE #include #include Index: sys/arm/xscale/i8134x/crb_machdep.c =================================================================== --- sys/arm/xscale/i8134x/crb_machdep.c +++ sys/arm/xscale/i8134x/crb_machdep.c @@ -48,6 +48,8 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_kstack_pages.h" + #define _ARM32_BUS_DMA_PRIVATE #include #include Index: sys/arm/xscale/ixp425/avila_machdep.c =================================================================== --- sys/arm/xscale/ixp425/avila_machdep.c +++ sys/arm/xscale/ixp425/avila_machdep.c @@ -48,6 +48,8 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_kstack_pages.h" + #define _ARM32_BUS_DMA_PRIVATE #include #include Index: sys/arm/xscale/pxa/pxa_machdep.c =================================================================== --- sys/arm/xscale/pxa/pxa_machdep.c +++ sys/arm/xscale/pxa/pxa_machdep.c @@ -46,6 +46,7 @@ */ #include "opt_ddb.h" +#include "opt_kstack_pages.h" #include __FBSDID("$FreeBSD$"); Index: sys/arm64/arm64/locore.S =================================================================== --- sys/arm64/arm64/locore.S +++ sys/arm64/arm64/locore.S @@ -27,6 +27,7 @@ */ #include "assym.s" +#include "opt_kstack_pages.h" #include #include #include @@ -51,8 +52,6 @@ * We are loaded at a 2MiB aligned address */ -#define INIT_STACK_SIZE (PAGE_SIZE * 4) - .text .globl _start _start: Index: sys/arm64/arm64/mp_machdep.c =================================================================== --- sys/arm64/arm64/mp_machdep.c +++ sys/arm64/arm64/mp_machdep.c @@ -28,6 +28,7 @@ * */ +#include "opt_kstack_pages.h" #include "opt_platform.h" #include Index: sys/arm64/arm64/swtch.S =================================================================== --- sys/arm64/arm64/swtch.S +++ sys/arm64/arm64/swtch.S @@ -30,6 +30,7 @@ */ #include "assym.s" +#include "opt_kstack_pages.h" #include "opt_sched.h" #include Index: sys/arm64/conf/GENERIC =================================================================== --- sys/arm64/conf/GENERIC +++ sys/arm64/conf/GENERIC @@ -70,6 +70,7 @@ options RACCT_DEFAULT_TO_DISABLED # Set kern.racct.enable=0 by default options RCTL # Resource limits options SMP +options KSTACK_PAGES=4 # Debugging support. Always need this: options KDB # Enable kernel debugger support. Index: sys/arm64/include/param.h =================================================================== --- sys/arm64/include/param.h +++ sys/arm64/include/param.h @@ -92,10 +92,6 @@ #define MAXPAGESIZES 1 /* maximum number of supported page sizes */ -#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 PCPU_PAGES 1 Index: sys/ddb/db_ps.c =================================================================== --- sys/ddb/db_ps.c +++ sys/ddb/db_ps.c @@ -30,6 +30,8 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_kstack_pages.h" + #include #include #include Index: sys/ddb/db_sym.c =================================================================== --- sys/ddb/db_sym.c +++ sys/ddb/db_sym.c @@ -31,6 +31,8 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_kstack_pages.h" + #include #include #include Index: sys/i386/i386/locore.s =================================================================== --- sys/i386/i386/locore.s +++ sys/i386/i386/locore.s @@ -41,6 +41,7 @@ #include "opt_bootp.h" #include "opt_compat.h" +#include "opt_kstack_pages.h" #include "opt_nfsroot.h" #include "opt_pmap.h" Index: sys/i386/i386/stack_machdep.c =================================================================== --- sys/i386/i386/stack_machdep.c +++ sys/i386/i386/stack_machdep.c @@ -27,6 +27,8 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_kstack_pages.h" + #include #include #include Index: sys/powerpc/booke/pmap.c =================================================================== --- sys/powerpc/booke/pmap.c +++ sys/powerpc/booke/pmap.c @@ -51,6 +51,8 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_kstack_pages.h" + #include #include #include Index: sys/sparc64/sparc64/exception.S =================================================================== --- sys/sparc64/sparc64/exception.S +++ sys/sparc64/sparc64/exception.S @@ -58,6 +58,7 @@ #include "opt_compat.h" #include "opt_ddb.h" +#include "opt_kstack_pages.h" #include #include Index: sys/sparc64/sparc64/stack_machdep.c =================================================================== --- sys/sparc64/sparc64/stack_machdep.c +++ sys/sparc64/sparc64/stack_machdep.c @@ -27,6 +27,8 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_kstack_pages.h" + #include #include #include Index: sys/sparc64/sparc64/support.S =================================================================== --- sys/sparc64/sparc64/support.S +++ sys/sparc64/sparc64/support.S @@ -27,6 +27,8 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_kstack_pages.h" + #include #include Index: sys/x86/xen/pv.c =================================================================== --- sys/x86/xen/pv.c +++ sys/x86/xen/pv.c @@ -31,6 +31,7 @@ __FBSDID("$FreeBSD$"); #include "opt_ddb.h" +#include "opt_kstack_pages.h" #include #include