Skip to content

Commit ee9ffcf

Browse files
jgross1bp3tk0v
authored andcommitted
riscv/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: Andrew Jones <ajones@ventanamicro.com> Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://patch.msgid.link/20260105110520.21356-11-jgross@suse.com
1 parent b8431b9 commit ee9ffcf

3 files changed

Lines changed: 1 addition & 17 deletions

File tree

arch/riscv/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1111,6 +1111,7 @@ config COMPAT
11111111
config PARAVIRT
11121112
bool "Enable paravirtualization code"
11131113
depends on RISCV_SBI
1114+
select HAVE_PV_STEAL_CLOCK_GEN
11141115
help
11151116
This changes the kernel so it can modify itself when it is run
11161117
under a hypervisor, potentially improving performance significantly

arch/riscv/include/asm/paravirt.h

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,6 @@
33
#define _ASM_RISCV_PARAVIRT_H
44

55
#ifdef CONFIG_PARAVIRT
6-
#include <linux/static_call_types.h>
7-
8-
u64 dummy_steal_clock(int cpu);
9-
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-
}
166

177
int __init pv_time_init(void);
188

arch/riscv/kernel/paravirt.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,6 @@
2323
#include <asm/paravirt.h>
2424
#include <asm/sbi.h>
2525

26-
static u64 native_steal_clock(int cpu)
27-
{
28-
return 0;
29-
}
30-
31-
DEFINE_STATIC_CALL(pv_steal_clock, native_steal_clock);
32-
3326
static bool steal_acc = true;
3427
static int __init parse_no_stealacc(char *arg)
3528
{

0 commit comments

Comments
 (0)