summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhselasky <hselasky@FreeBSD.org>2018-02-25 10:34:47 +0000
committerhselasky <hselasky@FreeBSD.org>2018-02-25 10:34:47 +0000
commit89a31c60ae7d20432b69954176eacdd1ef77f796 (patch)
treeb4e6e904d9e411aee7f7522b4675b549cef260da
parentbf842f830c3035d677884526074394972c917f05 (diff)
downloadFreeBSD-src-89a31c60ae7d20432b69954176eacdd1ef77f796.zip
FreeBSD-src-89a31c60ae7d20432b69954176eacdd1ef77f796.tar.gz
MFC r329515:
Make the vm_fault structure in the LinuxKPI compatible with newer versions of the Linux kernel. No functional change. Submitted by: Johannes Lundberg <johalun0@gmail.com> Sponsored by: Mellanox Technologies Sponsored by: Limelight Networks
-rw-r--r--sys/compat/linuxkpi/common/include/linux/mm.h7
-rw-r--r--sys/compat/linuxkpi/common/src/linux_compat.c1
2 files changed, 7 insertions, 1 deletions
diff --git a/sys/compat/linuxkpi/common/include/linux/mm.h b/sys/compat/linuxkpi/common/include/linux/mm.h
index e9e2f3b..ad90382 100644
--- a/sys/compat/linuxkpi/common/include/linux/mm.h
+++ b/sys/compat/linuxkpi/common/include/linux/mm.h
@@ -118,8 +118,13 @@ struct vm_area_struct {
struct vm_fault {
unsigned int flags;
pgoff_t pgoff;
- void *virtual_address; /* user-space address */
+ union {
+ /* user-space address */
+ void *virtual_address;
+ unsigned long address;
+ };
struct page *page;
+ struct vm_area_struct *vma;
};
struct vm_operations_struct {
diff --git a/sys/compat/linuxkpi/common/src/linux_compat.c b/sys/compat/linuxkpi/common/src/linux_compat.c
index 08ddbbe..ecb1159 100644
--- a/sys/compat/linuxkpi/common/src/linux_compat.c
+++ b/sys/compat/linuxkpi/common/src/linux_compat.c
@@ -538,6 +538,7 @@ linux_cdev_pager_populate(vm_object_t vm_obj, vm_pindex_t pidx, int fault_type,
vmf.flags = (fault_type & VM_PROT_WRITE) ? FAULT_FLAG_WRITE : 0;
vmf.pgoff = 0;
vmf.page = NULL;
+ vmf.vma = vmap;
vmap->vm_pfn_count = 0;
vmap->vm_pfn_pcount = &vmap->vm_pfn_count;
OpenPOWER on IntegriCloud