Author: kib
Date: Wed Feb 11 23:28:28 2015
New Revision: 278605
URL: https://svnweb.freebsd.org/changeset/base/278605
Log:
vm_page_lookup() accepts read-locked object.
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Modified:
head/sys/x86/iommu/intel_utils.c
Modified: head/sys/x86/iommu/intel_utils.c
==============================================================================
--- head/sys/x86/iommu/intel_utils.c Wed Feb 11 23:05:58 2015
(r278604)
+++ head/sys/x86/iommu/intel_utils.c Wed Feb 11 23:28:28 2015
(r278605)
@@ -411,11 +411,9 @@ dmar_load_root_entry_ptr(struct dmar_uni
*/
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 */
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"