提交 0252aa08 编写于 作者: X Xiongfeng Wang 提交者: Zheng Zengkai

sdei_watchdog: Fix compile error when PPC_WATCHDOG is disable on PowerPC

hulk inclusion
category: bugfix
bugzilla: 48046
CVE: NA

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

When I compile the kernel with CONFIG_PPC_WATCHDOG is disabled on
PowerPC, I got the following compile error:
 In file included from kernel/hung_task.c:11:0:
 ./include/linux/nmi.h: In function ‘touch_nmi_watchdog’:
 ./include/linux/nmi.h:143:2: error: implicit declaration of function ‘arch_touch_nmi_watchdog’; did you mean ‘touch_nmi_watchdog’? [-Werror=implicit-function-declaration]
   arch_touch_nmi_watchdog();
   ^~~~~~~~~~~~~~~~~~~~~~~
   touch_nmi_watchdog

It is because CONFIG_HARDLOCKUP_DETECTOR_PERF is still enabled in my
situation. Fix it by excluding arch_touch_nmi_watchdog() only when
CONFIG_PPC_WATCHDOG is disabled.
Signed-off-by: NXiongfeng Wang <wangxiongfeng2@huawei.com>
Reviewed-by: NHanjun Guo <guohanjun@huawei.com>
Signed-off-by: NChen Jun <chenjun102@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 1c809643
......@@ -96,7 +96,7 @@ static inline void hardlockup_detector_disable(void) {}
#endif
#if defined(CONFIG_HARDLOCKUP_DETECTOR)
#ifndef CONFIG_PPC
#ifndef CONFIG_PPC_WATCHDOG
extern void arch_touch_nmi_watchdog(void);
#endif
#else
......
......@@ -26,8 +26,8 @@ static DEFINE_PER_CPU(bool, watchdog_nmi_touch);
static unsigned long hardlockup_allcpu_dumped;
#ifndef CONFIG_PPC
notrace void __weak arch_touch_nmi_watchdog(void)
#ifndef CONFIG_PPC_WATCHDOG
notrace void arch_touch_nmi_watchdog(void)
{
/*
* Using __raw here because some code paths have
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册