Skip to content

Commit 1f8db41

Browse files
author
Ingo Molnar
committed
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 <[email protected]>
1 parent a148866 commit 1f8db41

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

kernel/sched/core.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
#include "../smpboot.h"
2121

2222
#include "pelt.h"
23+
#include "smp.h"
2324

2425
#define CREATE_TRACE_POINTS
2526
#include <trace/events/sched.h>

kernel/sched/smp.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/* SPDX-License-Identifier: GPL-2.0 */
2+
/*
3+
* Scheduler internal SMP callback types and methods between the scheduler
4+
* and other internal parts of the core kernel:
5+
*/
6+
7+
extern void sched_ttwu_pending(void *arg);
8+
9+
extern void send_call_function_single_ipi(int cpu);

kernel/smp.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#include <linux/hypervisor.h>
2323

2424
#include "smpboot.h"
25-
25+
#include "sched/smp.h"
2626

2727
#define CSD_TYPE(_csd) ((_csd)->flags & CSD_FLAG_TYPE_MASK)
2828

@@ -133,8 +133,6 @@ static __always_inline void csd_unlock(call_single_data_t *csd)
133133

134134
static DEFINE_PER_CPU_SHARED_ALIGNED(call_single_data_t, csd_data);
135135

136-
extern void send_call_function_single_ipi(int cpu);
137-
138136
void __smp_call_single_queue(int cpu, struct llist_node *node)
139137
{
140138
/*
@@ -196,7 +194,6 @@ void generic_smp_call_function_single_interrupt(void)
196194
flush_smp_call_function_queue(true);
197195
}
198196

199-
extern void sched_ttwu_pending(void *);
200197
extern void irq_work_single(void *);
201198

202199
/**

0 commit comments

Comments
 (0)