提交 737c7d19 编写于 作者: X Xiongfeng Wang 提交者: Xie XiuQi

nmi_watchdog: add asm/nmi.h for ARM64

hulk inclusion
category: bugfix
bugzilla: 16572
CVE: NA

-------------------------------------------------

When I compile the kernel with CONFIG_SDEI_WATCHDOG chosen and without
CONFIG_HARDLOCKUP_DETECTOR, I got the following error.
./include/linux/nmi.h: In function 'touch_nmi_watchdog':
./include/linux/nmi.h:141:2: error: implicit declaration of function 'arch_touch_nmi_watchdog' [-Werror=implicit-function-declaration]
  arch_touch_nmi_watchdog();
  ^~~~~~~~~~~~~~~~~~~~~~~

It is because CONFIG_SDEI_WATCHDOG selects HAVE_NMI_WATCHDOG, but we
didn't provide arch_touch_nmi_watchdog for ARM64 in 'asm/nmi.h'. This
patch implements arch_touch_nmi_watchdog() for ARM64 when
CONFIG_HARDLOCKUP_DETECTOR is not chosen.
Signed-off-by: NXiongfeng Wang <wangxiongfeng2@huawei.com>
Reviewed-by: NYang Yingliang <yangyingliang@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 18472c6a
/* SPDX-License-Identifier: GPL-2.0 */
#if !defined(CONFIG_HARDLOCKUP_DETECTOR)
static inline void arch_touch_nmi_watchdog(void) { }
#endif
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
#include <linux/sched.h> #include <linux/sched.h>
#include <asm/irq.h> #include <asm/irq.h>
#if defined(CONFIG_HAVE_NMI_WATCHDOG) && !defined(CONFIG_SDEI_WATCHDOG) #if defined(CONFIG_HAVE_NMI_WATCHDOG)
#include <asm/nmi.h> #include <asm/nmi.h>
#endif #endif
...@@ -87,6 +87,7 @@ extern void watchdog_hardlockup_check(struct pt_regs *regs); ...@@ -87,6 +87,7 @@ extern void watchdog_hardlockup_check(struct pt_regs *regs);
extern unsigned int hardlockup_panic; extern unsigned int hardlockup_panic;
#else #else
static inline void hardlockup_detector_disable(void) {} static inline void hardlockup_detector_disable(void) {}
static inline void watchdog_hardlockup_check(struct pt_regs *regs) {}
#endif #endif
#if defined(CONFIG_HAVE_NMI_WATCHDOG) || defined(CONFIG_HARDLOCKUP_DETECTOR) #if defined(CONFIG_HAVE_NMI_WATCHDOG) || defined(CONFIG_HARDLOCKUP_DETECTOR)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册