Skip site navigation (1)Skip section navigation (2)
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>

next in thread | raw e-mail | index | archive | help

--b1_02e5a17ed84b5a608dd9cd36c9fbabff
Content-Type: text/plain; charset = "utf-8"
Content-Transfer-Encoding: 8bit

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

--b1_02e5a17ed84b5a608dd9cd36c9fbabff
Content-Type: text/x-patch; charset=utf-8; name="D3094.6960.patch"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="D3094.6960.patch"

ZGlmZiAtLWdpdCBhL3N5cy9kZGIvZGJfc3ltLmMgYi9zeXMvZGRiL2RiX3N5bS5jCi0tLSBhL3N5
cy9kZGIvZGJfc3ltLmMKKysrIGIvc3lzL2RkYi9kYl9zeW0uYwpAQCAtMzEsNiArMzEsOCBAQAog
I2luY2x1ZGUgPHN5cy9jZGVmcy5oPgogX19GQlNESUQoIiRGcmVlQlNEJCIpOwogCisjaW5jbHVk
ZSAib3B0X2tzdGFja19wYWdlcy5oIgorCiAjaW5jbHVkZSA8c3lzL3BhcmFtLmg+CiAjaW5jbHVk
ZSA8c3lzL3BjcHUuaD4KICNpbmNsdWRlIDxzeXMvc21wLmg+CmRpZmYgLS1naXQgYS9zeXMvZGRi
L2RiX3BzLmMgYi9zeXMvZGRiL2RiX3BzLmMKLS0tIGEvc3lzL2RkYi9kYl9wcy5jCisrKyBiL3N5
cy9kZGIvZGJfcHMuYwpAQCAtMzAsNiArMzAsOCBAQAogI2luY2x1ZGUgPHN5cy9jZGVmcy5oPgog
X19GQlNESUQoIiRGcmVlQlNEJCIpOwogCisjaW5jbHVkZSAib3B0X2tzdGFja19wYWdlcy5oIgor
CiAjaW5jbHVkZSA8c3lzL3BhcmFtLmg+CiAjaW5jbHVkZSA8c3lzL2NvbnMuaD4KICNpbmNsdWRl
IDxzeXMvamFpbC5oPgpkaWZmIC0tZ2l0IGEvc3lzL2FybTY0L2lu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a608dd9cd36c9fbabff--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?differential-rev-PHID-DREV-iyfes6yosmvf4z7iwnvz-req>