]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
lockup_detector: Adapt CONFIG_PERF_EVENT_NMI to other archs
authorFrederic Weisbecker <fweisbec@gmail.com>
Sat, 15 May 2010 20:57:48 +0000 (22:57 +0200)
committerFrederic Weisbecker <fweisbec@gmail.com>
Sat, 15 May 2010 23:57:36 +0000 (01:57 +0200)
CONFIG_PERF_EVENT_NMI is something that need to be enabled from the
arch. This is fine on x86 as PERF_EVENTS is builtin but if other
archs select it, they will need to handle the PERF_EVENTS dependency.

Instead, handle the dependency in the generic layer:

- archs need to tell what they support through HAVE_PERF_EVENTS_NMI
- Enable magically PERF_EVENTS_NMI if we have PERF_EVENTS and
  HAVE_PERF_EVENTS_NMI.

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Don Zickus <dzickus@redhat.com>
Cc: Cyrill Gorcunov <gorcunov@gmail.com>
arch/Kconfig
arch/x86/Kconfig
init/Kconfig

index e5eb1337a5377f5b131b2ba70efd8263b8057404..89b0efb5094810947c7fc6f574d056677d72bb6d 100644 (file)
@@ -145,4 +145,7 @@ config HAVE_HW_BREAKPOINT
 config HAVE_USER_RETURN_NOTIFIER
        bool
 
+config HAVE_PERF_EVENTS_NMI
+       bool
+
 source "kernel/gcov/Kconfig"
index 3cb28cd1f551e7fc3bb292cc59548110c3b1516f..3cb5bb02172bcc14ac6834c590b6d061c2e48026 100644 (file)
@@ -54,7 +54,7 @@ config X86
        select HAVE_KERNEL_LZO
        select HAVE_HW_BREAKPOINT
        select PERF_EVENTS
-       select PERF_EVENTS_NMI
+       select HAVE_PERF_EVENTS_NMI
        select ANON_INODES
        select HAVE_ARCH_KMEMCHECK
        select HAVE_USER_RETURN_NOTIFIER
index e44e25422f22d01b774637773c403132d85e0048..ab733c32292cfb72f518e7b984ab2ae085675cd4 100644 (file)
@@ -943,8 +943,7 @@ config PERF_USE_VMALLOC
          See tools/perf/design.txt for details
 
 config PERF_EVENTS_NMI
-       bool
-       depends on PERF_EVENTS
+       def_bool PERF_EVENTS && HAVE_PERF_EVENTS_NMI
        help
          System hardware can generate an NMI using the perf event
          subsystem.  Also has support for calculating CPU cycle events