Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 6 Jan 2019 00:44:33 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject:   svn commit: r342799 - stable/12/sys/compat/linuxkpi/common/src
Message-ID:  <201901060044.x060iX4l034850@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Sun Jan  6 00:44:32 2019
New Revision: 342799
URL: https://svnweb.freebsd.org/changeset/base/342799

Log:
  MFC r342625, r342631:
  Use IDX_TO_OFF().

Modified:
  stable/12/sys/compat/linuxkpi/common/src/linux_compat.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/compat/linuxkpi/common/src/linux_compat.c
==============================================================================
--- stable/12/sys/compat/linuxkpi/common/src/linux_compat.c	Sun Jan  6 00:40:31 2019	(r342798)
+++ stable/12/sys/compat/linuxkpi/common/src/linux_compat.c	Sun Jan  6 00:44:32 2019	(r342799)
@@ -538,7 +538,7 @@ linux_cdev_pager_populate(vm_object_t vm_obj, vm_pinde
 		struct vm_fault vmf;
 
 		/* fill out VM fault structure */
-		vmf.virtual_address = (void *)((uintptr_t)pidx << PAGE_SHIFT);
+		vmf.virtual_address = (void *)(uintptr_t)IDX_TO_OFF(pidx);
 		vmf.flags = (fault_type & VM_PROT_WRITE) ? FAULT_FLAG_WRITE : 0;
 		vmf.pgoff = 0;
 		vmf.page = NULL;



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