Skip to content

Commit 7ac57a8

Browse files
ctmarinastorvalds
authored andcommitted
Kconfig: clean up the "#if defined(arch)" list for exception-trace sysctl entry
Introduce SYSCTL_EXCEPTION_TRACE config option and selec it in the architectures requiring support for the "exception-trace" debug_table entry in kernel/sysctl.c. Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Cc: Heiko Carstens <heiko.carstens@de.ibm.com> Cc: "David S. Miller" <davem@davemloft.net> Cc: Chris Metcalf <cmetcalf@tilera.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@redhat.com> Cc: "H. Peter Anvin" <hpa@zytor.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 9b2a60c commit 7ac57a8

8 files changed

Lines changed: 12 additions & 2 deletions

File tree

‎arch/arm64/Kconfig‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ config ARM64
2828
select PERF_USE_VMALLOC
2929
select RTC_LIB
3030
select SPARSE_IRQ
31+
select SYSCTL_EXCEPTION_TRACE
3132
help
3233
ARM 64-bit (AArch64) Linux support.
3334

‎arch/powerpc/Kconfig‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ config PPC
9999
select HAVE_DYNAMIC_FTRACE
100100
select HAVE_FUNCTION_TRACER
101101
select HAVE_FUNCTION_GRAPH_TRACER
102+
select SYSCTL_EXCEPTION_TRACE
102103
select ARCH_WANT_OPTIONAL_GPIOLIB
103104
select HAVE_IDE
104105
select HAVE_IOREMAP_PROT

‎arch/s390/Kconfig‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ config S390
6868
select HAVE_FTRACE_MCOUNT_RECORD
6969
select HAVE_C_RECORDMCOUNT
7070
select HAVE_SYSCALL_TRACEPOINTS
71+
select SYSCTL_EXCEPTION_TRACE
7172
select HAVE_DYNAMIC_FTRACE
7273
select HAVE_FUNCTION_GRAPH_TRACER
7374
select HAVE_REGS_AND_STACK_ACCESS_API

‎arch/sparc/Kconfig‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ config SPARC
1818
select HAVE_OPROFILE
1919
select HAVE_ARCH_KGDB if !SMP || SPARC64
2020
select HAVE_ARCH_TRACEHOOK
21+
select SYSCTL_EXCEPTION_TRACE
2122
select ARCH_WANT_OPTIONAL_GPIOLIB
2223
select RTC_CLASS
2324
select RTC_DRV_M48T59

‎arch/tile/Kconfig‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ config TILE
77
select HAVE_DMA_API_DEBUG
88
select HAVE_KVM if !TILEGX
99
select GENERIC_FIND_FIRST_BIT
10+
select SYSCTL_EXCEPTION_TRACE
1011
select USE_GENERIC_SMP_HELPERS
1112
select CC_OPTIMIZE_FOR_SIZE
1213
select HAVE_DEBUG_KMEMLEAK

‎arch/x86/Kconfig‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ config X86
4747
select HAVE_FUNCTION_GRAPH_FP_TEST
4848
select HAVE_FUNCTION_TRACE_MCOUNT_TEST
4949
select HAVE_SYSCALL_TRACEPOINTS
50+
select SYSCTL_EXCEPTION_TRACE
5051
select HAVE_KVM
5152
select HAVE_ARCH_KGDB
5253
select HAVE_ARCH_TRACEHOOK

‎init/Kconfig‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1152,6 +1152,11 @@ config SYSCTL_SYSCALL
11521152

11531153
If unsure say N here.
11541154

1155+
config SYSCTL_EXCEPTION_TRACE
1156+
bool
1157+
help
1158+
Enable support for /proc/sys/debug/exception-trace.
1159+
11551160
config KALLSYMS
11561161
bool "Load all symbols for debugging/ksymoops" if EXPERT
11571162
default y

‎kernel/sysctl.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1549,8 +1549,7 @@ static struct ctl_table fs_table[] = {
15491549
};
15501550

15511551
static struct ctl_table debug_table[] = {
1552-
#if defined(CONFIG_X86) || defined(CONFIG_PPC) || defined(CONFIG_SPARC) || \
1553-
defined(CONFIG_S390) || defined(CONFIG_TILE) || defined(CONFIG_ARM64)
1552+
#ifdef CONFIG_SYSCTL_EXCEPTION_TRACE
15541553
{
15551554
.procname = "exception-trace",
15561555
.data = &show_unhandled_signals,

0 commit comments

Comments
 (0)