Page MenuHomeFreeBSD

D46813.diff
No OneTemporary

D46813.diff

diff --git a/sys/arm64/arm64/pmap.c b/sys/arm64/arm64/pmap.c
--- a/sys/arm64/arm64/pmap.c
+++ b/sys/arm64/arm64/pmap.c
@@ -9178,12 +9178,23 @@
if (pmap_klookup(far, NULL))
rv = KERN_SUCCESS;
} else {
- PMAP_LOCK(pmap);
+ bool owned;
+
+ /*
+ * In the EFIRT driver we lock the pmap before
+ * calling into the runtime service. As the lock
+ * is already owned by the current thread skip
+ * locking it again.
+ */
+ owned = PMAP_OWNED(pmap);
+ if (!owned)
+ PMAP_LOCK(pmap);
/* Ask the MMU to check the address. */
intr = intr_disable();
par = arm64_address_translate_s1e0r(far);
intr_restore(intr);
- PMAP_UNLOCK(pmap);
+ if (!owned)
+ PMAP_UNLOCK(pmap);
/*
* If the translation was successful, then we can

File Metadata

Mime Type
text/plain
Expires
Fri, Jan 31, 3:18 AM (4 h, 10 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16352945
Default Alt Text
D46813.diff (782 B)

Event Timeline