Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 18 Feb 2018 09:31:01 +0000 (UTC)
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r329515 - in head/sys/compat/linuxkpi/common: include/linux src
Message-ID:  <201802180931.w1I9V1bk033361@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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@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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201802180931.w1I9V1bk033361>