aboutsummaryrefslogtreecommitdiff
path: root/sys/arm/include/param.h
diff options
context:
space:
mode:
authorKonstantin Belousov <kib@FreeBSD.org>2015-08-10 17:18:21 +0000
committerKonstantin Belousov <kib@FreeBSD.org>2015-08-10 17:18:21 +0000
commitedc8222303c787686a61af4b0ccdfe0151a47669 (patch)
tree6c5e3b30f16040565000131df5f7348a27c34a56 /sys/arm/include/param.h
parent9ba30bcb421b841fa970fd1206b8ec76e5bedf04 (diff)
downloadsrc-edc8222303c787686a61af4b0ccdfe0151a47669.tar.gz
src-edc8222303c787686a61af4b0ccdfe0151a47669.zip
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
Notes
Notes: svn path=/head/; revision=286584
Diffstat (limited to 'sys/arm/include/param.h')
-rw-r--r--sys/arm/include/param.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/arm/include/param.h b/sys/arm/include/param.h
index 626715410f25..d3aa01b7ce1c 100644
--- a/sys/arm/include/param.h
+++ b/sys/arm/include/param.h
@@ -131,7 +131,7 @@
#define KSTACK_GUARD_PAGES 1
#endif /* !KSTACK_GUARD_PAGES */
-#define USPACE_SVC_STACK_TOP (KSTACK_PAGES * PAGE_SIZE)
+#define USPACE_SVC_STACK_TOP (kstack_pages * PAGE_SIZE)
/*
* Mach derived conversion macros