Skip to content

Commit c77e518

Browse files
Quentin PerretMarc Zyngier
authored andcommitted
KVM: arm64: Make kvm_pgtable_stage2_init() a static inline function
Turn kvm_pgtable_stage2_init() into a static inline function instead of a macro. This will allow the usage of typeof() on it later on. Tested-by: Fuad Tabba <[email protected]> Reviewed-by: Fuad Tabba <[email protected]> Signed-off-by: Quentin Perret <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Marc Zyngier <[email protected]>
1 parent e279c25 commit c77e518

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

arch/arm64/include/asm/kvm_pgtable.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -526,8 +526,11 @@ int __kvm_pgtable_stage2_init(struct kvm_pgtable *pgt, struct kvm_s2_mmu *mmu,
526526
enum kvm_pgtable_stage2_flags flags,
527527
kvm_pgtable_force_pte_cb_t force_pte_cb);
528528

529-
#define kvm_pgtable_stage2_init(pgt, mmu, mm_ops) \
530-
__kvm_pgtable_stage2_init(pgt, mmu, mm_ops, 0, NULL)
529+
static inline int kvm_pgtable_stage2_init(struct kvm_pgtable *pgt, struct kvm_s2_mmu *mmu,
530+
struct kvm_pgtable_mm_ops *mm_ops)
531+
{
532+
return __kvm_pgtable_stage2_init(pgt, mmu, mm_ops, 0, NULL);
533+
}
531534

532535
/**
533536
* kvm_pgtable_stage2_destroy() - Destroy an unused guest stage-2 page-table.

0 commit comments

Comments
 (0)