Commit 50e81871 authored by Thomas Gleixner's avatar Thomas Gleixner

x86/vdso: Mark the TSC clocksource path likely

Jumping out of line for the TSC clcoksource read is creating awful
code. TSC is likely to be the clocksource at least on bare metal and the PV
interfaces are sufficiently more work that the jump over the TSC read is
just in the noise.
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Reviewed-by: default avatarVincenzo Frascino <vincenzo.frascino@arm.com>
Link: https://lkml.kernel.org/r/20200207124402.328922847@linutronix.de
parent 11a48a5a
...@@ -243,7 +243,7 @@ static u64 vread_hvclock(void) ...@@ -243,7 +243,7 @@ static u64 vread_hvclock(void)
static inline u64 __arch_get_hw_counter(s32 clock_mode) static inline u64 __arch_get_hw_counter(s32 clock_mode)
{ {
if (clock_mode == VCLOCK_TSC) if (likely(clock_mode == VCLOCK_TSC))
return (u64)rdtsc_ordered(); return (u64)rdtsc_ordered();
/* /*
* For any memory-mapped vclock type, we need to make sure that gcc * For any memory-mapped vclock type, we need to make sure that gcc
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment