git: 062f15004f4e - main - LinuxKPI: Remove vma argument from fault method of vm_operations_struct
Vladimir Kondratyev
wulf at FreeBSD.org
Wed Sep 29 20:27:50 UTC 2021
The branch main has been updated by wulf:
URL: https://cgit.FreeBSD.org/src/commit/?id=062f15004f4e92cd984bf59ec95c189a9d998013
commit 062f15004f4e92cd984bf59ec95c189a9d998013
Author: Vladimir Kondratyev <wulf at FreeBSD.org>
AuthorDate: 2021-09-29 20:26:32 +0000
Commit: Vladimir Kondratyev <wulf at FreeBSD.org>
CommitDate: 2021-09-29 20:26:32 +0000
LinuxKPI: Remove vma argument from fault method of vm_operations_struct
It is removed from Linux since 4.11.
In FreeBSD it results in several #ifdefs in drm-kmod.
Reviewed by: emaste, hselasky, manu
Differential revision: https://reviews.freebsd.org/D32169
---
sys/compat/linuxkpi/common/include/linux/mm.h | 2 +-
sys/compat/linuxkpi/common/src/linux_compat.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/sys/compat/linuxkpi/common/include/linux/mm.h b/sys/compat/linuxkpi/common/include/linux/mm.h
index 0ee9dd58616a..ec88f39ac410 100644
--- a/sys/compat/linuxkpi/common/include/linux/mm.h
+++ b/sys/compat/linuxkpi/common/include/linux/mm.h
@@ -137,7 +137,7 @@ struct vm_fault {
struct vm_operations_struct {
void (*open) (struct vm_area_struct *);
void (*close) (struct vm_area_struct *);
- int (*fault) (struct vm_area_struct *, struct vm_fault *);
+ int (*fault) (struct vm_fault *);
int (*access) (struct vm_area_struct *, unsigned long, void *, int, int);
};
diff --git a/sys/compat/linuxkpi/common/src/linux_compat.c b/sys/compat/linuxkpi/common/src/linux_compat.c
index 103d7ab0c60b..279f7131fc57 100644
--- a/sys/compat/linuxkpi/common/src/linux_compat.c
+++ b/sys/compat/linuxkpi/common/src/linux_compat.c
@@ -560,11 +560,11 @@ linux_cdev_pager_populate(vm_object_t vm_obj, vm_pindex_t pidx, int fault_type,
vmap->vm_pfn_pcount = &vmap->vm_pfn_count;
vmap->vm_obj = vm_obj;
- err = vmap->vm_ops->fault(vmap, &vmf);
+ err = vmap->vm_ops->fault(&vmf);
while (vmap->vm_pfn_count == 0 && err == VM_FAULT_NOPAGE) {
kern_yield(PRI_USER);
- err = vmap->vm_ops->fault(vmap, &vmf);
+ err = vmap->vm_ops->fault(&vmf);
}
}
More information about the dev-commits-src-main
mailing list