]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
x86/msr: Add compatibility wrappers for rdmsrl()/wrmsrl()
authorIngo Molnar <mingo@kernel.org>
Sun, 13 Apr 2025 18:43:16 +0000 (20:43 +0200)
committerIngo Molnar <mingo@kernel.org>
Sun, 13 Apr 2025 18:50:38 +0000 (20:50 +0200)
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
arch/x86/include/asm/msr.h

index 20deb58308e5ea1883ebc2ea6ab297c2ad0522d6..2ccc78ebc3d73808515724e4f9c6c0c2ef125b2b 100644 (file)
@@ -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 */