Lines Matching defs:obj

145 static inline bool iommufd_lock_obj(struct iommufd_object *obj)
147 if (!refcount_inc_not_zero(&obj->users))
149 if (!refcount_inc_not_zero(&obj->shortterm_users)) {
151 * If the caller doesn't already have a ref on obj this must be
155 refcount_dec(&obj->users);
164 struct iommufd_object *obj)
170 refcount_dec(&obj->users);
171 if (refcount_dec_and_test(&obj->shortterm_users))
175 void iommufd_object_abort(struct iommufd_ctx *ictx, struct iommufd_object *obj);
177 struct iommufd_object *obj);
179 struct iommufd_object *obj);
194 struct iommufd_object *obj)
198 ret = iommufd_object_remove(ictx, obj, obj->id, REMOVE_WAIT_SHORTTERM);
220 struct iommufd_object *obj)
222 iommufd_object_remove(ictx, obj, obj->id, 0);
229 #define __iommufd_object_alloc(ictx, ptr, type, obj) \
234 obj) != 0), \
236 typeof(*(ptr)), obj)
239 __iommufd_object_alloc(ictx, ptr, type, obj)
256 struct iommufd_object obj;
267 struct iommufd_ioas, obj);
272 void iommufd_ioas_destroy(struct iommufd_object *obj);
293 struct iommufd_object obj;
315 return hwpt->obj.type == IOMMUFD_OBJ_HWPT_PAGING;
329 struct iommufd_hwpt_paging, common.obj);
337 struct iommufd_hw_pagetable, obj);
352 void iommufd_hwpt_paging_destroy(struct iommufd_object *obj);
353 void iommufd_hwpt_paging_abort(struct iommufd_object *obj);
354 void iommufd_hwpt_nested_destroy(struct iommufd_object *obj);
355 void iommufd_hwpt_nested_abort(struct iommufd_object *obj);
362 if (hwpt->obj.type == IOMMUFD_OBJ_HWPT_PAGING) {
368 iommufd_object_put_and_try_destroy(ictx, &hwpt->obj);
372 refcount_dec(&hwpt->obj.users);
391 struct iommufd_object obj;
405 struct iommufd_device, obj);
408 void iommufd_device_destroy(struct iommufd_object *obj);
412 struct iommufd_object obj;
427 void iommufd_access_destroy_object(struct iommufd_object *obj);
431 void iommufd_selftest_destroy(struct iommufd_object *obj);