xref: /OK3568_Linux_fs/kernel/arch/sh/Kconfig.debug (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun# SPDX-License-Identifier: GPL-2.0
2*4882a593Smuzhiyun
3*4882a593Smuzhiyunconfig TRACE_IRQFLAGS_SUPPORT
4*4882a593Smuzhiyun	def_bool y
5*4882a593Smuzhiyun
6*4882a593Smuzhiyunconfig SH_STANDARD_BIOS
7*4882a593Smuzhiyun	bool "Use LinuxSH standard BIOS"
8*4882a593Smuzhiyun	help
9*4882a593Smuzhiyun	  Say Y here if your target has the gdb-sh-stub
10*4882a593Smuzhiyun	  package from www.m17n.org (or any conforming standard LinuxSH BIOS)
11*4882a593Smuzhiyun	  in FLASH or EPROM.  The kernel will use standard BIOS calls during
12*4882a593Smuzhiyun	  boot for various housekeeping tasks (including calls to read and
13*4882a593Smuzhiyun	  write characters to a system console, get a MAC address from an
14*4882a593Smuzhiyun	  on-board Ethernet interface, and shut down the hardware).  Note this
15*4882a593Smuzhiyun	  does not work with machines with an existing operating system in
16*4882a593Smuzhiyun	  mask ROM and no flash (WindowsCE machines fall in this category).
17*4882a593Smuzhiyun	  If unsure, say N.
18*4882a593Smuzhiyun
19*4882a593Smuzhiyunconfig STACK_DEBUG
20*4882a593Smuzhiyun	bool "Check for stack overflows"
21*4882a593Smuzhiyun	depends on DEBUG_KERNEL
22*4882a593Smuzhiyun	help
23*4882a593Smuzhiyun	  This option will cause messages to be printed if free stack space
24*4882a593Smuzhiyun	  drops below a certain limit. Saying Y here will add overhead to
25*4882a593Smuzhiyun	  every function call and will therefore incur a major
26*4882a593Smuzhiyun	  performance hit. Most users should say N.
27*4882a593Smuzhiyun
28*4882a593Smuzhiyunconfig 4KSTACKS
29*4882a593Smuzhiyun	bool "Use 4Kb for kernel stacks instead of 8Kb"
30*4882a593Smuzhiyun	depends on DEBUG_KERNEL && (MMU || BROKEN) && !PAGE_SIZE_64KB
31*4882a593Smuzhiyun	help
32*4882a593Smuzhiyun	  If you say Y here the kernel will use a 4Kb stacksize for the
33*4882a593Smuzhiyun	  kernel stack attached to each process/thread. This facilitates
34*4882a593Smuzhiyun	  running more threads on a system and also reduces the pressure
35*4882a593Smuzhiyun	  on the VM subsystem for higher order allocations. This option
36*4882a593Smuzhiyun	  will also use IRQ stacks to compensate for the reduced stackspace.
37*4882a593Smuzhiyun
38*4882a593Smuzhiyunconfig IRQSTACKS
39*4882a593Smuzhiyun	bool "Use separate kernel stacks when processing interrupts"
40*4882a593Smuzhiyun	depends on DEBUG_KERNEL && BROKEN
41*4882a593Smuzhiyun	help
42*4882a593Smuzhiyun	  If you say Y here the kernel will use separate kernel stacks
43*4882a593Smuzhiyun	  for handling hard and soft interrupts.  This can help avoid
44*4882a593Smuzhiyun	  overflowing the process kernel stacks.
45*4882a593Smuzhiyun
46*4882a593Smuzhiyunconfig DUMP_CODE
47*4882a593Smuzhiyun	bool "Show disassembly of nearby code in register dumps"
48*4882a593Smuzhiyun	depends on DEBUG_KERNEL
49*4882a593Smuzhiyun	default y if DEBUG_BUGVERBOSE
50*4882a593Smuzhiyun	default n
51*4882a593Smuzhiyun	help
52*4882a593Smuzhiyun	  This prints out a code trace of the instructions leading up to
53*4882a593Smuzhiyun	  the faulting instruction as a debugging aid. As this does grow
54*4882a593Smuzhiyun	  the kernel in size a bit, most users will want to say N here.
55*4882a593Smuzhiyun
56*4882a593Smuzhiyun	  Those looking for more verbose debugging output should say Y.
57*4882a593Smuzhiyun
58*4882a593Smuzhiyunconfig DWARF_UNWINDER
59*4882a593Smuzhiyun	bool "Enable the DWARF unwinder for stacktraces"
60*4882a593Smuzhiyun	depends on DEBUG_KERNEL
61*4882a593Smuzhiyun	select FRAME_POINTER
62*4882a593Smuzhiyun	default n
63*4882a593Smuzhiyun	help
64*4882a593Smuzhiyun	  Enabling this option will make stacktraces more accurate, at
65*4882a593Smuzhiyun	  the cost of an increase in overall kernel size.
66*4882a593Smuzhiyun
67*4882a593Smuzhiyunconfig SH_NO_BSS_INIT
68*4882a593Smuzhiyun	bool "Avoid zeroing BSS (to speed-up startup on suitable platforms)"
69*4882a593Smuzhiyun	depends on DEBUG_KERNEL
70*4882a593Smuzhiyun	default n
71*4882a593Smuzhiyun	help
72*4882a593Smuzhiyun	  If running in painfully slow environments, such as an RTL
73*4882a593Smuzhiyun	  simulation or from remote memory via SHdebug, where the memory
74*4882a593Smuzhiyun	  can already be guaranteed to ber zeroed on boot, say Y.
75*4882a593Smuzhiyun
76*4882a593Smuzhiyun	  For all other cases, say N. If this option seems perplexing, or
77*4882a593Smuzhiyun	  you aren't sure, say N.
78*4882a593Smuzhiyun
79*4882a593Smuzhiyunconfig MCOUNT
80*4882a593Smuzhiyun	def_bool y
81*4882a593Smuzhiyun	depends on STACK_DEBUG || FUNCTION_TRACER
82