Date: Wed, 15 Jul 2015 07:36:13 +0000 From: "wma_semihalf.com (Wojciech Macek)" <phabric-noreply@FreeBSD.org> To: freebsd-arm@freebsd.org Subject: [Differential] [Request, 12 lines] D3094: Fix ARMv8 KSTACK_PAGES issue Message-ID: <differential-rev-PHID-DREV-iyfes6yosmvf4z7iwnvz-req@FreeBSD.org>
index | next in thread | raw e-mail
[-- Attachment #1 --]
wma_semihalf.com created this revision.
wma_semihalf.com added reviewers: emaste, andrew, zbb.
wma_semihalf.com added a subscriber: freebsd-arm-list.
wma_semihalf.com set the repository for this revision to rS FreeBSD src repository.
Herald added subscribers: emaste, andrew, imp.
REVISION SUMMARY
If KSTACK_PAGES was changed to anything alse than the default,
the value from param.h was taken instead.
Ensure all places where KSTACK_PAGES are used the opt_kstack_pages.h
is included.
The issue with wrong stack size is very hard to debug, so author
desided to remove default to unhide any potential code errors.
From now, each time one use KSTACK_PAGES the proper file must
be included as well or the compile will generate an error.
The default was moved to GENERIC config instead.
REPOSITORY
rS FreeBSD src repository
REVISION DETAIL
https://reviews.freebsd.org/D3094
AFFECTED FILES
sys/arm64/arm64/locore.S
sys/arm64/arm64/mp_machdep.c
sys/arm64/arm64/swtch.S
sys/arm64/conf/GENERIC
sys/arm64/include/param.h
sys/ddb/db_ps.c
sys/ddb/db_sym.c
CHANGE DETAILS
diff --git a/sys/ddb/db_sym.c b/sys/ddb/db_sym.c
--- a/sys/ddb/db_sym.c
+++ b/sys/ddb/db_sym.c
@@ -31,6 +31,8 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
+#include "opt_kstack_pages.h"
+
#include <sys/param.h>
#include <sys/pcpu.h>
#include <sys/smp.h>
diff --git a/sys/ddb/db_ps.c b/sys/ddb/db_ps.c
--- a/sys/ddb/db_ps.c
+++ b/sys/ddb/db_ps.c
@@ -30,6 +30,8 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
+#include "opt_kstack_pages.h"
+
#include <sys/param.h>
#include <sys/cons.h>
#include <sys/jail.h>
diff --git a/sys/arm64/include/param.h b/sys/arm64/include/param.h
--- a/sys/arm64/include/param.h
+++ b/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
diff --git a/sys/arm64/conf/GENERIC b/sys/arm64/conf/GENERIC
--- a/sys/arm64/conf/GENERIC
+++ b/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.
diff --git a/sys/arm64/arm64/swtch.S b/sys/arm64/arm64/swtch.S
--- a/sys/arm64/arm64/swtch.S
+++ b/sys/arm64/arm64/swtch.S
@@ -30,6 +30,7 @@
*/
#include "assym.s"
+#include "opt_kstack_pages.h"
#include "opt_sched.h"
#include <machine/asm.h>
diff --git a/sys/arm64/arm64/mp_machdep.c b/sys/arm64/arm64/mp_machdep.c
--- a/sys/arm64/arm64/mp_machdep.c
+++ b/sys/arm64/arm64/mp_machdep.c
@@ -29,6 +29,7 @@
*/
#include "opt_platform.h"
+#include "opt_kstack_pages.h"
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
diff --git a/sys/arm64/arm64/locore.S b/sys/arm64/arm64/locore.S
--- a/sys/arm64/arm64/locore.S
+++ b/sys/arm64/arm64/locore.S
@@ -27,6 +27,7 @@
*/
#include "assym.s"
+#include "opt_kstack_pages.h"
#include <sys/syscall.h>
#include <machine/asm.h>
#include <machine/armreg.h>
EMAIL PREFERENCES
https://reviews.freebsd.org/settings/panel/emailpreferences/
To: wma_semihalf.com, emaste, andrew, zbb
Cc: imp, andrew, freebsd-arm-list, emaste
[-- Attachment #2 --]
diff --git a/sys/ddb/db_sym.c b/sys/ddb/db_sym.c
--- a/sys/ddb/db_sym.c
+++ b/sys/ddb/db_sym.c
@@ -31,6 +31,8 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
+#include "opt_kstack_pages.h"
+
#include <sys/param.h>
#include <sys/pcpu.h>
#include <sys/smp.h>
diff --git a/sys/ddb/db_ps.c b/sys/ddb/db_ps.c
--- a/sys/ddb/db_ps.c
+++ b/sys/ddb/db_ps.c
@@ -30,6 +30,8 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
+#include "opt_kstack_pages.h"
+
#include <sys/param.h>
#include <sys/cons.h>
#include <sys/jail.h>
diff --git a/sys/arm64/include/param.h b/sys/arm64/include/param.h
--- a/sys/arm64/include/param.h
+++ b/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
diff --git a/sys/arm64/conf/GENERIC b/sys/arm64/conf/GENERIC
--- a/sys/arm64/conf/GENERIC
+++ b/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.
diff --git a/sys/arm64/arm64/swtch.S b/sys/arm64/arm64/swtch.S
--- a/sys/arm64/arm64/swtch.S
+++ b/sys/arm64/arm64/swtch.S
@@ -30,6 +30,7 @@
*/
#include "assym.s"
+#include "opt_kstack_pages.h"
#include "opt_sched.h"
#include <machine/asm.h>
diff --git a/sys/arm64/arm64/mp_machdep.c b/sys/arm64/arm64/mp_machdep.c
--- a/sys/arm64/arm64/mp_machdep.c
+++ b/sys/arm64/arm64/mp_machdep.c
@@ -29,6 +29,7 @@
*/
#include "opt_platform.h"
+#include "opt_kstack_pages.h"
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
diff --git a/sys/arm64/arm64/locore.S b/sys/arm64/arm64/locore.S
--- a/sys/arm64/arm64/locore.S
+++ b/sys/arm64/arm64/locore.S
@@ -27,6 +27,7 @@
*/
#include "assym.s"
+#include "opt_kstack_pages.h"
#include <sys/syscall.h>
#include <machine/asm.h>
#include <machine/armreg.h>
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?differential-rev-PHID-DREV-iyfes6yosmvf4z7iwnvz-req>
