Mon Mar 29 02:13:38 2021 UTC ()
Don't use legacy VM types.


(simonb)
diff -r1.6 -r1.7 src/sys/fs/nfs/client/nfs_clbio.c
diff -r1.3 -r1.4 src/sys/fs/nfs/server/nfs_nfsdport.c

cvs diff -r1.6 -r1.7 src/sys/fs/nfs/client/nfs_clbio.c (expand / switch to context diff)
--- src/sys/fs/nfs/client/nfs_clbio.c 2020/09/29 03:02:19 1.6
+++ src/sys/fs/nfs/client/nfs_clbio.c 2021/03/29 02:13:37 1.7
@@ -1,4 +1,4 @@
-/*	$NetBSD: nfs_clbio.c,v 1.6 2020/09/29 03:02:19 msaitoh Exp $	*/
+/*	$NetBSD: nfs_clbio.c,v 1.7 2021/03/29 02:13:37 simonb Exp $	*/
 /*-
  * Copyright (c) 1989, 1993
  *	The Regents of the University of California.  All rights reserved.
@@ -35,7 +35,7 @@
 
 #include <sys/cdefs.h>
 /* __FBSDID("FreeBSD: head/sys/fs/nfsclient/nfs_clbio.c 304026 2016-08-12 22:44:59Z rmacklem "); */
-__RCSID("$NetBSD: nfs_clbio.c,v 1.6 2020/09/29 03:02:19 msaitoh Exp $");
+__RCSID("$NetBSD: nfs_clbio.c,v 1.7 2021/03/29 02:13:37 simonb Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -77,7 +77,7 @@
 	int i, error, nextoff, size, toff, count, npages;
 	struct uio uio;
 	struct iovec iov;
-	vm_offset_t kva;
+	vaddr_t kva;
 	struct buf *bp;
 	struct vnode *vp;
 	struct thread *td;
@@ -137,7 +137,7 @@
 	 */
 	bp = getpbuf(&ncl_pbuf_freecnt);
 
-	kva = (vm_offset_t) bp->b_data;
+	kva = (vaddr_t) bp->b_data;
 	pmap_qenter(kva, pages, npages);
 	PCPU_INC(cnt.v_vnodein);
 	PCPU_ADD(cnt.v_vnodepgsin, npages);
@@ -221,7 +221,7 @@
 {
 	struct uio uio;
 	struct iovec iov;
-	vm_offset_t kva;
+	vaddr_t kva;
 	struct buf *bp;
 	int iomode, must_commit, i, error, npages, count;
 	off_t offset;
@@ -283,7 +283,7 @@
 	 */
 	bp = getpbuf(&ncl_pbuf_freecnt);
 
-	kva = (vm_offset_t) bp->b_data;
+	kva = (vaddr_t) bp->b_data;
 	pmap_qenter(kva, pages, npages);
 	PCPU_INC(cnt.v_vnodeout);
 	PCPU_ADD(cnt.v_vnodepgsout, count);

cvs diff -r1.3 -r1.4 src/sys/fs/nfs/server/nfs_nfsdport.c (expand / switch to context diff)
--- src/sys/fs/nfs/server/nfs_nfsdport.c 2018/09/03 16:29:34 1.3
+++ src/sys/fs/nfs/server/nfs_nfsdport.c 2021/03/29 02:13:38 1.4
@@ -1,4 +1,4 @@
-/*	$NetBSD: nfs_nfsdport.c,v 1.3 2018/09/03 16:29:34 riastradh Exp $	*/
+/*	$NetBSD: nfs_nfsdport.c,v 1.4 2021/03/29 02:13:38 simonb Exp $	*/
 /*-
  * Copyright (c) 1989, 1993
  *	The Regents of the University of California.  All rights reserved.
@@ -34,7 +34,7 @@
 
 #include <sys/cdefs.h>
 /* __FBSDID("FreeBSD: head/sys/fs/nfsserver/nfs_nfsdport.c 308212 2016-11-02 12:43:15Z kib "); */
-__RCSID("$NetBSD: nfs_nfsdport.c,v 1.3 2018/09/03 16:29:34 riastradh Exp $");
+__RCSID("$NetBSD: nfs_nfsdport.c,v 1.4 2021/03/29 02:13:38 simonb Exp $");
 
 #if 0
 #include <sys/capsicum.h>
@@ -136,7 +136,7 @@
 
 	/* Locate best candidate. */
 	try = 32;
-	hi = ((int)(vm_offset_t)vp / sizeof(struct vnode)) % NUM_HEURISTIC;
+	hi = ((int)(vaddr_t)vp / sizeof(struct vnode)) % NUM_HEURISTIC;
 	nh = &nfsheur[hi];
 	while (try--) {
 		if (nfsheur[hi].nh_vp == vp) {