Fix KSTACK_PAGES issue when the default value was changed in KERNCONF

If KSTACK_PAGES was changed to anything alse than the default,
the value from param.h was taken instead in some places and
the value from KENRCONF in some others. This resulted in
inconsistency which caused corruption in SMP envorinment.

Ensure all places where KSTACK_PAGES are used the opt_kstack_pages.h
is included.

The file opt_kstack_pages.h could not be included in param.h
because was breaking the toolchain compilation.

Reviewed by:   kib
Obtained from: Semihalf
Sponsored by:  The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D3094
This commit is contained in:
zbb 2015-07-16 10:46:52 +00:00
parent 2b7ab302c3
commit fbdf5266d5
20 changed files with 30 additions and 2 deletions

View File

@ -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"

View File

@ -43,6 +43,7 @@
* Created : 17/09/94
*/
#include "opt_kstack_pages.h"
#include "opt_platform.h"
#include <sys/cdefs.h>

View File

@ -38,6 +38,8 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
#include "opt_kstack_pages.h"
#define _ARM32_BUS_DMA_PRIVATE
#include <sys/param.h>
#include <sys/systm.h>

View File

@ -44,6 +44,7 @@
*/
#include "opt_ddb.h"
#include "opt_kstack_pages.h"
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");

View File

@ -48,6 +48,8 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
#include "opt_kstack_pages.h"
#define _ARM32_BUS_DMA_PRIVATE
#include <sys/param.h>
#include <sys/systm.h>

View File

@ -48,6 +48,8 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
#include "opt_kstack_pages.h"
#define _ARM32_BUS_DMA_PRIVATE
#include <sys/param.h>
#include <sys/systm.h>

View File

@ -48,6 +48,8 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
#include "opt_kstack_pages.h"
#define _ARM32_BUS_DMA_PRIVATE
#include <sys/param.h>
#include <sys/systm.h>

View File

@ -48,6 +48,8 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
#include "opt_kstack_pages.h"
#define _ARM32_BUS_DMA_PRIVATE
#include <sys/param.h>
#include <sys/systm.h>

View File

@ -46,6 +46,7 @@
*/
#include "opt_ddb.h"
#include "opt_kstack_pages.h"
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");

View File

@ -27,6 +27,7 @@
*/
#include "assym.s"
#include "opt_kstack_pages.h"
#include <sys/syscall.h>
#include <machine/asm.h>
#include <machine/armreg.h>
@ -51,8 +52,6 @@
* We are loaded at a 2MiB aligned address
*/
#define INIT_STACK_SIZE (PAGE_SIZE * 4)
.text
.globl _start
_start:

View File

@ -28,6 +28,7 @@
*
*/
#include "opt_kstack_pages.h"
#include "opt_platform.h"
#include <sys/cdefs.h>

View File

@ -30,6 +30,7 @@
*/
#include "assym.s"
#include "opt_kstack_pages.h"
#include "opt_sched.h"
#include <machine/asm.h>

View File

@ -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>

View File

@ -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>

View File

@ -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"

View File

@ -51,6 +51,8 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
#include "opt_kstack_pages.h"
#include <sys/param.h>
#include <sys/conf.h>
#include <sys/malloc.h>

View File

@ -58,6 +58,7 @@ __FBSDID("$FreeBSD$");
#include "opt_compat.h"
#include "opt_ddb.h"
#include "opt_kstack_pages.h"
#include <machine/asi.h>
#include <machine/asmacros.h>

View File

@ -27,6 +27,8 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
#include "opt_kstack_pages.h"
#include <sys/param.h>
#include <sys/proc.h>
#include <sys/stack.h>

View File

@ -27,6 +27,8 @@
#include <machine/asm.h>
__FBSDID("$FreeBSD$");
#include "opt_kstack_pages.h"
#include <sys/errno.h>
#include <machine/asi.h>

View File

@ -31,6 +31,7 @@
__FBSDID("$FreeBSD$");
#include "opt_ddb.h"
#include "opt_kstack_pages.h"
#include <sys/param.h>
#include <sys/bus.h>