diff options
author | kib <kib@FreeBSD.org> | 2015-08-10 17:18:21 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2015-08-10 17:18:21 +0000 |
commit | 9033c894a1c694d3e946571d9e57c05349a235eb (patch) | |
tree | 6c5e3b30f16040565000131df5f7348a27c34a56 /sys/arm/xscale/i80321/ep80219_machdep.c | |
parent | 141883cce0cea307fd0365430906181b1954df86 (diff) | |
download | FreeBSD-src-9033c894a1c694d3e946571d9e57c05349a235eb.zip FreeBSD-src-9033c894a1c694d3e946571d9e57c05349a235eb.tar.gz |
Make kstack_pages a tunable on arm, x86, and powepc. On i386, the
initial thread stack is not adjusted by the tunable, the stack is
allocated too early to get access to the kernel environment. See
TD0_KSTACK_PAGES for the thread0 stack sizing on i386.
The tunable was tested on x86 only. From the visual inspection, it
seems that it might work on arm and powerpc. The arm
USPACE_SVC_STACK_TOP and powerpc USPACE macros seems to be already
incorrect for the threads with non-default kstack size. I only
changed the macros to use variable instead of constant, since I cannot
test.
On arm64, mips and sparc64, some static data structures are sized by
KSTACK_PAGES, so the tunable is disabled.
Sponsored by: The FreeBSD Foundation
MFC after: 2 week
Diffstat (limited to 'sys/arm/xscale/i80321/ep80219_machdep.c')
-rw-r--r-- | sys/arm/xscale/i80321/ep80219_machdep.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/arm/xscale/i80321/ep80219_machdep.c b/sys/arm/xscale/i80321/ep80219_machdep.c index 9881371..d93ed74 100644 --- a/sys/arm/xscale/i80321/ep80219_machdep.c +++ b/sys/arm/xscale/i80321/ep80219_machdep.c @@ -225,7 +225,7 @@ initarm(struct arm_boot_params *abp) valloc_pages(irqstack, IRQ_STACK_SIZE); valloc_pages(abtstack, ABT_STACK_SIZE); valloc_pages(undstack, UND_STACK_SIZE); - valloc_pages(kernelstack, KSTACK_PAGES); + valloc_pages(kernelstack, kstack_pages); alloc_pages(minidataclean.pv_pa, 1); valloc_pages(msgbufpv, round_page(msgbufsize) / PAGE_SIZE); /* |