[PATCH 10/16] xtensa: smp: add headers for missing function prototypes

From: Randy Dunlap
Date: Wed Sep 20 2023 - 01:22:55 EST


Use <asm/smp.h> to provide the prototype for secondary_start_kernel().
Use <linux/profile.h> to provide the prototype for
setup_profiling_timer().

arch/xtensa/kernel/smp.c:119:6: warning: no previous prototype for 'secondary_start_kernel' [-Wmissing-prototypes]
119 | void secondary_start_kernel(void)
arch/xtensa/kernel/smp.c:461:5: warning: no previous prototype for 'setup_profiling_timer' [-Wmissing-prototypes]
461 | int setup_profiling_timer(unsigned int multiplier)

Signed-off-by: Randy Dunlap <rdunlap@xxxxxxxxxxxxx>
Cc: Chris Zankel <chris@xxxxxxxxxx>
Cc: Max Filippov <jcmvbkbc@xxxxxxxxx>
---
arch/xtensa/include/asm/smp.h | 1 +
arch/xtensa/kernel/smp.c | 1 +
2 files changed, 2 insertions(+)

diff -- a/arch/xtensa/include/asm/smp.h b/arch/xtensa/include/asm/smp.h
--- a/arch/xtensa/include/asm/smp.h
+++ b/arch/xtensa/include/asm/smp.h
@@ -23,6 +23,7 @@ struct cpumask;
void arch_send_call_function_ipi_mask(const struct cpumask *mask);
void arch_send_call_function_single_ipi(int cpu);

+void secondary_start_kernel(void);
void smp_init_cpus(void);
void secondary_init_irq(void);
void ipi_init(void);
diff -- a/arch/xtensa/kernel/smp.c b/arch/xtensa/kernel/smp.c
--- a/arch/xtensa/kernel/smp.c
+++ b/arch/xtensa/kernel/smp.c
@@ -21,6 +21,7 @@
#include <linux/irq.h>
#include <linux/kdebug.h>
#include <linux/module.h>
+#include <linux/profile.h>
#include <linux/sched/mm.h>
#include <linux/sched/hotplug.h>
#include <linux/sched/task_stack.h>