Lines Matching full:objects

5  * iommufd provides control over the IOMMU HW objects created by IOMMU kernel
6 * drivers. IOMMU HW objects revolve around IO page tables that map incoming DMA
36 * destruction. Expect for special kernel-only objects there is no in-kernel way
37 * to reliably destroy a single object. Thus all APIs that are creating objects
44 XA_STATE(xas, &ictx->objects, obj->id); in iommufd_object_finalize()
47 xa_lock(&ictx->objects); in iommufd_object_finalize()
49 xa_unlock(&ictx->objects); in iommufd_object_finalize()
57 XA_STATE(xas, &ictx->objects, obj->id); in iommufd_object_abort()
60 xa_lock(&ictx->objects); in iommufd_object_abort()
62 xa_unlock(&ictx->objects); in iommufd_object_abort()
89 xa_lock(&ictx->objects); in iommufd_get_object()
90 obj = xa_load(&ictx->objects, id); in iommufd_get_object()
94 xa_unlock(&ictx->objects); in iommufd_get_object()
124 XA_STATE(xas, &ictx->objects, id); in iommufd_object_remove()
130 * destruction of objects used by external drivers and destroyed by this in iommufd_object_remove()
147 xa_lock(&ictx->objects); in iommufd_object_remove()
173 xa_unlock(&ictx->objects); in iommufd_object_remove()
194 xa_unlock(&ictx->objects); in iommufd_object_remove()
226 xa_init_flags(&ictx->objects, XA_FLAGS_ALLOC1 | XA_FLAGS_ACCOUNT); in iommufd_fops_open()
244 * The objects in the xarray form a graph of "users" counts, and we have in iommufd_fops_release()
245 * to destroy them in a depth first manner. Leaf objects will reduce the in iommufd_fops_release()
246 * users count of interior objects when they are destroyed. in iommufd_fops_release()
248 * Repeatedly destroying all the "1 users" leaf objects will progress in iommufd_fops_release()
252 while (!xa_empty(&ictx->objects)) { in iommufd_fops_release()
256 xa_for_each(&ictx->objects, index, obj) { in iommufd_fops_release()
260 xa_erase(&ictx->objects, index); in iommufd_fops_release()