Now that timer.h ended up with CONFIG_PARAVIRT #ifdeffery anyways, move the PARAVIRT=n using_native_sched_clock() stub into timer.h as a "free" optimization.
No functional change intended. Reviewed-by: David Woodhouse <[email protected]> Signed-off-by: Sean Christopherson <[email protected]> --- arch/x86/include/asm/timer.h | 6 ++++-- arch/x86/kernel/tsc.c | 2 -- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/x86/include/asm/timer.h b/arch/x86/include/asm/timer.h index ca5c95d48c03..a52388af6055 100644 --- a/arch/x86/include/asm/timer.h +++ b/arch/x86/include/asm/timer.h @@ -11,9 +11,9 @@ extern void recalibrate_cpu_khz(void); extern int no_timer_check; -extern bool using_native_sched_clock(void); - #ifdef CONFIG_PARAVIRT +extern bool using_native_sched_clock(void); + int __init __paravirt_set_sched_clock(u64 (*func)(void), bool stable, void (*save)(void), void (*restore)(void)); @@ -23,6 +23,8 @@ static __always_inline void paravirt_set_sched_clock(u64 (*func)(void), { (void)__paravirt_set_sched_clock(func, true, save, restore); } +#else +static inline bool using_native_sched_clock(void) { return true; } #endif /* diff --git a/arch/x86/kernel/tsc.c b/arch/x86/kernel/tsc.c index 036916953f4a..159d7d060204 100644 --- a/arch/x86/kernel/tsc.c +++ b/arch/x86/kernel/tsc.c @@ -302,8 +302,6 @@ int __init __paravirt_set_sched_clock(u64 (*func)(void), bool stable, } #else u64 sched_clock_noinstr(void) __attribute__((alias("native_sched_clock"))); - -bool using_native_sched_clock(void) { return true; } #endif notrace u64 sched_clock(void) -- 2.54.0.823.g6e5bcc1fc9-goog

