[PATCH] sdei_watchdog: fix compile error when CONFIG_HARDLOCKUP_DETECTOR is not set

From: Xiongfeng Wang <wangxiongfeng2@huawei.com> hulk inclusion category: bugfix bugzilla: NA CVE: NA ----------------------------------------------- sdei_watchdog use function 'watchdog_hardlockup_check()' to check whether a hardlockup exists. This function is included by CONFIG_HARDLOCKUP_DETECTOR. So select CONFIG_HARDLOCKUP_DETECTOR when CONFIG_SDEI_WATCHDOG is set. Otherwise a compile error as below will be shown. arch/arm64/kernel/watchdog_sdei.c: In function ‘watchdog_nmi_enable’: arch/arm64/kernel/watchdog_sdei.c:38:35: error: ‘watchdog_thresh’ undeclared (first use in this function) sdei_api_set_secure_timer_period(watchdog_thresh); ^ arch/arm64/kernel/watchdog_sdei.c:38:35: note: each undeclared identifier is reported only once for each function it appears in arch/arm64/kernel/watchdog_sdei.c: In function ‘watchdog_nmi_probe’: arch/arm64/kernel/watchdog_sdei.c:119:39: error: ‘watchdog_thresh’ undeclared (first use in this function) if (sdei_api_set_secure_timer_period(watchdog_thresh)) { Signed-off-by: Xiongfeng Wang <wangxiongfeng2@huawei.com> Reviewed-by: Hanjun Guo <guohanjun@huawei.com> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> --- lib/Kconfig.debug | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index bc65f3b8a8b5..47dca144782b 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -845,6 +845,7 @@ config SDEI_WATCHDOG bool "SDEI NMI Watchdog support" depends on ARM_SDE_INTERFACE && !HARDLOCKUP_CHECK_TIMESTAMP select HAVE_HARDLOCKUP_DETECTOR_ARCH + select HARDLOCKUP_DETECTOR config PMU_WATCHDOG bool "PMU NMI Watchdog support" -- 2.25.1
participants (1)
-
Yang Yingliang