提交 fc48a6d1 编写于 作者: S Sean Christopherson 提交者: Thomas Gleixner

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: NSean Christopherson <seanjc@google.com>
Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20210504225632.1532621-3-seanjc@google.com
上级 b6b4fbd9
...@@ -324,10 +324,6 @@ static inline int wrmsrl_safe(u32 msr, u64 val) ...@@ -324,10 +324,6 @@ static inline int wrmsrl_safe(u32 msr, u64 val)
return wrmsr_safe(msr, (u32)val, (u32)(val >> 32)); return wrmsr_safe(msr, (u32)val, (u32)(val >> 32));
} }
#define write_tsc(low, high) wrmsr(MSR_IA32_TSC, (low), (high))
#define write_rdtscp_aux(val) wrmsr(MSR_TSC_AUX, (val), 0)
struct msr *msrs_alloc(void); struct msr *msrs_alloc(void);
void msrs_free(struct msr *msrs); void msrs_free(struct msr *msrs);
int msr_set_bit(u32 msr, u8 bit); int msr_set_bit(u32 msr, u8 bit);
......
...@@ -1852,7 +1852,7 @@ static inline void setup_getcpu(int cpu) ...@@ -1852,7 +1852,7 @@ static inline void setup_getcpu(int cpu)
struct desc_struct d = { }; struct desc_struct d = { };
if (boot_cpu_has(X86_FEATURE_RDTSCP) || boot_cpu_has(X86_FEATURE_RDPID)) if (boot_cpu_has(X86_FEATURE_RDTSCP) || boot_cpu_has(X86_FEATURE_RDPID))
write_rdtscp_aux(cpudata); wrmsr(MSR_TSC_AUX, cpudata, 0);
/* Store CPU and node number in limit. */ /* Store CPU and node number in limit. */
d.limit0 = cpudata; d.limit0 = cpudata;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册