Page MenuHomeFreeBSD

D26510.id77324.diff
No OneTemporary

D26510.id77324.diff

Index: sys/arm64/arm64/pmap.c
===================================================================
--- sys/arm64/arm64/pmap.c
+++ sys/arm64/arm64/pmap.c
@@ -440,7 +440,12 @@
pd_entry_t l1, *l2p;
l1 = pmap_load(l1p);
- KASSERT((l1 & ATTR_DESCR_MASK) == L1_TABLE,
+
+ /*
+ * The valid bit may be clear if pmap_update_entry() is concurrently
+ * modifying the entry, so only the entry type may be checked.
+ */
+ KASSERT((l1 & ATTR_DESCR_TYPE_MASK) == ATTR_DESCR_TYPE_TABLE,
("%s: L1 entry %#lx is a leaf", __func__, l1));
l2p = (pd_entry_t *)PHYS_TO_DMAP(l1 & ~ATTR_MASK);
return (&l2p[pmap_l2_index(va)]);
@@ -465,7 +470,12 @@
pt_entry_t *l3p;
l2 = pmap_load(l2p);
- KASSERT((l2 & ATTR_DESCR_MASK) == L2_TABLE,
+
+ /*
+ * The valid bit may be clear if pmap_update_entry() is concurrently
+ * modifying the entry, so only the entry type may be checked.
+ */
+ KASSERT((l2 & ATTR_DESCR_TYPE_MASK) == ATTR_DESCR_TYPE_TABLE,
("%s: L2 entry %#lx is a leaf", __func__, l2));
l3p = (pt_entry_t *)PHYS_TO_DMAP(l2 & ~ATTR_MASK);
return (&l3p[pmap_l3_index(va)]);

File Metadata

Mime Type
text/plain
Expires
Wed, Jul 22, 1:14 PM (4 h, 11 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
35365139
Default Alt Text
D26510.id77324.diff (1 KB)

Event Timeline