From: Ingo Molnar Date: Sun, 13 Apr 2025 18:43:16 +0000 (+0200) Subject: x86/msr: Add compatibility wrappers for rdmsrl()/wrmsrl() X-Git-Tag: v6.16-rc1~195^2~25^2~21 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a5447e92e169dafaf02fd653500105c7186d7128;p=thirdparty%2Fkernel%2Flinux.git x86/msr: Add compatibility wrappers for rdmsrl()/wrmsrl() To reduce the impact of the API renames in -next, add compatibility wrappers for the two most popular MSR access APIs: rdmsrl() and wrmsrl(). Signed-off-by: Ingo Molnar Cc: "H. Peter Anvin" Cc: Peter Zijlstra (Intel) Cc: Juergen Gross Cc: Dave Hansen Cc: Xin Li Cc: Linus Torvalds Cc: linux-kernel@vger.kernel.org --- diff --git a/arch/x86/include/asm/msr.h b/arch/x86/include/asm/msr.h index 20deb58308e5e..2ccc78ebc3d73 100644 --- a/arch/x86/include/asm/msr.h +++ b/arch/x86/include/asm/msr.h @@ -396,5 +396,10 @@ static inline int wrmsr_safe_regs_on_cpu(unsigned int cpu, u32 regs[8]) return wrmsr_safe_regs(regs); } #endif /* CONFIG_SMP */ + +/* Compatibility wrappers: */ +#define rdmsrl(msr, val) rdmsrq(msr, val) +#define wrmsrl(msr, val) wrmsrq(msr, val) + #endif /* __ASSEMBLER__ */ #endif /* _ASM_X86_MSR_H */