svn commit: r278946 - stable/10/sys/x86/iommu

Konstantin Belousov kib at FreeBSD.org
Wed Feb 18 08:04:05 UTC 2015


Author: kib
Date: Wed Feb 18 08:04:03 2015
New Revision: 278946
URL: https://svnweb.freebsd.org/changeset/base/278946

Log:
  MFC r278605:
  vm_page_lookup() accepts read-locked object.

Modified:
  stable/10/sys/x86/iommu/intel_utils.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/x86/iommu/intel_utils.c
==============================================================================
--- stable/10/sys/x86/iommu/intel_utils.c	Wed Feb 18 07:34:32 2015	(r278945)
+++ stable/10/sys/x86/iommu/intel_utils.c	Wed Feb 18 08:04:03 2015	(r278946)
@@ -408,11 +408,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 */


More information about the svn-src-all mailing list