Page MenuHomeFreeBSD

D28109.id82160.diff
No OneTemporary

D28109.id82160.diff

diff --git a/sys/riscv/riscv/pmap.c b/sys/riscv/riscv/pmap.c
--- a/sys/riscv/riscv/pmap.c
+++ b/sys/riscv/riscv/pmap.c
@@ -3498,7 +3498,10 @@
goto restart;
}
}
- l3 = pmap_l3(pmap, pv->pv_va);
+ l2 = pmap_l2(pmap, pv->pv_va);
+ KASSERT((pmap_load(l2) & PTE_RWX) == 0,
+ ("%s: found a 2mpage in page %p's pv list", __func__, m));
+ l3 = pmap_l2_to_l3(l2, pv->pv_va);
if ((pmap_load(l3) & PTE_SW_WIRED) != 0)
count++;
PMAP_UNLOCK(pmap);
@@ -3745,7 +3748,10 @@
goto restart;
}
}
- l3 = pmap_l3(pmap, pv->pv_va);
+ l2 = pmap_l2(pmap, pv->pv_va);
+ KASSERT((pmap_load(l2) & PTE_RWX) == 0,
+ ("%s: found a 2mpage in page %p's pv list", __func__, m));
+ l3 = pmap_l2_to_l3(l2, pv->pv_va);
rv = (pmap_load(l3) & mask) == mask;
PMAP_UNLOCK(pmap);
if (rv)
@@ -3901,7 +3907,10 @@
goto retry_pv_loop;
}
}
- l3 = pmap_l3(pmap, pv->pv_va);
+ l2 = pmap_l2(pmap, pv->pv_va);
+ KASSERT((pmap_load(l2) & PTE_RWX) == 0,
+ ("%s: found a 2mpage in page %p's pv list", __func__, m));
+ l3 = pmap_l2_to_l3(l2, pv->pv_va);
oldl3 = pmap_load(l3);
retry:
if ((oldl3 & PTE_W) != 0) {
@@ -4172,8 +4181,7 @@
}
l2 = pmap_l2(pmap, pv->pv_va);
KASSERT((pmap_load(l2) & PTE_RWX) == 0,
- ("pmap_clear_modify: found a 2mpage in page %p's pv list",
- m));
+ ("%s: found a 2mpage in page %p's pv list", __func__, m));
l3 = pmap_l2_to_l3(l2, pv->pv_va);
if ((pmap_load(l3) & (PTE_D | PTE_W)) == (PTE_D | PTE_W)) {
pmap_clear_bits(l3, PTE_D | PTE_W);

File Metadata

Mime Type
text/plain
Expires
Tue, Nov 19, 3:07 PM (21 h, 12 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14718617
Default Alt Text
D28109.id82160.diff (1 KB)

Event Timeline