Skip to contentSkip to conversation

kernel/watchdog: fix Kconfig constraints for perf hardlockup watchdog

PATCH New [email protected] 1 participant 1 message Aug 18, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 2/14 kernel/watchdog: fix Kconfig constraints for perf hardlockup watchdog

From: Nicholas Piggin <[email protected]>
Subject: kernel/watchdog: fix Kconfig constraints for perf hardlockup watchdog

05a4a9527931 ("kernel/watchdog: split up config options") lost the perf-based hardlockup detector's dependency on PERF_EVENTS, which can result in broken builds with some powerpc configurations.

Restore the dependency. Add it in for x86 too, despite x86 always selecting PERF_EVENTS it seems reasonable to make the dependency explicit.

Fixes 05a4a9527931 ("kernel/watchdog: split up config options")

---

 arch/powerpc/Kconfig |    2 +-
 arch/x86/Kconfig     |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
arch/powerpc/Kconfig renamed from arch/powerpc/Kconfig~kernel-watchdog-fix-kconfig-constraints-for-perf-hardlockup-watchdog +1 -1
diff -puN arch/powerpc/Kconfig~kernel-watchdog-fix-kconfig-constraints-for-perf-hardlockup-watchdog arch/powerpc/Kconfig
@@ -199,7 +199,7 @@ config PPC
 	select HAVE_OPTPROBES			if PPC64
 	select HAVE_PERF_EVENTS
 	select HAVE_PERF_EVENTS_NMI		if PPC64
-	select HAVE_HARDLOCKUP_DETECTOR_PERF	if HAVE_PERF_EVENTS_NMI && !HAVE_HARDLOCKUP_DETECTOR_ARCH
+	select HAVE_HARDLOCKUP_DETECTOR_PERF	if PERF_EVENTS && HAVE_PERF_EVENTS_NMI && !HAVE_HARDLOCKUP_DETECTOR_ARCH
 	select HAVE_PERF_REGS
 	select HAVE_PERF_USER_STACK_DUMP
 	select HAVE_RCU_TABLE_FREE		if SMP
arch/x86/Kconfig renamed from arch/x86/Kconfig~kernel-watchdog-fix-kconfig-constraints-for-perf-hardlockup-watchdog +1 -1
diff -puN arch/x86/Kconfig~kernel-watchdog-fix-kconfig-constraints-for-perf-hardlockup-watchdog arch/x86/Kconfig
@@ -163,7 +163,7 @@ config X86
 	select HAVE_PCSPKR_PLATFORM
 	select HAVE_PERF_EVENTS
 	select HAVE_PERF_EVENTS_NMI
-	select HAVE_HARDLOCKUP_DETECTOR_PERF	if HAVE_PERF_EVENTS_NMI
+	select HAVE_HARDLOCKUP_DETECTOR_PERF	if PERF_EVENTS && HAVE_PERF_EVENTS_NMI
 	select HAVE_PERF_REGS
 	select HAVE_PERF_USER_STACK_DUMP
 	select HAVE_REGS_AND_STACK_ACCESS_API

_