diff options
author | kib <kib@FreeBSD.org> | 2015-02-18 08:04:03 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2015-02-18 08:04:03 +0000 |
commit | f387fc2f7e8f3ad0c437214a933f0940843733f7 (patch) | |
tree | 7c4559c5cf14449b5e703dd2697b4eb70bdcc5c4 /sys/x86 | |
parent | a45941e76cf65f24d9ea5ecde45212c0f88269a6 (diff) | |
download | FreeBSD-src-f387fc2f7e8f3ad0c437214a933f0940843733f7.zip FreeBSD-src-f387fc2f7e8f3ad0c437214a933f0940843733f7.tar.gz |
MFC r278605:
vm_page_lookup() accepts read-locked object.
Diffstat (limited to 'sys/x86')
-rw-r--r-- | sys/x86/iommu/intel_utils.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/x86/iommu/intel_utils.c b/sys/x86/iommu/intel_utils.c index ca9fe03..77e1cea 100644 --- a/sys/x86/iommu/intel_utils.c +++ b/sys/x86/iommu/intel_utils.c @@ -408,11 +408,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 */ |