Skip to content

Commit 143d64b

Browse files
bibo-maochenhuacai
authored andcommitted
LoongArch: Export symbol for function smp_send_reschedule()
Function smp_send_reschedule() is standard kernel API, which is defined in header file include/linux/smp.h. However, on LoongArch it is defined as an inline function, this is confusing and kernel modules can not use this function. Now we define smp_send_reschedule() as a general function, and add a EXPORT_SYMBOL_GPL on this function, so that kernel modules can use it. Signed-off-by: Bibo Mao <[email protected]> Signed-off-by: Huacai Chen <[email protected]>
1 parent 76dcd73 commit 143d64b

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

arch/loongarch/include/asm/smp.h

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -78,16 +78,6 @@ extern void calculate_cpu_foreign_map(void);
7878
*/
7979
extern void show_ipi_list(struct seq_file *p, int prec);
8080

81-
/*
82-
* This function sends a 'reschedule' IPI to another CPU.
83-
* it goes straight through and wastes no time serializing
84-
* anything. Worst case is that we lose a reschedule ...
85-
*/
86-
static inline void smp_send_reschedule(int cpu)
87-
{
88-
loongson_send_ipi_single(cpu, SMP_RESCHEDULE);
89-
}
90-
9181
static inline void arch_send_call_function_single_ipi(int cpu)
9282
{
9383
loongson_send_ipi_single(cpu, SMP_CALL_FUNCTION);

arch/loongarch/kernel/smp.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,17 @@ void loongson_send_ipi_mask(const struct cpumask *mask, unsigned int action)
149149
ipi_write_action(cpu_logical_map(i), (u32)action);
150150
}
151151

152+
/*
153+
* This function sends a 'reschedule' IPI to another CPU.
154+
* it goes straight through and wastes no time serializing
155+
* anything. Worst case is that we lose a reschedule ...
156+
*/
157+
void smp_send_reschedule(int cpu)
158+
{
159+
loongson_send_ipi_single(cpu, SMP_RESCHEDULE);
160+
}
161+
EXPORT_SYMBOL_GPL(smp_send_reschedule);
162+
152163
irqreturn_t loongson_ipi_interrupt(int irq, void *dev)
153164
{
154165
unsigned int action;

0 commit comments

Comments
 (0)