From nobody Mon Dec 1 22:34:54 2025 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C0B15315789 for ; Thu, 27 Nov 2025 07:09:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764227391; cv=none; b=H2HZJoTnQBXWGC3i8wVxO7bsk0gIVWI8/PgJsmj0qqvyDI60lLPegU81bNX4JfWIfJi7sUoHd792GO5XcTkZEmWEq/cw7F+RW86K+IpBaar+BYo0oHs60bGWh62C7unp5oNRUfCRoLXZ1uN9BuOxRiBm6cjqI7YmTzsfkIesnnQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764227391; c=relaxed/simple; bh=gKxhS+JP3h2VBoKBSYy1bjyd2nhOnXnwuQXxTsSP2Co=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=DxwLuWmBsqtkgtWcBJ5REdCdcOw0G03voF1bmagkLy0RD2Nd5eN5mf1rhw0EHgHItMs1Aj/+iWEqv748Oc3kjzKwnD6vhV3iEm0wF84lgS9hy7XrOlMuGhRY1Uo2tgdk2K+YYDX/mH54tHs5hR2svRuyIJqo+MWl3gYE9R8Ewtc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; arc=none smtp.client-ip=195.135.223.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 092515BCC4; Thu, 27 Nov 2025 07:09:48 +0000 (UTC) Authentication-Results: smtp-out2.suse.de; none Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 944343EA63; Thu, 27 Nov 2025 07:09:47 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id KpXDIjv5J2myXQAAD6G6ig (envelope-from ); Thu, 27 Nov 2025 07:09:47 +0000 From: Juergen Gross To: linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, virtualization@lists.linux.dev, x86@kernel.org Cc: Juergen Gross , Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Ghiti , Ajay Kaher , Alexey Makhalov , Broadcom internal kernel review list , "Peter Zijlstra (Intel)" , Andrew Jones Subject: [PATCH v4 10/21] riscv/paravirt: Use common code for paravirt_steal_clock() Date: Thu, 27 Nov 2025 08:08:33 +0100 Message-ID: <20251127070844.21919-11-jgross@suse.com> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20251127070844.21919-1-jgross@suse.com> References: <20251127070844.21919-1-jgross@suse.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spam-Flag: NO X-Spam-Score: -4.00 X-Spam-Level: X-Spamd-Result: default: False [-4.00 / 50.00]; REPLY(-4.00)[] X-Rspamd-Queue-Id: 092515BCC4 X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Action: no action X-Rspamd-Server: rspamd1.dmz-prg2.suse.org Content-Type: text/plain; charset="utf-8" Remove the arch specific variant of paravirt_steal_clock() and use the common one instead. Signed-off-by: Juergen Gross Acked-by: Peter Zijlstra (Intel) Reviewed-by: Andrew Jones --- arch/riscv/Kconfig | 1 + arch/riscv/include/asm/paravirt.h | 10 ---------- arch/riscv/kernel/paravirt.c | 7 ------- 3 files changed, 1 insertion(+), 17 deletions(-) diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig index fadec20b87a8..6455c57e03fb 100644 --- a/arch/riscv/Kconfig +++ b/arch/riscv/Kconfig @@ -1095,6 +1095,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 diff --git a/arch/riscv/include/asm/paravirt.h b/arch/riscv/include/asm/par= avirt.h index 17e5e39c72c0..c49c55b266f3 100644 --- a/arch/riscv/include/asm/paravirt.h +++ b/arch/riscv/include/asm/paravirt.h @@ -3,16 +3,6 @@ #define _ASM_RISCV_PARAVIRT_H =20 #ifdef CONFIG_PARAVIRT -#include - -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); -} =20 int __init pv_time_init(void); =20 diff --git a/arch/riscv/kernel/paravirt.c b/arch/riscv/kernel/paravirt.c index d3c334f16172..5f56be79cd06 100644 --- a/arch/riscv/kernel/paravirt.c +++ b/arch/riscv/kernel/paravirt.c @@ -23,13 +23,6 @@ #include #include =20 -static u64 native_steal_clock(int cpu) -{ - return 0; -} - -DEFINE_STATIC_CALL(pv_steal_clock, native_steal_clock); - static bool steal_acc =3D true; static int __init parse_no_stealacc(char *arg) { --=20 2.51.0