Remove the arch-specific variant of paravirt_steal_clock() and use
the common one instead.
With all archs supporting Xen now having been switched to the common
variant, including paravirt.h can be dropped from drivers/xen/time.c.
Signed-off-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://patch.msgid.link/20260105110520.21356-12-jgross@suse.com
config PARAVIRT
bool "Enable paravirtualization code"
depends on HAVE_STATIC_CALL
+ select HAVE_PV_STEAL_CLOCK_GEN
help
This changes the kernel so it can modify itself when it is run
under a hypervisor, potentially improving performance significantly
#include <linux/static_call_types.h>
#include <asm/frame.h>
-u64 dummy_steal_clock(int cpu);
u64 dummy_sched_clock(void);
-DECLARE_STATIC_CALL(pv_steal_clock, dummy_steal_clock);
DECLARE_STATIC_CALL(pv_sched_clock, dummy_sched_clock);
void paravirt_set_sched_clock(u64 (*func)(void));
__visible bool __native_vcpu_is_preempted(long cpu);
bool pv_is_native_vcpu_is_preempted(void);
-static inline u64 paravirt_steal_clock(int cpu)
-{
- return static_call(pv_steal_clock)(cpu);
-}
-
#ifdef CONFIG_PARAVIRT_SPINLOCKS
void __init paravirt_set_cap(void);
#endif
static_branch_enable(&virt_spin_lock_key);
}
-static u64 native_steal_clock(int cpu)
-{
- return 0;
-}
-
-DEFINE_STATIC_CALL(pv_steal_clock, native_steal_clock);
DEFINE_STATIC_CALL(pv_sched_clock, native_sched_clock);
void paravirt_set_sched_clock(u64 (*func)(void))
#include <linux/slab.h>
#include <linux/pvclock_gtod.h>
#include <linux/timekeeper_internal.h>
+#include <linux/sched/cputime.h>
#include <asm/pvclock.h>
#include <asm/xen/hypervisor.h>
#include <linux/static_call.h>
#include <linux/sched/cputime.h>
-#ifndef CONFIG_HAVE_PV_STEAL_CLOCK_GEN
-#include <asm/paravirt.h>
-#endif
#include <asm/xen/hypervisor.h>
#include <asm/xen/hypercall.h>