Skip to content

Commit 4c8c3c7

Browse files
valschneiderPeter Zijlstra
authored andcommitted
treewide: Trace IPIs sent via smp_send_reschedule()
To be able to trace invocations of smp_send_reschedule(), rename the arch-specific definitions of it to arch_smp_send_reschedule() and wrap it into an smp_send_reschedule() that contains a tracepoint. Changes to include the declaration of the tracepoint were driven by the following coccinelle script: @func_use@ @@ smp_send_reschedule(...); @include@ @@ #include <trace/events/ipi.h> @no_include depends on func_use && !include@ @@ #include <...> + + #include <trace/events/ipi.h> [csky bits] [riscv bits] Signed-off-by: Valentin Schneider <vschneid@redhat.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Acked-by: Guo Ren <guoren@kernel.org> Acked-by: Palmer Dabbelt <palmer@rivosinc.com> Link: https://lore.kernel.org/r/20230307143558.294354-6-vschneid@redhat.com
1 parent 4468161 commit 4c8c3c7

27 files changed

Lines changed: 53 additions & 26 deletions

File tree

arch/alpha/kernel/smp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -562,7 +562,7 @@ handle_ipi(struct pt_regs *regs)
562562
}
563563

564564
void
565-
smp_send_reschedule(int cpu)
565+
arch_smp_send_reschedule(int cpu)
566566
{
567567
#ifdef DEBUG_IPI_MSG
568568
if (cpu == hard_smp_processor_id())

arch/arc/kernel/smp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ static void ipi_send_msg(const struct cpumask *callmap, enum ipi_msg_type msg)
292292
ipi_send_msg_one(cpu, msg);
293293
}
294294

295-
void smp_send_reschedule(int cpu)
295+
void arch_smp_send_reschedule(int cpu)
296296
{
297297
ipi_send_msg_one(cpu, IPI_RESCHEDULE);
298298
}

arch/arm/kernel/smp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -746,7 +746,7 @@ void __init set_smp_ipi_range(int ipi_base, int n)
746746
ipi_setup(smp_processor_id());
747747
}
748748

749-
void smp_send_reschedule(int cpu)
749+
void arch_smp_send_reschedule(int cpu)
750750
{
751751
smp_cross_call(cpumask_of(cpu), IPI_RESCHEDULE);
752752
}

arch/arm/mach-actions/platsmp.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
#include <asm/smp_plat.h>
2121
#include <asm/smp_scu.h>
2222

23+
#include <trace/events/ipi.h>
24+
2325
#define OWL_CPU1_ADDR 0x50
2426
#define OWL_CPU1_FLAG 0x5c
2527

arch/arm64/kernel/smp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -976,7 +976,7 @@ void __init set_smp_ipi_range(int ipi_base, int n)
976976
ipi_setup(smp_processor_id());
977977
}
978978

979-
void smp_send_reschedule(int cpu)
979+
void arch_smp_send_reschedule(int cpu)
980980
{
981981
smp_cross_call(cpumask_of(cpu), IPI_RESCHEDULE);
982982
}

arch/csky/kernel/smp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ void smp_send_stop(void)
140140
on_each_cpu(ipi_stop, NULL, 1);
141141
}
142142

143-
void smp_send_reschedule(int cpu)
143+
void arch_smp_send_reschedule(int cpu)
144144
{
145145
send_ipi_message(cpumask_of(cpu), IPI_RESCHEDULE);
146146
}

arch/hexagon/kernel/smp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
217217
}
218218
}
219219

220-
void smp_send_reschedule(int cpu)
220+
void arch_smp_send_reschedule(int cpu)
221221
{
222222
send_ipi(cpumask_of(cpu), IPI_RESCHEDULE);
223223
}

arch/ia64/kernel/smp.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,11 +220,11 @@ kdump_smp_send_init(void)
220220
* Called with preemption disabled.
221221
*/
222222
void
223-
smp_send_reschedule (int cpu)
223+
arch_smp_send_reschedule (int cpu)
224224
{
225225
ia64_send_ipi(cpu, IA64_IPI_RESCHEDULE, IA64_IPI_DM_INT, 0);
226226
}
227-
EXPORT_SYMBOL_GPL(smp_send_reschedule);
227+
EXPORT_SYMBOL_GPL(arch_smp_send_reschedule);
228228

229229
/*
230230
* Called with preemption disabled.

arch/loongarch/kernel/smp.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,11 +155,11 @@ void loongson_send_ipi_mask(const struct cpumask *mask, unsigned int action)
155155
* it goes straight through and wastes no time serializing
156156
* anything. Worst case is that we lose a reschedule ...
157157
*/
158-
void smp_send_reschedule(int cpu)
158+
void arch_smp_send_reschedule(int cpu)
159159
{
160160
loongson_send_ipi_single(cpu, SMP_RESCHEDULE);
161161
}
162-
EXPORT_SYMBOL_GPL(smp_send_reschedule);
162+
EXPORT_SYMBOL_GPL(arch_smp_send_reschedule);
163163

164164
irqreturn_t loongson_ipi_interrupt(int irq, void *dev)
165165
{

arch/mips/include/asm/smp.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ extern void calculate_cpu_foreign_map(void);
6666
* it goes straight through and wastes no time serializing
6767
* anything. Worst case is that we lose a reschedule ...
6868
*/
69-
static inline void smp_send_reschedule(int cpu)
69+
static inline void arch_smp_send_reschedule(int cpu)
7070
{
7171
extern const struct plat_smp_ops *mp_ops; /* private */
7272

0 commit comments

Comments
 (0)