From: Dave Hansen <[email protected]>

I'm not sure any of this makes sense any more. The kernel only
runs on "586 and better". The comment about gcc optimization is
hopefully decades out of date too.

Really, the only reason to keep the wonky semantics where the
parameters get modified is to avoid all the churn to make them sane.
Not gcc. gcc was probably a bad reason, even back in the day because
MSRs are mostly very slow and have always been very slow. A few
extra bytes of register shuffling was probably never measurable.

Signed-off-by: Dave Hansen <[email protected]>
---

 b/arch/x86/include/asm/msr.h |    6 ------
 1 file changed, 6 deletions(-)

diff -puN arch/x86/include/asm/msr.h~rdmsr-dups-10 arch/x86/include/asm/msr.h
--- a/arch/x86/include/asm/msr.h~rdmsr-dups-10  2026-03-20 11:24:21.571905418 
-0700
+++ b/arch/x86/include/asm/msr.h        2026-03-20 11:24:21.574905551 -0700
@@ -187,12 +187,6 @@ static inline u64 native_read_pmc(int co
 #define raw_write_msr_safe     native_write_msr_safe
 #define raw_read_pmc           native_read_pmc
 
-/*
- * Access to machine-specific registers (available on 586 and better only)
- * Note: the rd* operations modify the parameters directly (without using
- * pointer indirection), this allows gcc to optimize better
- */
-
 #endif /* !CONFIG_PARAVIRT_XXL */
 
 /*
_

Reply via email to