Lines Matching refs: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
62 rc = xa_alloc(&ictx->objects, &obj->id, XA_ZERO_ENTRY,
76 * destruction. Expect for special kernel-only objects there is no in-kernel way
77 * to reliably destroy a single object. Thus all APIs that are creating objects
86 old = xa_store(&ictx->objects, obj->id, obj, GFP_KERNEL);
96 old = xa_erase(&ictx->objects, obj->id);
123 xa_lock(&ictx->objects);
124 obj = xa_load(&ictx->objects, id);
128 xa_unlock(&ictx->objects);
140 XA_STATE(xas, &ictx->objects, id);
142 xa_lock(&ictx->objects);
166 xa_unlock(&ictx->objects);
184 * destruction of objects used by external drivers and destroyed by this
238 xa_init_flags(&ictx->objects, XA_FLAGS_ALLOC1 | XA_FLAGS_ACCOUNT);
251 * The objects in the xarray form a graph of "users" counts, and we have
252 * to destroy them in a depth first manner. Leaf objects will reduce the
253 * users count of interior objects when they are destroyed.
255 * Repeatedly destroying all the "1 users" leaf objects will progress
259 while (!xa_empty(&ictx->objects)) {
263 xa_for_each(&ictx->objects, index, obj) {
267 xa_erase(&ictx->objects, index);