Source-Changes-HG archive

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

[src/trunk]: src/sys/uvm/pmap pmap_pv_track(): use PMAP_PAGE_INIT() otherwise...



details:   https://anonhg.NetBSD.org/src/rev/2a8ac6322be1
branches:  trunk
changeset: 970227:2a8ac6322be1
user:      ad <ad%NetBSD.org@localhost>
date:      Mon Mar 16 19:56:39 2020 +0000

description:
pmap_pv_track(): use PMAP_PAGE_INIT() otherwise the x86 pmap pukes.

diffstat:

 sys/uvm/pmap/pmap_pvt.c |  14 +++++++++++---
 1 files changed, 11 insertions(+), 3 deletions(-)

diffs (44 lines):

diff -r 66c92e25996e -r 2a8ac6322be1 sys/uvm/pmap/pmap_pvt.c
--- a/sys/uvm/pmap/pmap_pvt.c   Mon Mar 16 19:20:36 2020 +0000
+++ b/sys/uvm/pmap/pmap_pvt.c   Mon Mar 16 19:56:39 2020 +0000
@@ -1,7 +1,7 @@
-/*     $NetBSD: pmap_pvt.c,v 1.8 2020/01/01 16:50:41 martin Exp $      */
+/*     $NetBSD: pmap_pvt.c,v 1.9 2020/03/16 19:56:39 ad Exp $  */
 
 /*-
- * Copyright (c) 2014 The NetBSD Foundation, Inc.
+ * Copyright (c) 2014, 2020 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
  * This code is derived from software contributed to The NetBSD Foundation
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: pmap_pvt.c,v 1.8 2020/01/01 16:50:41 martin Exp $");
+__RCSID("$NetBSD: pmap_pvt.c,v 1.9 2020/03/16 19:56:39 ad Exp $");
 
 #include <sys/atomic.h>
 #include <sys/kmem.h>
@@ -77,6 +77,9 @@
 {
        struct pv_track *pvt;
        size_t npages;
+#ifdef PMAP_PAGE_INIT
+       size_t i;
+#endif
 
        KASSERT(start == trunc_page(start));
        KASSERT(size == trunc_page(size));
@@ -90,6 +93,11 @@
        pvt->pvt_start = start;
        pvt->pvt_size = size;
 
+#ifdef PMAP_PAGE_INIT
+       for (i = 0; i < npages; i++)
+               PMAP_PAGE_INIT(&pvt->pvt_pages[i]);
+#endif
+
        mutex_enter(&pv_unmanaged.lock);
        pvt->pvt_next = pv_unmanaged.list;
        atomic_store_release(&pv_unmanaged.list, pvt);



Home | Main Index | Thread Index | Old Index