]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
riscv/paravirt: Use common code for paravirt_steal_clock()
authorJuergen Gross <jgross@suse.com>
Mon, 5 Jan 2026 11:05:09 +0000 (12:05 +0100)
committerBorislav Petkov (AMD) <bp@alien8.de>
Mon, 12 Jan 2026 15:47:33 +0000 (16:47 +0100)
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
arch/riscv/Kconfig
arch/riscv/include/asm/paravirt.h
arch/riscv/kernel/paravirt.c

index 6b39f37f769a29f6fd31db75a57dbc113df3a8ce..80a4cd557198927935aa48d0ce2fb5c8309f619b 100644 (file)
@@ -1111,6 +1111,7 @@ config COMPAT
 config PARAVIRT
        bool "Enable paravirtualization code"
        depends on RISCV_SBI
+       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
index 17e5e39c72c023af69a8d851346fae3f48253fc7..c49c55b266f35ade241cb3b87e7ea5cbc093e232 100644 (file)
@@ -3,16 +3,6 @@
 #define _ASM_RISCV_PARAVIRT_H
 
 #ifdef CONFIG_PARAVIRT
-#include <linux/static_call_types.h>
-
-u64 dummy_steal_clock(int cpu);
-
-DECLARE_STATIC_CALL(pv_steal_clock, dummy_steal_clock);
-
-static inline u64 paravirt_steal_clock(int cpu)
-{
-       return static_call(pv_steal_clock)(cpu);
-}
 
 int __init pv_time_init(void);
 
index d3c334f161725c7d9598079906b750ab934eca50..5f56be79cd062a70d505156b2ff93f92e2287a13 100644 (file)
 #include <asm/paravirt.h>
 #include <asm/sbi.h>
 
-static u64 native_steal_clock(int cpu)
-{
-       return 0;
-}
-
-DEFINE_STATIC_CALL(pv_steal_clock, native_steal_clock);
-
 static bool steal_acc = true;
 static int __init parse_no_stealacc(char *arg)
 {