]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
x86/paravirt: Move pv_native_*() prototypes to paravirt.c
authorJuergen Gross <jgross@suse.com>
Mon, 5 Jan 2026 11:05:13 +0000 (12:05 +0100)
committerBorislav Petkov (AMD) <bp@alien8.de>
Mon, 12 Jan 2026 18:14:06 +0000 (19:14 +0100)
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>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Link: https://patch.msgid.link/20260105110520.21356-15-jgross@suse.com
arch/x86/include/asm/paravirt_types.h
arch/x86/kernel/paravirt.c

index d7c38e5c0afc9e73debabf650a088aa4fe46fb92..0d8ea13f2c3160641ce7e05dd352ab3a6d966b81 100644 (file)
@@ -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)
index 4e37db8073f92d025da882bfbdd51eccf17863da..5dfbd3f557924573aae27ad9a36a6020a265d815 100644 (file)
@@ -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);