summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2015-02-11 23:28:28 +0000
committerkib <kib@FreeBSD.org>2015-02-11 23:28:28 +0000
commite2cc9f9eca9038f5842e5369f7549028e2d3cc43 (patch)
treeb1cf18750ca0cb50091d06a262a48197bf1e6860 /sys
parent34ff9bcd54998bbb7d38578c32136f1caf76b32b (diff)
downloadFreeBSD-src-e2cc9f9eca9038f5842e5369f7549028e2d3cc43.zip
FreeBSD-src-e2cc9f9eca9038f5842e5369f7549028e2d3cc43.tar.gz
vm_page_lookup() accepts read-locked object.
Sponsored by: The FreeBSD Foundation MFC after: 1 week
Diffstat (limited to 'sys')
-rw-r--r--sys/x86/iommu/intel_utils.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/x86/iommu/intel_utils.c b/sys/x86/iommu/intel_utils.c
index b19b41c..8dc2f35 100644
--- a/sys/x86/iommu/intel_utils.c
+++ b/sys/x86/iommu/intel_utils.c
@@ -411,11 +411,9 @@ dmar_load_root_entry_ptr(struct dmar_unit *unit)
*/
DMAR_ASSERT_LOCKED(unit);
- /* VM_OBJECT_RLOCK(unit->ctx_obj); */
- VM_OBJECT_WLOCK(unit->ctx_obj);
+ VM_OBJECT_RLOCK(unit->ctx_obj);
root_entry = vm_page_lookup(unit->ctx_obj, 0);
- /* VM_OBJECT_RUNLOCK(unit->ctx_obj); */
- VM_OBJECT_WUNLOCK(unit->ctx_obj);
+ VM_OBJECT_RUNLOCK(unit->ctx_obj);
dmar_write8(unit, DMAR_RTADDR_REG, VM_PAGE_TO_PHYS(root_entry));
dmar_write4(unit, DMAR_GCMD_REG, unit->hw_gcmd | DMAR_GCMD_SRTP);
/* XXXKIB should have a timeout */
OpenPOWER on IntegriCloud