lib: consolidate DEBUG_PER_CPU_MAPS
authorStephen Boyd <sboyd@codeaurora.org>
Wed, 25 May 2011 00:13:32 +0000 (17:13 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 25 May 2011 15:39:53 +0000 (08:39 -0700)
DEBUG_PER_CPU_MAPS is used in lib/cpumask.c as well as in
inlcude/linux/cpumask.h and thus it has outgrown its use within x86 and
powerpc alone.  Any arch with SMP support may want to get some more
debugging, so make this option generic.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Cc: <linux-arch@vger.kernel.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/powerpc/Kconfig.debug
arch/x86/Kconfig.debug
lib/Kconfig.debug

index a597dd7..e1890e6 100644 (file)
@@ -44,18 +44,6 @@ config DEBUG_STACK_USAGE
 
          This option will slow down process creation somewhat.
 
-config DEBUG_PER_CPU_MAPS
-       bool "Debug access to per_cpu maps"
-       depends on DEBUG_KERNEL
-       depends on SMP
-       default n
-       ---help---
-         Say Y to verify that the per_cpu map being accessed has
-         been setup.  Adds a fair amount of code to kernel memory
-         and decreases performance.
-
-         Say N if unsure.
-
 config HCALL_STATS
        bool "Hypervisor call instrumentation"
        depends on PPC_PSERIES && DEBUG_FS && TRACEPOINTS
index 615e188..1bf8839 100644 (file)
@@ -75,17 +75,6 @@ config DEBUG_STACK_USAGE
 
          This option will slow down process creation somewhat.
 
-config DEBUG_PER_CPU_MAPS
-       bool "Debug access to per_cpu maps"
-       depends on DEBUG_KERNEL
-       depends on SMP
-       ---help---
-         Say Y to verify that the per_cpu map being accessed has
-         been setup.  Adds a fair amount of code to kernel memory
-         and decreases performance.
-
-         Say N if unsure.
-
 config X86_PTDUMP
        bool "Export kernel pagetable layout to userspace via debugfs"
        depends on DEBUG_KERNEL
index 0efcdca..09596e0 100644 (file)
@@ -983,6 +983,17 @@ config DEBUG_FORCE_WEAK_PER_CPU
          To ensure that generic code follows the above rules, this
          option forces all percpu variables to be defined as weak.
 
+config DEBUG_PER_CPU_MAPS
+       bool "Debug access to per_cpu maps"
+       depends on DEBUG_KERNEL
+       depends on SMP
+       help
+         Say Y to verify that the per_cpu map being accessed has
+         been set up. This adds a fair amount of code to kernel memory
+         and decreases performance.
+
+         Say N if unsure.
+
 config LKDTM
        tristate "Linux Kernel Dump Test Tool Module"
        depends on DEBUG_FS