[tip: x86/msr] x86/msr: Use u64 in rdmsrl_safe() and paravirt_read_pmc()

From: tip-bot2 for Ingo Molnar
Date: Sun Apr 13 2025 - 14:59:07 EST


The following commit has been merged into the x86/msr branch of tip:

Commit-ID: cd905826cbc833b7494573998bd1c407dfa7924f
Gitweb: https://git.kernel.org/tip/cd905826cbc833b7494573998bd1c407dfa7924f
Author: Ingo Molnar <mingo@xxxxxxxxxx>
AuthorDate: Wed, 09 Apr 2025 22:28:51 +02:00
Committer: Ingo Molnar <mingo@xxxxxxxxxx>
CommitterDate: Thu, 10 Apr 2025 11:58:07 +02:00

x86/msr: Use u64 in rdmsrl_safe() and paravirt_read_pmc()

The paravirt_read_pmc() result is in fact only loaded into an u64 variable.

Signed-off-by: Ingo Molnar <mingo@xxxxxxxxxx>
Acked-by: Peter Zijlstra (Intel) <peterz@xxxxxxxxxxxxx>
Cc: Juergen Gross <jgross@xxxxxxxx>
Cc: H. Peter Anvin <hpa@xxxxxxxxx>
Cc: Dave Hansen <dave.hansen@xxxxxxxxx>
Cc: Xin Li <xin@xxxxxxxxx>
Cc: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
---
arch/x86/include/asm/paravirt.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86/include/asm/paravirt.h b/arch/x86/include/asm/paravirt.h
index c4c2319..c270ca0 100644
--- a/arch/x86/include/asm/paravirt.h
+++ b/arch/x86/include/asm/paravirt.h
@@ -231,7 +231,7 @@ static inline void wrmsrl(unsigned msr, u64 val)
_err; \
})

-static inline int rdmsrl_safe(unsigned msr, unsigned long long *p)
+static inline int rdmsrl_safe(unsigned msr, u64 *p)
{
int err;

@@ -239,7 +239,7 @@ static inline int rdmsrl_safe(unsigned msr, unsigned long long *p)
return err;
}

-static inline unsigned long long paravirt_read_pmc(int counter)
+static inline u64 paravirt_read_pmc(int counter)
{
return PVOP_CALL1(u64, cpu.read_pmc, counter);
}