[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <176859851861.510.3781533884828804968.tip-bot2@tip-bot2>
Date: Fri, 16 Jan 2026 21:21:58 -0000
From: "tip-bot2 for Eric Dumazet" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Eric Dumazet <edumazet@...gle.com>, "Borislav Petkov (AMD)" <bp@...en8.de>,
"Peter Zijlstra (Intel)" <peterz@...radead.org>, x86@...nel.org,
linux-kernel@...r.kernel.org
Subject:
[tip: x86/core] x86/smp: Use static_call for arch_send_call_function_ipi()
The following commit has been merged into the x86/core branch of tip:
Commit-ID: 1f60230cdc6342d37e7a9eec261ac3c392131688
Gitweb: https://git.kernel.org/tip/1f60230cdc6342d37e7a9eec261ac3c392131688
Author: Eric Dumazet <edumazet@...gle.com>
AuthorDate: Mon, 22 Dec 2025 20:14:06
Committer: Borislav Petkov (AMD) <bp@...en8.de>
CommitterDate: Fri, 16 Jan 2026 21:32:57 +01:00
x86/smp: Use static_call for arch_send_call_function_ipi()
Use static_call to avoid an indirect call, especially expensive
with retpoline.
Signed-off-by: Eric Dumazet <edumazet@...gle.com>
Signed-off-by: Borislav Petkov (AMD) <bp@...en8.de>
Acked-by: Peter Zijlstra (Intel) <peterz@...radead.org>
Link: https://patch.msgid.link/20251222201406.3725665-4-edumazet@google.com
---
arch/x86/include/asm/smp.h | 6 ++++--
arch/x86/kernel/smp.c | 4 ++++
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/arch/x86/include/asm/smp.h b/arch/x86/include/asm/smp.h
index 3b3ff77..f7305c4 100644
--- a/arch/x86/include/asm/smp.h
+++ b/arch/x86/include/asm/smp.h
@@ -49,6 +49,9 @@ void native_send_call_func_single_ipi(int cpu);
DECLARE_STATIC_CALL(x86_send_call_func_single_ipi,
native_send_call_func_single_ipi);
+void native_send_call_func_ipi(const struct cpumask *mask);
+DECLARE_STATIC_CALL(x86_send_call_func_ipi, native_send_call_func_ipi);
+
void native_smp_send_reschedule(int cpu);
DECLARE_STATIC_CALL(x86_smp_send_reschedule,
native_smp_send_reschedule);
@@ -108,7 +111,7 @@ static inline void arch_send_call_function_single_ipi(int cpu)
static inline void arch_send_call_function_ipi_mask(const struct cpumask *mask)
{
- smp_ops.send_call_func_ipi(mask);
+ static_call(x86_send_call_func_ipi)(mask);
}
void cpu_disable_common(void);
@@ -131,7 +134,6 @@ void wbnoinvd_on_cpus_mask(struct cpumask *cpus);
void smp_kick_mwait_play_dead(void);
void __noreturn mwait_play_dead(unsigned int eax_hint);
-void native_send_call_func_ipi(const struct cpumask *mask);
asmlinkage __visible void smp_reboot_interrupt(void);
__visible void smp_reschedule_interrupt(struct pt_regs *regs);
diff --git a/arch/x86/kernel/smp.c b/arch/x86/kernel/smp.c
index 6e25a86..4633ade 100644
--- a/arch/x86/kernel/smp.c
+++ b/arch/x86/kernel/smp.c
@@ -302,6 +302,8 @@ EXPORT_SYMBOL_GPL(smp_ops);
DEFINE_STATIC_CALL(x86_send_call_func_single_ipi,
native_send_call_func_single_ipi);
+DEFINE_STATIC_CALL(x86_send_call_func_ipi,
+ native_send_call_func_ipi);
DEFINE_STATIC_CALL(x86_smp_send_reschedule,
native_smp_send_reschedule);
EXPORT_STATIC_CALL(x86_smp_send_reschedule);
@@ -310,6 +312,8 @@ void x86_smp_ops_static_call_update(void)
{
static_call_update(x86_send_call_func_single_ipi,
smp_ops.send_call_func_single_ipi);
+ static_call_update(x86_send_call_func_ipi,
+ smp_ops.send_call_func_ipi);
static_call_update(x86_smp_send_reschedule,
smp_ops.smp_send_reschedule);
}
Powered by blists - more mailing lists