virtualization.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
From: Juergen Gross <jgross@suse.com>
To: linux-kernel@vger.kernel.org, x86@kernel.org,
	virtualization@lists.linux.dev
Cc: Juergen Gross <jgross@suse.com>,
	Ajay Kaher <ajay.kaher@broadcom.com>,
	Alexey Makhalov <alexey.makhalov@broadcom.com>,
	Broadcom internal kernel review list
	<bcm-kernel-feedback-list@broadcom.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	"H. Peter Anvin" <hpa@zytor.com>
Subject: [PATCH v4 14/21] x86/paravirt: Move pv_native_*() prototypes to paravirt.c
Date: Thu, 27 Nov 2025 08:08:37 +0100	[thread overview]
Message-ID: <20251127070844.21919-15-jgross@suse.com> (raw)
In-Reply-To: <20251127070844.21919-1-jgross@suse.com>

The only reason the pv_native_*() prototypes are needed is the complete
definition of those functions via an asm() statement, which makes it
impossible to have those functions as static ones.

Move the prototypes from paravirt_types.h into paravirt.c, which is the
only source referencing the functions.

Signed-off-by: Juergen Gross <jgross@suse.com>
---
V2:
- new patch
---
 arch/x86/include/asm/paravirt_types.h | 7 -------
 arch/x86/kernel/paravirt.c            | 5 +++++
 2 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/arch/x86/include/asm/paravirt_types.h b/arch/x86/include/asm/paravirt_types.h
index 148d157e2a4a..1e50f13e6543 100644
--- a/arch/x86/include/asm/paravirt_types.h
+++ b/arch/x86/include/asm/paravirt_types.h
@@ -480,13 +480,6 @@ extern struct paravirt_patch_template pv_ops;
 	__PVOP_VCALL(op, PVOP_CALL_ARG1(arg1), PVOP_CALL_ARG2(arg2),	\
 		     PVOP_CALL_ARG3(arg3), PVOP_CALL_ARG4(arg4))
 
-#ifdef CONFIG_PARAVIRT_XXL
-unsigned long pv_native_save_fl(void);
-void pv_native_irq_disable(void);
-void pv_native_irq_enable(void);
-unsigned long pv_native_read_cr2(void);
-#endif
-
 #endif	/* __ASSEMBLER__ */
 
 #define ALT_NOT_XEN	ALT_NOT(X86_FEATURE_XENPV)
diff --git a/arch/x86/kernel/paravirt.c b/arch/x86/kernel/paravirt.c
index 4e37db8073f9..5dfbd3f55792 100644
--- a/arch/x86/kernel/paravirt.c
+++ b/arch/x86/kernel/paravirt.c
@@ -45,6 +45,11 @@ void __init default_banner(void)
 }
 
 #ifdef CONFIG_PARAVIRT_XXL
+unsigned long pv_native_save_fl(void);
+void pv_native_irq_disable(void);
+void pv_native_irq_enable(void);
+unsigned long pv_native_read_cr2(void);
+
 DEFINE_ASM_FUNC(_paravirt_ident_64, "mov %rdi, %rax", .text);
 DEFINE_ASM_FUNC(pv_native_save_fl, "pushf; pop %rax", .noinstr.text);
 DEFINE_ASM_FUNC(pv_native_irq_disable, "cli", .noinstr.text);
-- 
2.51.0


  parent reply	other threads:[~2025-11-27  7:10 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-27  7:08 [PATCH v4 00/21] paravirt: cleanup and reorg Juergen Gross
2025-11-27  7:08 ` [PATCH v4 02/21] x86/paravirt: Remove some unneeded struct declarations Juergen Gross
2025-11-27  7:08 ` [PATCH v4 03/21] x86/paravirt: Remove PARAVIRT_DEBUG config option Juergen Gross
2025-11-27  7:08 ` [PATCH v4 04/21] x86/paravirt: Move thunk macros to paravirt_types.h Juergen Gross
2025-11-27  7:08 ` [PATCH v4 05/21] paravirt: Remove asm/paravirt_api_clock.h Juergen Gross
2025-11-27  7:08 ` [PATCH v4 06/21] sched: Move clock related paravirt code to kernel/sched Juergen Gross
2025-11-27  7:08 ` [PATCH v4 07/21] arm/paravirt: Use common code for paravirt_steal_clock() Juergen Gross
2025-11-27  7:08 ` [PATCH v4 08/21] arm64/paravirt: " Juergen Gross
2025-11-27  7:08 ` [PATCH v4 09/21] loongarch/paravirt: " Juergen Gross
2025-11-27  7:08 ` [PATCH v4 10/21] riscv/paravirt: " Juergen Gross
2025-11-27  7:08 ` [PATCH v4 11/21] x86/paravirt: " Juergen Gross
2025-11-27  7:08 ` [PATCH v4 12/21] x86/paravirt: Move paravirt_sched_clock() related code into tsc.c Juergen Gross
2025-11-27  7:08 ` [PATCH v4 13/21] x86/paravirt: Introduce new paravirt-base.h header Juergen Gross
2025-11-27  7:08 ` Juergen Gross [this message]
2025-11-27  7:08 ` [PATCH v4 19/21] x86/paravirt: Allow pv-calls outside paravirt.h Juergen Gross
2025-11-27  7:08 ` [PATCH v4 20/21] x86/paravirt: Specify pv_ops array in paravirt macros Juergen Gross
2025-11-27  7:08 ` [PATCH v4 21/21] x86/pvlocks: Move paravirt spinlock functions into own header Juergen Gross
2025-11-27  9:24   ` kernel test robot
2025-11-27  9:24   ` kernel test robot
2025-12-15  8:27 ` [PATCH v4 00/21] paravirt: cleanup and reorg Juergen Gross

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=20251127070844.21919-15-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=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --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;
as well as URLs for NNTP newsgroup(s).