summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2025-04-13 20:43:16 +0200
committerIngo Molnar <mingo@kernel.org>2025-04-13 20:50:38 +0200
commita5447e92e169dafaf02fd653500105c7186d7128 (patch)
tree0acefed4c7239b135be1c78e2d409dc374cbd2e6
parenteef476f15c8350078efb48bd9b9f3ff50ae1bbbb (diff)
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 <mingo@kernel.org> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Peter Zijlstra (Intel) <peterz@infradead.org> Cc: Juergen Gross <jgross@suse.com> Cc: Dave Hansen <dave.hansen@intel.com> Cc: Xin Li <xin@zytor.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: linux-kernel@vger.kernel.org
-rw-r--r--arch/x86/include/asm/msr.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/x86/include/asm/msr.h b/arch/x86/include/asm/msr.h
index 20deb58308e5..2ccc78ebc3d7 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 */