From: Juergen Gross <jgross@suse.com>
To: linux-kernel@vger.kernel.org, loongarch@lists.linux.dev,
virtualization@lists.linux.dev, x86@kernel.org
Cc: Juergen Gross <jgross@suse.com>,
Huacai Chen <chenhuacai@kernel.org>,
WANG Xuerui <kernel@xen0n.name>,
Ajay Kaher <ajay.kaher@broadcom.com>,
Alexey Makhalov <alexey.makhalov@broadcom.com>,
Broadcom internal kernel review list
<bcm-kernel-feedback-list@broadcom.com>,
"Peter Zijlstra (Intel)" <peterz@infradead.org>
Subject: [PATCH v3 09/21] loongarch/paravirt: Use common code for paravirt_steal_clock()
Date: Mon, 6 Oct 2025 09:45:54 +0200 [thread overview]
Message-ID: <20251006074606.1266-10-jgross@suse.com> (raw)
In-Reply-To: <20251006074606.1266-1-jgross@suse.com>
Remove the arch specific variant of paravirt_steal_clock() and use
the common one instead.
Signed-off-by: Juergen Gross <jgross@suse.com>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
---
arch/loongarch/Kconfig | 1 +
arch/loongarch/include/asm/paravirt.h | 10 ----------
arch/loongarch/kernel/paravirt.c | 7 -------
3 files changed, 1 insertion(+), 17 deletions(-)
diff --git a/arch/loongarch/Kconfig b/arch/loongarch/Kconfig
index ea683bcea14c..7a9d1d0edc92 100644
--- a/arch/loongarch/Kconfig
+++ b/arch/loongarch/Kconfig
@@ -671,6 +671,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
diff --git a/arch/loongarch/include/asm/paravirt.h b/arch/loongarch/include/asm/paravirt.h
index d219ea0d98ac..0111f0ad5f73 100644
--- a/arch/loongarch/include/asm/paravirt.h
+++ b/arch/loongarch/include/asm/paravirt.h
@@ -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);
diff --git a/arch/loongarch/kernel/paravirt.c b/arch/loongarch/kernel/paravirt.c
index 8caaa94fed1a..c5e526098c0b 100644
--- a/arch/loongarch/kernel/paravirt.c
+++ b/arch/loongarch/kernel/paravirt.c
@@ -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)
--
2.51.0
next prev parent reply other threads:[~2025-10-06 7:47 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-06 7:45 [PATCH v3 00/21] paravirt: cleanup and reorg Juergen Gross
2025-10-06 7:45 ` [PATCH v3 02/21] x86/paravirt: Remove some unneeded struct declarations Juergen Gross
2025-10-23 12:14 ` Borislav Petkov
2025-10-06 7:45 ` [PATCH v3 03/21] x86/paravirt: Remove PARAVIRT_DEBUG config option Juergen Gross
2025-10-06 7:45 ` [PATCH v3 04/21] x86/paravirt: Move thunk macros to paravirt_types.h Juergen Gross
2025-10-06 7:45 ` [PATCH v3 05/21] paravirt: Remove asm/paravirt_api_clock.h Juergen Gross
2025-10-15 16:02 ` Shrikanth Hegde
2025-10-06 7:45 ` [PATCH v3 06/21] sched: Move clock related paravirt code to kernel/sched Juergen Gross
2026-01-07 22:48 ` Alexey Makhalov
2025-10-06 7:45 ` [PATCH v3 07/21] arm/paravirt: Use common code for paravirt_steal_clock() Juergen Gross
2025-10-06 7:45 ` [PATCH v3 08/21] arm64/paravirt: " Juergen Gross
2025-10-06 7:45 ` Juergen Gross [this message]
2025-11-24 9:52 ` [PATCH v3 09/21] loongarch/paravirt: " Bibo Mao
2025-10-06 7:45 ` [PATCH v3 10/21] riscv/paravirt: " Juergen Gross
2025-10-06 7:45 ` [PATCH v3 11/21] x86/paravirt: " Juergen Gross
2025-10-06 7:45 ` [PATCH v3 12/21] x86/paravirt: Move paravirt_sched_clock() related code into tsc.c Juergen Gross
2025-10-06 7:45 ` [PATCH v3 13/21] x86/paravirt: Introduce new paravirt-base.h header Juergen Gross
2025-10-06 7:45 ` [PATCH v3 14/21] x86/paravirt: Move pv_native_*() prototypes to paravirt.c Juergen Gross
2025-10-06 7:46 ` [PATCH v3 19/21] x86/paravirt: Allow pv-calls outside paravirt.h Juergen Gross
2025-10-06 7:46 ` [PATCH v3 20/21] x86/paravirt: Specify pv_ops array in paravirt macros Juergen Gross
2025-10-06 7:46 ` [PATCH v3 21/21] x86/pvlocks: Move paravirt spinlock functions into own header Juergen Gross
2025-10-15 8:53 ` kernel test robot
2025-11-24 9:42 ` [PATCH v3 00/21] paravirt: cleanup and reorg Juergen Gross
2026-02-20 4:10 ` patchwork-bot+linux-riscv
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251006074606.1266-10-jgross@suse.com \
--to=jgross@suse.com \
--cc=ajay.kaher@broadcom.com \
--cc=alexey.makhalov@broadcom.com \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=chenhuacai@kernel.org \
--cc=kernel@xen0n.name \
--cc=linux-kernel@vger.kernel.org \
--cc=loongarch@lists.linux.dev \
--cc=peterz@infradead.org \
--cc=virtualization@lists.linux.dev \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox