Skip to contentSkip to conversation

arm64: smp: Add missing prototype for some smp.c functions

PATCH Superseded Chen Lifu 2 participants 5 messages Mar 27, 2021 – Mar 30, 2021 arm64

lore
Share & tools
lore

Chen Lifu

author
#0 lore raw

PATCH 1/1 arm64: smp: Add missing prototype for some smp.c functions

In commit eb631bb5bf5b
("arm64: Support arch_irq_work_raise() via self IPIs") a new function "arch_irq_work_raise" was added without a prototype in header irq_work.h

In commit d914d4d49745
("arm64: Implement panic_smp_self_stop()") a new function "panic_smp_self_stop" was added without a prototype in header irq_work.h

We get the following warnings on W=1:
arch/arm64/kernel/smp.c:842:6: warning: no previous prototype for ‘arch_irq_work_raise’ [-Wmissing-prototypes] arch/arm64/kernel/smp.c:862:6: warning: no previous prototype for ‘panic_smp_self_stop’ [-Wmissing-prototypes]

Fix the same by adding the missing prototype in header irq_work.h

---
 arch/arm64/include/asm/irq_work.h | 3 +++
 1 file changed, 3 insertions(+)
arch/arm64/include/asm/irq_work.h +3 -0
index a1020285ea75..f766e2190e7c 100644
@@ -2,6 +2,9 @@
 #ifndef __ASM_IRQ_WORK_H
 #define __ASM_IRQ_WORK_H
 
+extern void arch_irq_work_raise(void);
+extern void panic_smp_self_stop(void);
+
 static inline bool arch_irq_work_has_interrupt(void)
 {
 	return true;
Signature · 1 line
2.17.1
maintainer
#1 lore raw
Quoted 28 lines · Chen Lifu

In commit eb631bb5bf5b
("arm64: Support arch_irq_work_raise() via self IPIs") a new function "arch_irq_work_raise" was added without a prototype in header irq_work.h

In commit d914d4d49745
("arm64: Implement panic_smp_self_stop()") a new function "panic_smp_self_stop" was added without a prototype in header irq_work.h

We get the following warnings on W=1:
arch/arm64/kernel/smp.c:842:6: warning: no previous prototype for ‘arch_irq_work_raise’ [-Wmissing-prototypes] arch/arm64/kernel/smp.c:862:6: warning: no previous prototype for ‘panic_smp_self_stop’ [-Wmissing-prototypes]

Fix the same by adding the missing prototype in header irq_work.h

---
 arch/arm64/include/asm/irq_work.h | 3 +++
 1 file changed, 3 insertions(+)
arch/arm64/include/asm/irq_work.h +0 -0
index a1020285ea75..f766e2190e7c 100644

arch/arm64/include/asm/irq_work.h line 6

Quoted 5 lines
arch/arm64/include/asm/irq_work.h +2 -0
@@ -2,6 +2,9 @@
 #ifndef __ASM_IRQ_WORK_H
 #define __ASM_IRQ_WORK_H
 
+extern void arch_irq_work_raise(void);
+extern void panic_smp_self_stop(void);

The second prototype makes more sense in arch/arm64/include/asm/smp.h where we already have crash_smp_send_stop().

Signature · 1 line
Catalin
author
#2 lore raw

PATCH v2 1/1 arm64: smp: Add missing prototype for some smp.c functions

In commit eb631bb5bf5b
("arm64: Support arch_irq_work_raise() via self IPIs") a new function "arch_irq_work_raise" was added without a prototype.

In commit d914d4d49745
("arm64: Implement panic_smp_self_stop()") a new function "panic_smp_self_stop" was added without a prototype.

We get the following warnings on W=1:
arch/arm64/kernel/smp.c:842:6: warning: no previous prototype for ‘arch_irq_work_raise’ [-Wmissing-prototypes] arch/arm64/kernel/smp.c:862:6: warning: no previous prototype for ‘panic_smp_self_stop’ [-Wmissing-prototypes]

Fix the warnings by:
1. Adding the prototype for 'arch_irq_work_raise' in irq_work.h
2. Adding the prototype for 'panic_smp_self_stop' in smp.h

---
v2:
- move the prototype for 'panic_smp_self_stop' to smp.h

 arch/arm64/include/asm/irq_work.h | 2 ++
 arch/arm64/include/asm/smp.h      | 1 +
 2 files changed, 3 insertions(+)
arch/arm64/include/asm/irq_work.h +2 -0
index a1020285ea75..81bbfa3a035b 100644
@@ -2,6 +2,8 @@
 #ifndef __ASM_IRQ_WORK_H
 #define __ASM_IRQ_WORK_H
 
+extern void arch_irq_work_raise(void);
+
 static inline bool arch_irq_work_has_interrupt(void)
 {
 	return true;
arch/arm64/include/asm/smp.h +1 -0
index bcb01ca15325..0e357757c0cc 100644
@@ -145,6 +145,7 @@ bool cpus_are_stuck_in_kernel(void);
 
 extern void crash_smp_send_stop(void);
 extern bool smp_crash_stop_failed(void);
+extern void panic_smp_self_stop(void);
 
 #endif /* ifndef __ASSEMBLY__ */
 
Signature · 1 line
2.17.1
maintainer Applied
#3 lore raw
Quoted 9 lines · Chen Lifu

In commit eb631bb5bf5b
("arm64: Support arch_irq_work_raise() via self IPIs") a new function "arch_irq_work_raise" was added without a prototype.

In commit d914d4d49745
("arm64: Implement panic_smp_self_stop()") a new function "panic_smp_self_stop" was added without a prototype.

[...]

Applied to arm64 (for-next/misc), thanks!

[1/1] arm64: smp: Add missing prototype for some smp.c functions

      https://git.kernel.org/arm64/c/a52ef778ff28
Signature · 1 line
Catalin
author
#4 lore raw
Quoted 9 lines · Catalin Marinas
Quoted 8 lines · Chen Lifu

In commit eb631bb5bf5b
("arm64: Support arch_irq_work_raise() via self IPIs") a new function "arch_irq_work_raise" was added without a prototype.

In commit d914d4d49745
("arm64: Implement panic_smp_self_stop()") a new function "panic_smp_self_stop" was added without a prototype.

Quoted 7 lines
Quoted 1 line

[...]

Applied to arm64 (for-next/misc), thanks!

[1/1] arm64: smp: Add missing prototype for some smp.c functions

       https://git.kernel.org/arm64/c/a52ef778ff28

Thanks!

--
Chen Lifu