[Differential] [Request, 12 lines] D3094: Fix ARMv8 KSTACK_PAGES issue

wma_semihalf.com (Wojciech Macek) phabric-noreply at FreeBSD.org
Wed Jul 15 07:36:13 UTC 2015


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D3094.6960.patch
Type: text/x-patch
Size: 2130 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-arm/attachments/20150715/dfe5f152/attachment.bin>


More information about the freebsd-arm mailing list