Kconfig: clean up the "#if defined(arch)" list for exception-trace sysctl entry
authorCatalin Marinas <catalin.marinas@arm.com>
Mon, 8 Oct 2012 23:28:16 +0000 (16:28 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 9 Oct 2012 07:22:14 +0000 (16:22 +0900)
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>
arch/arm64/Kconfig
arch/powerpc/Kconfig
arch/s390/Kconfig
arch/sparc/Kconfig
arch/tile/Kconfig
arch/x86/Kconfig
init/Kconfig
kernel/sysctl.c

index a30856058742becc009159d6c07fa9d808f23e0b..7ff68c9460737d7b016763475c9a01dfdf882a57 100644 (file)
@@ -28,6 +28,7 @@ config ARM64
        select PERF_USE_VMALLOC
        select RTC_LIB
        select SPARSE_IRQ
+       select SYSCTL_EXCEPTION_TRACE
        help
          ARM 64-bit (AArch64) Linux support.
 
index 6a798a70a6d1ff7ecde3466e8a1a2b263396357a..df7edb887a04c85be2c53ec9c12540f2a6440b29 100644 (file)
@@ -99,6 +99,7 @@ config PPC
        select HAVE_DYNAMIC_FTRACE
        select HAVE_FUNCTION_TRACER
        select HAVE_FUNCTION_GRAPH_TRACER
+       select SYSCTL_EXCEPTION_TRACE
        select ARCH_WANT_OPTIONAL_GPIOLIB
        select HAVE_IDE
        select HAVE_IOREMAP_PROT
index 8c6d7986f6d252bc75d8abd68db90409b3c6a924..ceff7aef2477ad5ff896db12886204e773475d28 100644 (file)
@@ -68,6 +68,7 @@ config S390
        select HAVE_FTRACE_MCOUNT_RECORD
        select HAVE_C_RECORDMCOUNT
        select HAVE_SYSCALL_TRACEPOINTS
+       select SYSCTL_EXCEPTION_TRACE
        select HAVE_DYNAMIC_FTRACE
        select HAVE_FUNCTION_GRAPH_TRACER
        select HAVE_REGS_AND_STACK_ACCESS_API
index 700a01adec3aa270543677d44394d08e303a23f3..e184075877d74fe49d49de7c31be4d0d71442ffe 100644 (file)
@@ -18,6 +18,7 @@ config SPARC
        select HAVE_OPROFILE
        select HAVE_ARCH_KGDB if !SMP || SPARC64
        select HAVE_ARCH_TRACEHOOK
+       select SYSCTL_EXCEPTION_TRACE
        select ARCH_WANT_OPTIONAL_GPIOLIB
        select RTC_CLASS
        select RTC_DRV_M48T59
index df69d4296b4b2cceb36848eb9f2666389967e692..dc46490adca043ce634aae948f8f0b1e6ca65628 100644 (file)
@@ -7,6 +7,7 @@ config TILE
        select HAVE_DMA_API_DEBUG
        select HAVE_KVM if !TILEGX
        select GENERIC_FIND_FIRST_BIT
+       select SYSCTL_EXCEPTION_TRACE
        select USE_GENERIC_SMP_HELPERS
        select CC_OPTIMIZE_FOR_SIZE
        select HAVE_DEBUG_KMEMLEAK
index 3fea1848d9556055cc84774cffa2899ce492528d..6119d6c7002eaa00fecf659ebb355bf25640c351 100644 (file)
@@ -47,6 +47,7 @@ config X86
        select HAVE_FUNCTION_GRAPH_FP_TEST
        select HAVE_FUNCTION_TRACE_MCOUNT_TEST
        select HAVE_SYSCALL_TRACEPOINTS
+       select SYSCTL_EXCEPTION_TRACE
        select HAVE_KVM
        select HAVE_ARCH_KGDB
        select HAVE_ARCH_TRACEHOOK
index 38bab420bd9bc2d945691d3a755f6bf59eed8e6d..4c93533da42cbd66fd29f84b4e66c8c7e881c9ff 100644 (file)
@@ -1152,6 +1152,11 @@ config SYSCTL_SYSCALL
 
          If unsure say N here.
 
+config SYSCTL_EXCEPTION_TRACE
+       bool
+       help
+         Enable support for /proc/sys/debug/exception-trace.
+
 config KALLSYMS
         bool "Load all symbols for debugging/ksymoops" if EXPERT
         default y
index c2a2f8084bad0c95fbfc77ec08b2ee806d338097..26f65eaa01f9c94366aa5156f9c304bbc589808f 100644 (file)
@@ -1549,8 +1549,7 @@ static struct ctl_table fs_table[] = {
 };
 
 static struct ctl_table debug_table[] = {
-#if defined(CONFIG_X86) || defined(CONFIG_PPC) || defined(CONFIG_SPARC) || \
-    defined(CONFIG_S390) || defined(CONFIG_TILE) || defined(CONFIG_ARM64)
+#ifdef CONFIG_SYSCTL_EXCEPTION_TRACE
        {
                .procname       = "exception-trace",
                .data           = &show_unhandled_signals,