Module Name:    src
Committed By:   ad
Date:           Tue Dec 10 18:00:17 UTC 2019

Modified Files:
        src/sys/dev/pci: viomb.c

Log Message:
p->phys_addr -> VM_PAGE_TO_PHYS(p)


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/dev/pci/viomb.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/pci/viomb.c
diff -u src/sys/dev/pci/viomb.c:1.9 src/sys/dev/pci/viomb.c:1.10
--- src/sys/dev/pci/viomb.c:1.9	Sun Jun 10 14:59:23 2018
+++ src/sys/dev/pci/viomb.c	Tue Dec 10 18:00:17 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: viomb.c,v 1.9 2018/06/10 14:59:23 jakllsch Exp $	*/
+/*	$NetBSD: viomb.c,v 1.10 2019/12/10 18:00:17 ad Exp $	*/
 
 /*
  * Copyright (c) 2010 Minoura Makoto.
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: viomb.c,v 1.9 2018/06/10 14:59:23 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: viomb.c,v 1.10 2019/12/10 18:00:17 ad Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -281,7 +281,7 @@ inflate(struct viomb_softc *sc)
 	b->bl_nentries = nvpages;
 	i = 0;
 	TAILQ_FOREACH(p, &b->bl_pglist, pageq.queue) {
-		b->bl_pages[i++] = p->phys_addr / VIRTIO_PAGE_SIZE;
+		b->bl_pages[i++] = VM_PAGE_TO_PHYS(p) / VIRTIO_PAGE_SIZE;
 	}
 	KASSERT(i == nvpages);
 
@@ -387,7 +387,7 @@ deflate(struct viomb_softc *sc)
 			break;
 		TAILQ_REMOVE(&sc->sc_balloon_pages, p, pageq.queue);
 		TAILQ_INSERT_TAIL(&b->bl_pglist, p, pageq.queue);
-		b->bl_pages[i] = p->phys_addr / VIRTIO_PAGE_SIZE;
+		b->bl_pages[i] = VM_PAGE_TO_PHYS(p) / VIRTIO_PAGE_SIZE;
 	}
 
 	if (virtio_enqueue_prep(vsc, vq, &slot) != 0) {

Reply via email to