Remove some inline assembly code duplication and opportunistically replace the magic constant, "0x10," with "MSR_IA32_TSC." Signed-off-by: Jim Mattson <jmattson@xxxxxxxxxx> --- lib/x86/processor.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/x86/processor.h b/lib/x86/processor.h index fe5add548261..117032a4895c 100644 --- a/lib/x86/processor.h +++ b/lib/x86/processor.h @@ -592,9 +592,7 @@ static inline unsigned long long rdtscp(u32 *aux) static inline void wrtsc(u64 tsc) { - unsigned a = tsc, d = tsc >> 32; - - asm volatile("wrmsr" : : "a"(a), "d"(d), "c"(0x10)); + wrmsr(MSR_IA32_TSC, tsc); } static inline void irq_disable(void) -- 2.35.0.rc2.247.g8bbb082509-goog