Skip to content

Commit 3d01342

Browse files
committed
x86/xen: add prototypes for paravirt mmu functions
The paravirt MMU functions called via the PV_CALLEE_SAVE_REGS_THUNK() macro can't be defined to be static, as the macro is generating a function via asm() statement calling the paravirt MMU function. In order to avoid warnings when specifying "-Wmissing-prototypes" for the build, add local prototypes (there should never be any external caller of those functions). Reported-by: Arnd Bergmann <[email protected]> Signed-off-by: Juergen Gross <[email protected]> Reviewed-by: Boris Ostrovsky <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Juergen Gross <[email protected]>
1 parent 9338c22 commit 3d01342

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

arch/x86/xen/mmu_pv.c

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,22 @@
8686
#include "mmu.h"
8787
#include "debugfs.h"
8888

89+
/*
90+
* Prototypes for functions called via PV_CALLEE_SAVE_REGS_THUNK() in order
91+
* to avoid warnings with "-Wmissing-prototypes".
92+
*/
93+
pteval_t xen_pte_val(pte_t pte);
94+
pgdval_t xen_pgd_val(pgd_t pgd);
95+
pmdval_t xen_pmd_val(pmd_t pmd);
96+
pudval_t xen_pud_val(pud_t pud);
97+
p4dval_t xen_p4d_val(p4d_t p4d);
98+
pte_t xen_make_pte(pteval_t pte);
99+
pgd_t xen_make_pgd(pgdval_t pgd);
100+
pmd_t xen_make_pmd(pmdval_t pmd);
101+
pud_t xen_make_pud(pudval_t pud);
102+
p4d_t xen_make_p4d(p4dval_t p4d);
103+
pte_t xen_make_pte_init(pteval_t pte);
104+
89105
#ifdef CONFIG_X86_VSYSCALL_EMULATION
90106
/* l3 pud for userspace vsyscall mapping */
91107
static pud_t level3_user_vsyscall[PTRS_PER_PUD] __page_aligned_bss;

0 commit comments

Comments
 (0)