[PATCH 02/14] KVM: PPC: Book3S: convert spapr TCE mmap hook to mmap_prepare
From: Lorenzo Stoakes (ARM)
Date: Thu Nov 05 2026 - 16:08:51 EST
Move from the deprecated mmap hook to the new mmap_prepare hook. The hook
only sets the VMA operations.
Signed-off-by: Lorenzo Stoakes (ARM) <ljs@xxxxxxxxxx>
---
arch/powerpc/kvm/book3s_64_vio.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/powerpc/kvm/book3s_64_vio.c b/arch/powerpc/kvm/book3s_64_vio.c
index c5f3f5b29d89..05f6f2c9a432 100644
--- a/arch/powerpc/kvm/book3s_64_vio.c
+++ b/arch/powerpc/kvm/book3s_64_vio.c
@@ -247,9 +247,9 @@ static const struct vm_operations_struct kvm_spapr_tce_vm_ops = {
.fault = kvm_spapr_tce_fault,
};
-static int kvm_spapr_tce_mmap(struct file *file, struct vm_area_struct *vma)
+static int kvm_spapr_tce_mmap_prepare(struct vm_area_desc *desc)
{
- vma->vm_ops = &kvm_spapr_tce_vm_ops;
+ desc->vm_ops = &kvm_spapr_tce_vm_ops;
return 0;
}
@@ -282,7 +282,7 @@ static int kvm_spapr_tce_release(struct inode *inode, struct file *filp)
}
static const struct file_operations kvm_spapr_tce_fops = {
- .mmap = kvm_spapr_tce_mmap,
+ .mmap_prepare = kvm_spapr_tce_mmap_prepare,
.release = kvm_spapr_tce_release,
};
--
2.56.0