Skip to content

Commit

Permalink
nmi_watchdog: Use a boolean config flag for compiling
Browse files Browse the repository at this point in the history
Determines if an arch has setup arch specific perf_events and
nmi_watchdog code.  This should restrict compiles to only those
arches ready.

Signed-off-by: Don Zickus <dzickus@redhat.com>
Cc: peterz@infradead.org
Cc: gorcunov@gmail.com
Cc: aris@redhat.com
LKML-Reference: <1266013161-31197-1-git-send-email-dzickus@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Don Zickus authored and Ingo Molnar committed Feb 14, 2010
1 parent 8e7672c commit c3128fb
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions arch/x86/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ config X86
select HAVE_KERNEL_LZO
select HAVE_HW_BREAKPOINT
select PERF_EVENTS
select PERF_EVENTS_NMI
select ANON_INODES
select HAVE_ARCH_KMEMCHECK
select HAVE_USER_RETURN_NOTIFIER
Expand Down
5 changes: 5 additions & 0 deletions init/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -946,6 +946,11 @@ config PERF_USE_VMALLOC
help
See tools/perf/design.txt for details

config PERF_EVENTS_NMI
bool
help
Arch has support for nmi_watchdog

menu "Kernel Performance Events And Counters"

config PERF_EVENTS
Expand Down
3 changes: 1 addition & 2 deletions lib/Kconfig.debug
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,7 @@ config DETECT_SOFTLOCKUP

config NMI_WATCHDOG
bool "Detect Hard Lockups with an NMI Watchdog"
depends on DEBUG_KERNEL && PERF_EVENTS
depends on X86
depends on DEBUG_KERNEL && PERF_EVENTS && PERF_EVENTS_NMI
default y
help
Say Y here to enable the kernel to use the NMI as a watchdog
Expand Down

0 comments on commit c3128fb

Please sign in to comment.