Skip to content

Commit b8431b9

Browse files
jgross1bp3tk0v
authored andcommitted
loongarch/paravirt: Use common code for paravirt_steal_clock()
Remove the arch specific variant of paravirt_steal_clock() and use the common one instead. Signed-off-by: Juergen Gross <jgross@suse.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Reviewed-by: Bibo Mao <maobibo@loongson.cn> Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://patch.msgid.link/20260105110520.21356-10-jgross@suse.com
1 parent ad892c4 commit b8431b9

3 files changed

Lines changed: 1 addition & 17 deletions

File tree

arch/loongarch/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -687,6 +687,7 @@ source "kernel/livepatch/Kconfig"
687687
config PARAVIRT
688688
bool "Enable paravirtualization code"
689689
depends on AS_HAS_LVZ_EXTENSION
690+
select HAVE_PV_STEAL_CLOCK_GEN
690691
help
691692
This changes the kernel so it can modify itself when it is run
692693
under a hypervisor, potentially improving performance significantly

arch/loongarch/include/asm/paravirt.h

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,6 @@
44

55
#ifdef CONFIG_PARAVIRT
66

7-
#include <linux/static_call_types.h>
8-
9-
u64 dummy_steal_clock(int cpu);
10-
DECLARE_STATIC_CALL(pv_steal_clock, dummy_steal_clock);
11-
12-
static inline u64 paravirt_steal_clock(int cpu)
13-
{
14-
return static_call(pv_steal_clock)(cpu);
15-
}
16-
177
int __init pv_ipi_init(void);
188
int __init pv_time_init(void);
199
int __init pv_spinlock_init(void);

arch/loongarch/kernel/paravirt.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,6 @@ static int has_steal_clock;
1313
static DEFINE_PER_CPU(struct kvm_steal_time, steal_time) __aligned(64);
1414
DEFINE_STATIC_KEY_FALSE(virt_spin_lock_key);
1515

16-
static u64 native_steal_clock(int cpu)
17-
{
18-
return 0;
19-
}
20-
21-
DEFINE_STATIC_CALL(pv_steal_clock, native_steal_clock);
22-
2316
static bool steal_acc = true;
2417

2518
static int __init parse_no_stealacc(char *arg)

0 commit comments

Comments
 (0)