svn commit: r329515 - in head/sys/compat/linuxkpi/common: include/linux src
Hans Petter Selasky
hselasky at FreeBSD.org
Sun Feb 18 09:31:02 UTC 2018
Author: hselasky
Date: Sun Feb 18 09:31:01 2018
New Revision: 329515
URL: https://svnweb.freebsd.org/changeset/base/329515
Log:
Make the vm_fault structure in the LinuxKPI compatible with
newer versions of the Linux kernel. No functional change.
MFC after: 1 week
Submitted by: Johannes Lundberg <johalun0 at gmail.com>
Sponsored by: Mellanox Technologies
Sponsored by: Limelight Networks
Modified:
head/sys/compat/linuxkpi/common/include/linux/mm.h
head/sys/compat/linuxkpi/common/src/linux_compat.c
Modified: head/sys/compat/linuxkpi/common/include/linux/mm.h
==============================================================================
--- head/sys/compat/linuxkpi/common/include/linux/mm.h Sun Feb 18 09:10:14 2018 (r329514)
+++ head/sys/compat/linuxkpi/common/include/linux/mm.h Sun Feb 18 09:31:01 2018 (r329515)
@@ -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 {
Modified: head/sys/compat/linuxkpi/common/src/linux_compat.c
==============================================================================
--- head/sys/compat/linuxkpi/common/src/linux_compat.c Sun Feb 18 09:10:14 2018 (r329514)
+++ head/sys/compat/linuxkpi/common/src/linux_compat.c Sun Feb 18 09:31:01 2018 (r329515)
@@ -538,6 +538,7 @@ linux_cdev_pager_populate(vm_object_t vm_obj, vm_pinde
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;
More information about the svn-src-all
mailing list