diff mbox series

arm64: fix HARDLOCKUP_DETECTOR dependency

Message ID 20201203222800.1009987-1-arnd@kernel.org (mailing list archive)
State New, archived
Headers show
Series arm64: fix HARDLOCKUP_DETECTOR dependency | expand

Commit Message

Arnd Bergmann Dec. 3, 2020, 10:27 p.m. UTC
From: Arnd Bergmann <arnd@arndb.de>

When CONFIG_HW_PERF_EVENTS is disabled, the hardware lockup detector
fails to link:

ld.lld: error: undefined symbol: hw_nmi_get_sample_period
>>> referenced by watchdog_hld.c
>>>               watchdog_hld.o:(hardlockup_detector_event_create) in archive kernel/built-in.a

Fix the dependency to refer to the Kconfig symbol that actually controls
the feature.

Fixes: 367c820ef080 ("arm64: Enable perf events based hard lockup detector")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm64/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Will Deacon Dec. 4, 2020, 9:27 a.m. UTC | #1
Hi Arnd,

On Thu, Dec 03, 2020 at 11:27:26PM +0100, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> When CONFIG_HW_PERF_EVENTS is disabled, the hardware lockup detector
> fails to link:
> 
> ld.lld: error: undefined symbol: hw_nmi_get_sample_period
> >>> referenced by watchdog_hld.c
> >>>               watchdog_hld.o:(hardlockup_detector_event_create) in archive kernel/built-in.a
> 
> Fix the dependency to refer to the Kconfig symbol that actually controls
> the feature.
> 
> Fixes: 367c820ef080 ("arm64: Enable perf events based hard lockup detector")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  arch/arm64/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
> index 7599ad86e9a8..ecd900ad7755 100644
> --- a/arch/arm64/Kconfig
> +++ b/arch/arm64/Kconfig
> @@ -176,7 +176,7 @@ config ARM64
>  	select HAVE_PATA_PLATFORM
>  	select HAVE_PERF_EVENTS
>  	select HAVE_PERF_EVENTS_NMI if ARM64_PSEUDO_NMI
> -	select HAVE_HARDLOCKUP_DETECTOR_PERF if PERF_EVENTS && HAVE_PERF_EVENTS_NMI
> +	select HAVE_HARDLOCKUP_DETECTOR_PERF if HW_PERF_EVENTS && HAVE_PERF_EVENTS_NMI
>  	select HAVE_PERF_REGS
>  	select HAVE_PERF_USER_STACK_DUMP
>  	select HAVE_REGS_AND_STACK_ACCESS_API

Cheers, although I already have a fix for this one queued locally [1].
I'll push it out in sec (ran out of time yesterday).

Will

[1] https://lore.kernel.org/r/202012031509.4O5ZoWNI-lkp@intel.com
diff mbox series

Patch

diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index 7599ad86e9a8..ecd900ad7755 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -176,7 +176,7 @@  config ARM64
 	select HAVE_PATA_PLATFORM
 	select HAVE_PERF_EVENTS
 	select HAVE_PERF_EVENTS_NMI if ARM64_PSEUDO_NMI
-	select HAVE_HARDLOCKUP_DETECTOR_PERF if PERF_EVENTS && HAVE_PERF_EVENTS_NMI
+	select HAVE_HARDLOCKUP_DETECTOR_PERF if HW_PERF_EVENTS && HAVE_PERF_EVENTS_NMI
 	select HAVE_PERF_REGS
 	select HAVE_PERF_USER_STACK_DUMP
 	select HAVE_REGS_AND_STACK_ACCESS_API