Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/pci p->phys_addr -> VM_PAGE_TO_PHYS(p)



details:   https://anonhg.NetBSD.org/src/rev/3651cd417d47
branches:  trunk
changeset: 1005508:3651cd417d47
user:      ad <ad%NetBSD.org@localhost>
date:      Tue Dec 10 18:00:17 2019 +0000

description:
p->phys_addr -> VM_PAGE_TO_PHYS(p)

diffstat:

 sys/dev/pci/viomb.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (36 lines):

diff -r 92ed7c4e28a3 -r 3651cd417d47 sys/dev/pci/viomb.c
--- a/sys/dev/pci/viomb.c       Tue Dec 10 13:36:44 2019 +0000
+++ b/sys/dev/pci/viomb.c       Tue Dec 10 18:00:17 2019 +0000
@@ -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 @@
        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 @@
                        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) {



Home | Main Index | Thread Index | Old Index