diff options
| author | Juergen Gross <jgross@suse.com> | 2026-06-08 07:17:39 +0200 |
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2026-06-08 10:01:49 +0200 |
| commit | d2eb65a9aa061a3ee1f42bc0cdfe9ecffaf267fb (patch) | |
| tree | 47e6005d6ae46d5c4c2546bfda22b1a58c99f5b7 | |
| parent | 91660aae2f864850f5e5494f6548ce3e534e6d4c (diff) | |
x86/msr: Remove rdmsr_safe_on_cpu()
rdmsr_safe_on_cpu() has no users left. Delete it.
Tested-by: K Prateek Nayak <kprateek.nayak@amd.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Reviewed-by: Dave Hansen <dave.hansen@linux.intel.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Link: https://patch.msgid.link/20260608051741.3207435-10-jgross@suse.com
| -rw-r--r-- | arch/x86/include/asm/msr.h | 6 | ||||
| -rw-r--r-- | arch/x86/lib/msr-smp.c | 24 |
2 files changed, 0 insertions, 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; |
