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.

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

authored by

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

+1 -17
+1
arch/loongarch/Kconfig
··· 687 687 config PARAVIRT 688 688 bool "Enable paravirtualization code" 689 689 depends on AS_HAS_LVZ_EXTENSION 690 + select HAVE_PV_STEAL_CLOCK_GEN 690 691 help 691 692 This changes the kernel so it can modify itself when it is run 692 693 under a hypervisor, potentially improving performance significantly
-10
arch/loongarch/include/asm/paravirt.h
··· 4 4 5 5 #ifdef CONFIG_PARAVIRT 6 6 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 - 17 7 int __init pv_ipi_init(void); 18 8 int __init pv_time_init(void); 19 9 int __init pv_spinlock_init(void);
-7
arch/loongarch/kernel/paravirt.c
··· 13 13 static DEFINE_PER_CPU(struct kvm_steal_time, steal_time) __aligned(64); 14 14 DEFINE_STATIC_KEY_FALSE(virt_spin_lock_key); 15 15 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 - 23 16 static bool steal_acc = true; 24 17 25 18 static int __init parse_no_stealacc(char *arg)