From: Juergen Gross <jgross@suse.com>
To: linux-kernel@vger.kernel.org, x86@kernel.org
Cc: Juergen Gross <jgross@suse.com>,
Thomas Gleixner <tglx@kernel.org>, Ingo Molnar <mingo@redhat.com>,
Borislav Petkov <bp@alien8.de>,
Dave Hansen <dave.hansen@linux.intel.com>,
"H. Peter Anvin" <hpa@zytor.com>
Subject: [PATCH v2 08/10] x86/msr: Remove rdmsr_safe_on_cpu()
Date: Fri, 5 Jun 2026 16:43:12 +0200 [thread overview]
Message-ID: <20260605144314.3031049-9-jgross@suse.com> (raw)
In-Reply-To: <20260605144314.3031049-1-jgross@suse.com>
With no user left, rdmsr_safe_on_cpu() can be deleted.
Signed-off-by: Juergen Gross <jgross@suse.com>
---
V2:
- delete rdmsr_safe_on_cpu() instead of rdmsrq_safe_on_cpu() (Ingo Molnar)
---
arch/x86/include/asm/msr.h | 6 ------
arch/x86/lib/msr-smp.c | 24 ------------------------
2 files changed, 30 deletions(-)
diff --git a/arch/x86/include/asm/msr.h b/arch/x86/include/asm/msr.h
index 0205643c1ece..b0bf1a761a40 100644
--- a/arch/x86/include/asm/msr.h
+++ b/arch/x86/include/asm/msr.h
@@ -260,7 +260,6 @@ int rdmsrq_on_cpu(unsigned int cpu, u32 msr_no, u64 *q);
int wrmsrq_on_cpu(unsigned int cpu, u32 msr_no, u64 q);
void rdmsr_on_cpus(const struct cpumask *mask, u32 msr_no, struct msr __percpu *msrs);
void wrmsr_on_cpus(const struct cpumask *mask, u32 msr_no, struct msr __percpu *msrs);
-int rdmsr_safe_on_cpu(unsigned int cpu, u32 msr_no, u32 *l, u32 *h);
int wrmsr_safe_on_cpu(unsigned int cpu, u32 msr_no, u32 l, u32 h);
int rdmsrq_safe_on_cpu(unsigned int cpu, u32 msr_no, u64 *q);
int wrmsrq_safe_on_cpu(unsigned int cpu, u32 msr_no, u64 q);
@@ -287,11 +286,6 @@ static inline void wrmsr_on_cpus(const struct cpumask *m, u32 msr_no,
{
wrmsrq_on_cpu(0, msr_no, raw_cpu_read(msrs->q));
}
-static inline int rdmsr_safe_on_cpu(unsigned int cpu, u32 msr_no,
- u32 *l, u32 *h)
-{
- return rdmsr_safe(msr_no, l, h);
-}
static inline int wrmsr_safe_on_cpu(unsigned int cpu, u32 msr_no, u32 l, u32 h)
{
return wrmsr_safe(msr_no, l, h);
diff --git a/arch/x86/lib/msr-smp.c b/arch/x86/lib/msr-smp.c
index f3c75b681603..f58e0bab0be0 100644
--- a/arch/x86/lib/msr-smp.c
+++ b/arch/x86/lib/msr-smp.c
@@ -132,30 +132,6 @@ static void __wrmsr_safe_on_cpu(void *info)
rv->err = wrmsr_safe(rv->msr_no, rv->reg.l, rv->reg.h);
}
-int rdmsr_safe_on_cpu(unsigned int cpu, u32 msr_no, u32 *l, u32 *h)
-{
- struct msr_info_completion rv;
- call_single_data_t csd;
- int err;
-
- INIT_CSD(&csd, __rdmsr_safe_on_cpu, &rv);
-
- memset(&rv, 0, sizeof(rv));
- init_completion(&rv.done);
- rv.msr.msr_no = msr_no;
-
- err = smp_call_function_single_async(cpu, &csd);
- if (!err) {
- wait_for_completion(&rv.done);
- err = rv.msr.err;
- }
- *l = rv.msr.reg.l;
- *h = rv.msr.reg.h;
-
- return err;
-}
-EXPORT_SYMBOL(rdmsr_safe_on_cpu);
-
int wrmsr_safe_on_cpu(unsigned int cpu, u32 msr_no, u32 l, u32 h)
{
int err;
--
2.54.0
next prev parent reply other threads:[~2026-06-05 14:44 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-05 14:43 [PATCH v2 00/10] x86/msr: Drop 32-bit variants of *_on_cpu() MSR functions Juergen Gross
2026-06-05 14:43 ` [PATCH v2 01/10] x86/msr: Switch rdmsrl_on_cpu() users to rdmsrq_on_cpu() Juergen Gross
2026-06-05 14:43 ` [PATCH v2 02/10] x86/msr: Remove rdmsrl_on_cpu() Juergen Gross
2026-06-05 14:43 ` [PATCH v2 03/10] x86/msr: Switch rdmsr_on_cpu() users to rdmsrq_on_cpu() Juergen Gross
2026-06-05 14:43 ` [PATCH v2 04/10] x86/msr: Remove rdmsr_on_cpu() Juergen Gross
2026-06-05 14:43 ` [PATCH v2 05/10] x86/msr: Switch wrmsr_on_cpu() users to wrmsrq_on_cpu() Juergen Gross
2026-06-05 14:43 ` [PATCH v2 06/10] x86/msr: Remove wrmsr_on_cpu() Juergen Gross
2026-06-05 14:43 ` [PATCH v2 07/10] x86/msr: Switch rdmsr_safe_on_cpu() users to rdmsrq_safe_on_cpu() Juergen Gross
2026-06-05 15:04 ` Dave Hansen
2026-06-06 9:51 ` Ingo Molnar
2026-06-07 6:31 ` Jürgen Groß
2026-06-07 6:45 ` Ingo Molnar
2026-06-07 6:48 ` Juergen Gross
2026-06-05 14:43 ` Juergen Gross [this message]
2026-06-05 15:05 ` [PATCH v2 08/10] x86/msr: Remove rdmsr_safe_on_cpu() Dave Hansen
2026-06-05 14:43 ` [PATCH v2 09/10] x86/msr: Switch wrmsr_safe_on_cpu() users to wrmsrq_safe_on_cpu() Juergen Gross
2026-06-05 14:43 ` [PATCH v2 10/10] x86/msr: Remove wrmsr_safe_on_cpu() Juergen Gross
2026-06-05 15:08 ` [PATCH v2 00/10] x86/msr: Drop 32-bit variants of *_on_cpu() MSR functions Dave Hansen
2026-06-05 15:09 ` Jürgen Groß
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=20260605144314.3031049-9-jgross@suse.com \
--to=jgross@suse.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@kernel.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®