Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

authored by

Juergen Gross and committed by
Borislav Petkov (AMD)
ee9ffcf9 b8431b90

+1 -17
+1
arch/riscv/Kconfig
··· 1111 1111 config PARAVIRT 1112 1112 bool "Enable paravirtualization code" 1113 1113 depends on RISCV_SBI 1114 + select HAVE_PV_STEAL_CLOCK_GEN 1114 1115 help 1115 1116 This changes the kernel so it can modify itself when it is run 1116 1117 under a hypervisor, potentially improving performance significantly
-10
arch/riscv/include/asm/paravirt.h
··· 3 3 #define _ASM_RISCV_PARAVIRT_H 4 4 5 5 #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 - } 16 6 17 7 int __init pv_time_init(void); 18 8
-7
arch/riscv/kernel/paravirt.c
··· 23 23 #include <asm/paravirt.h> 24 24 #include <asm/sbi.h> 25 25 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 - 33 26 static bool steal_acc = true; 34 27 static int __init parse_no_stealacc(char *arg) 35 28 {