]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
loongarch/paravirt: Use common code for paravirt_steal_clock()
authorJuergen Gross <jgross@suse.com>
Mon, 5 Jan 2026 11:05:08 +0000 (12:05 +0100)
committerBorislav Petkov (AMD) <bp@alien8.de>
Mon, 12 Jan 2026 15:47:20 +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: Bibo Mao <maobibo@loongson.cn>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://patch.msgid.link/20260105110520.21356-10-jgross@suse.com
arch/loongarch/Kconfig
arch/loongarch/include/asm/paravirt.h
arch/loongarch/kernel/paravirt.c

index 730f342145197f328d065a2569ab0ce2dc99645c..19f08082a782f4052781566287d5149f85e13f22 100644 (file)
@@ -687,6 +687,7 @@ source "kernel/livepatch/Kconfig"
 config PARAVIRT
        bool "Enable paravirtualization code"
        depends on AS_HAS_LVZ_EXTENSION
+       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 d219ea0d98ac49cc66a23636ba7f981f03352854..0111f0ad5f733b42a8b5f25f0ad62629fef45142 100644 (file)
@@ -4,16 +4,6 @@
 
 #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_ipi_init(void);
 int __init pv_time_init(void);
 int __init pv_spinlock_init(void);
index 8caaa94fed1abaab8e485a9ce6aeee4f8bcab06b..c5e526098c0b1fb733fde1af160a06f86bff36ab 100644 (file)
@@ -13,13 +13,6 @@ static int has_steal_clock;
 static DEFINE_PER_CPU(struct kvm_steal_time, steal_time) __aligned(64);
 DEFINE_STATIC_KEY_FALSE(virt_spin_lock_key);
 
-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)