From: "tip-bot2 for Eric Dumazet" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Eric Dumazet <edumazet@google.com>,
"Borislav Petkov (AMD)" <bp@alien8.de>,
"Peter Zijlstra (Intel)" <peterz@infradead.org>,
x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: x86/core] x86/smp: Use static_call for arch_smp_send_reschedule()
Date: Fri, 16 Jan 2026 21:22:00 -0000 [thread overview]
Message-ID: <176859852017.510.2868283334488670420.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20251222201406.3725665-3-edumazet@google.com>
The following commit has been merged into the x86/core branch of tip:
Commit-ID: 83408307cf374038c5df199dde2e3fc11b3e27c2
Gitweb: https://git.kernel.org/tip/83408307cf374038c5df199dde2e3fc11b3e27c2
Author: Eric Dumazet <edumazet@google.com>
AuthorDate: Mon, 22 Dec 2025 20:14:05
Committer: Borislav Petkov (AMD) <bp@alien8.de>
CommitterDate: Fri, 16 Jan 2026 20:52:41 +01:00
x86/smp: Use static_call for arch_smp_send_reschedule()
Use static_call to avoid an indirect call, especially expensive
with retpoline.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://patch.msgid.link/20251222201406.3725665-3-edumazet@google.com
---
arch/x86/include/asm/smp.h | 7 +++++--
arch/x86/kernel/smp.c | 5 +++++
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/arch/x86/include/asm/smp.h b/arch/x86/include/asm/smp.h
index 891a5d1..3b3ff77 100644
--- a/arch/x86/include/asm/smp.h
+++ b/arch/x86/include/asm/smp.h
@@ -49,6 +49,10 @@ 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_smp_send_reschedule(int cpu);
+DECLARE_STATIC_CALL(x86_smp_send_reschedule,
+ native_smp_send_reschedule);
+
/* Globals due to paravirt */
extern void set_cpu_sibling_map(int cpu);
@@ -94,7 +98,7 @@ static inline void __noreturn play_dead(void)
static inline void arch_smp_send_reschedule(int cpu)
{
- smp_ops.smp_send_reschedule(cpu);
+ static_call(x86_smp_send_reschedule)(cpu);
}
static inline void arch_send_call_function_single_ipi(int cpu)
@@ -127,7 +131,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_smp_send_reschedule(int cpu);
void native_send_call_func_ipi(const struct cpumask *mask);
asmlinkage __visible void smp_reboot_interrupt(void);
diff --git a/arch/x86/kernel/smp.c b/arch/x86/kernel/smp.c
index 2c8fdf1..6e25a86 100644
--- a/arch/x86/kernel/smp.c
+++ b/arch/x86/kernel/smp.c
@@ -302,11 +302,16 @@ EXPORT_SYMBOL_GPL(smp_ops);
DEFINE_STATIC_CALL(x86_send_call_func_single_ipi,
native_send_call_func_single_ipi);
+DEFINE_STATIC_CALL(x86_smp_send_reschedule,
+ native_smp_send_reschedule);
+EXPORT_STATIC_CALL(x86_smp_send_reschedule);
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_smp_send_reschedule,
+ smp_ops.smp_send_reschedule);
}
EXPORT_SYMBOL_GPL(x86_smp_ops_static_call_update);
next prev parent reply other threads:[~2026-01-16 21:22 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-22 20:14 [PATCH 0/3] x86: Use static_call for three smp_ops methods Eric Dumazet
2025-12-22 20:14 ` [PATCH 1/3] x86/smp: Use static_call for arch_send_call_function_single_ipi() Eric Dumazet
2026-01-16 21:22 ` [tip: x86/core] " tip-bot2 for Eric Dumazet
2025-12-22 20:14 ` [PATCH 2/3] x86/smp: Use static_call for arch_smp_send_reschedule() Eric Dumazet
2026-01-16 21:22 ` tip-bot2 for Eric Dumazet [this message]
2025-12-22 20:14 ` [PATCH 3/3] x86/smp: Use static_call for arch_send_call_function_ipi() Eric Dumazet
2026-01-16 21:21 ` [tip: x86/core] " tip-bot2 for Eric Dumazet
2026-01-08 11:51 ` [PATCH 0/3] x86: Use static_call for three smp_ops methods Peter Zijlstra
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=176859852017.510.2868283334488670420.tip-bot2@tip-bot2 \
--to=tip-bot2@linutronix.de \
--cc=bp@alien8.de \
--cc=edumazet@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®