sched/headers: Split out open-coded prototypes into kernel/sched/smp.h

Move the prototypes for sched_ttwu_pending() and send_call_function_single_ipi()
into the newly created kernel/sched/smp.h header, to make sure they are all
the same, and to architectures happy that use -Wmissing-prototypes.

Signed-off-by: Ingo Molnar <mingo@kernel.org>
This commit is contained in:
Ingo Molnar 2020-05-28 11:01:34 +02:00
parent a148866489
commit 1f8db41505
3 changed files with 11 additions and 4 deletions

View File

@ -20,6 +20,7 @@
#include "../smpboot.h" #include "../smpboot.h"
#include "pelt.h" #include "pelt.h"
#include "smp.h"
#define CREATE_TRACE_POINTS #define CREATE_TRACE_POINTS
#include <trace/events/sched.h> #include <trace/events/sched.h>

9
kernel/sched/smp.h Normal file
View File

@ -0,0 +1,9 @@
/* SPDX-License-Identifier: GPL-2.0 */
/*
* Scheduler internal SMP callback types and methods between the scheduler
* and other internal parts of the core kernel:
*/
extern void sched_ttwu_pending(void *arg);
extern void send_call_function_single_ipi(int cpu);

View File

@ -22,7 +22,7 @@
#include <linux/hypervisor.h> #include <linux/hypervisor.h>
#include "smpboot.h" #include "smpboot.h"
#include "sched/smp.h"
#define CSD_TYPE(_csd) ((_csd)->flags & CSD_FLAG_TYPE_MASK) #define CSD_TYPE(_csd) ((_csd)->flags & CSD_FLAG_TYPE_MASK)
@ -133,8 +133,6 @@ static __always_inline void csd_unlock(call_single_data_t *csd)
static DEFINE_PER_CPU_SHARED_ALIGNED(call_single_data_t, csd_data); static DEFINE_PER_CPU_SHARED_ALIGNED(call_single_data_t, csd_data);
extern void send_call_function_single_ipi(int cpu);
void __smp_call_single_queue(int cpu, struct llist_node *node) void __smp_call_single_queue(int cpu, struct llist_node *node)
{ {
/* /*
@ -196,7 +194,6 @@ void generic_smp_call_function_single_interrupt(void)
flush_smp_call_function_queue(true); flush_smp_call_function_queue(true);
} }
extern void sched_ttwu_pending(void *);
extern void irq_work_single(void *); extern void irq_work_single(void *);
/** /**