Commit 4c8c3c7f authored by Valentin Schneider's avatar Valentin Schneider Committed by Peter Zijlstra
Browse files

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: default avatarValentin Schneider <vschneid@redhat.com>
Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: default avatarGuo Ren <guoren@kernel.org>
Acked-by: default avatarPalmer Dabbelt <palmer@rivosinc.com>
Link: https://lore.kernel.org/r/20230307143558.294354-6-vschneid@redhat.com
parent 4468161a
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -562,7 +562,7 @@ handle_ipi(struct pt_regs *regs)
}
}


void
void
smp_send_reschedule(int cpu)
arch_smp_send_reschedule(int cpu)
{
{
#ifdef DEBUG_IPI_MSG
#ifdef DEBUG_IPI_MSG
	if (cpu == hard_smp_processor_id())
	if (cpu == hard_smp_processor_id())
+1 −1
Original line number Original line Diff line number Diff line
@@ -292,7 +292,7 @@ static void ipi_send_msg(const struct cpumask *callmap, enum ipi_msg_type msg)
		ipi_send_msg_one(cpu, msg);
		ipi_send_msg_one(cpu, msg);
}
}


void smp_send_reschedule(int cpu)
void arch_smp_send_reschedule(int cpu)
{
{
	ipi_send_msg_one(cpu, IPI_RESCHEDULE);
	ipi_send_msg_one(cpu, IPI_RESCHEDULE);
}
}
+1 −1
Original line number Original line Diff line number Diff line
@@ -746,7 +746,7 @@ void __init set_smp_ipi_range(int ipi_base, int n)
	ipi_setup(smp_processor_id());
	ipi_setup(smp_processor_id());
}
}


void smp_send_reschedule(int cpu)
void arch_smp_send_reschedule(int cpu)
{
{
	smp_cross_call(cpumask_of(cpu), IPI_RESCHEDULE);
	smp_cross_call(cpumask_of(cpu), IPI_RESCHEDULE);
}
}
+2 −0
Original line number Original line Diff line number Diff line
@@ -20,6 +20,8 @@
#include <asm/smp_plat.h>
#include <asm/smp_plat.h>
#include <asm/smp_scu.h>
#include <asm/smp_scu.h>


#include <trace/events/ipi.h>

#define OWL_CPU1_ADDR	0x50
#define OWL_CPU1_ADDR	0x50
#define OWL_CPU1_FLAG	0x5c
#define OWL_CPU1_FLAG	0x5c


+1 −1
Original line number Original line Diff line number Diff line
@@ -976,7 +976,7 @@ void __init set_smp_ipi_range(int ipi_base, int n)
	ipi_setup(smp_processor_id());
	ipi_setup(smp_processor_id());
}
}


void smp_send_reschedule(int cpu)
void arch_smp_send_reschedule(int cpu)
{
{
	smp_cross_call(cpumask_of(cpu), IPI_RESCHEDULE);
	smp_cross_call(cpumask_of(cpu), IPI_RESCHEDULE);
}
}
Loading