linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] smp: kernel/panic.c - silence warnings
@ 2021-03-16  8:41 He Ying
  2021-03-17  9:49 ` Ingo Molnar
  0 siblings, 1 reply; 13+ messages in thread
From: He Ying @ 2021-03-16  8:41 UTC (permalink / raw)
  To: peterz, mingo, frederic, paulmck, christophe.leroy, clg, qais.yousef
  Cc: johnny.chenyi, linux-kernel

We found these warnings in kernel/panic.c by using sparse tool:
warning: symbol 'panic_smp_self_stop' was not declared.
warning: symbol 'nmi_panic_self_stop' was not declared.
warning: symbol 'crash_smp_send_stop' was not declared.

To avoid them, add declarations for these three functions in
include/linux/smp.h.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: He Ying <heying24@huawei.com>
---
V1->V2:
- fix some misspellings

 include/linux/smp.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/include/linux/smp.h b/include/linux/smp.h
index 70c6f6284dcf..27008a1c8111 100644
--- a/include/linux/smp.h
+++ b/include/linux/smp.h
@@ -50,6 +50,14 @@ extern unsigned int total_cpus;
 int smp_call_function_single(int cpuid, smp_call_func_t func, void *info,
 			     int wait);
 
+/*
+ * Cpus stopping functions in panic. All have default weak definitions.
+ * Architecture-dependent code may override them.
+ */
+void panic_smp_self_stop(void);
+void nmi_panic_self_stop(struct pt_regs *regs);
+void crash_smp_send_stop(void);
+
 /*
  * Call a function on all processors
  */
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2021-03-19  6:59 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-16  8:41 [PATCH v2] smp: kernel/panic.c - silence warnings He Ying
2021-03-17  9:49 ` Ingo Molnar
2021-03-17 11:00   ` Christophe Leroy
2021-03-17 12:23     ` Peter Zijlstra
2021-03-17 17:17       ` Christophe Leroy
2021-03-17 17:37         ` Peter Zijlstra
2021-03-17 20:09           ` Ingo Molnar
2021-03-18  2:56             ` heying (H)
2021-03-18  6:11               ` Christophe Leroy
2021-03-18  6:04             ` Christophe Leroy
2021-03-18  5:53           ` Christophe Leroy
2021-03-19  1:39             ` heying (H)
2021-03-19  6:58               ` Christophe Leroy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).