Skip to content

Commit fc48a6d

Browse files
sean-jcKAGA-KOKO
authored andcommitted
x86/cpu: Remove write_tsc() and write_rdtscp_aux() wrappers
Drop write_tsc() and write_rdtscp_aux(); the former has no users, and the latter has only a single user and is slightly misleading since the only in-kernel consumer of MSR_TSC_AUX is RDPID, not RDTSCP. No functional change intended. Signed-off-by: Sean Christopherson <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent b6b4fbd commit fc48a6d

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

arch/x86/include/asm/msr.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -324,10 +324,6 @@ static inline int wrmsrl_safe(u32 msr, u64 val)
324324
return wrmsr_safe(msr, (u32)val, (u32)(val >> 32));
325325
}
326326

327-
#define write_tsc(low, high) wrmsr(MSR_IA32_TSC, (low), (high))
328-
329-
#define write_rdtscp_aux(val) wrmsr(MSR_TSC_AUX, (val), 0)
330-
331327
struct msr *msrs_alloc(void);
332328
void msrs_free(struct msr *msrs);
333329
int msr_set_bit(u32 msr, u8 bit);

arch/x86/kernel/cpu/common.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1852,7 +1852,7 @@ static inline void setup_getcpu(int cpu)
18521852
struct desc_struct d = { };
18531853

18541854
if (boot_cpu_has(X86_FEATURE_RDTSCP) || boot_cpu_has(X86_FEATURE_RDPID))
1855-
write_rdtscp_aux(cpudata);
1855+
wrmsr(MSR_TSC_AUX, cpudata, 0);
18561856

18571857
/* Store CPU and node number in limit. */
18581858
d.limit0 = cpudata;

0 commit comments

Comments
 (0)