Lines Matching defs:ops
41 * @ops: allocator helper functions and its data
43 * @slist: allocators share the same ops but different data
49 struct ioasid_allocator_ops *ops;
70 .ops = &default_ops,
98 static struct ioasid_allocator_data *ioasid_alloc_allocator(struct ioasid_allocator_ops *ops)
109 ia_data->ops = ops;
111 /* For tracking custom allocators that share the same ops */
112 list_add_tail(&ops->list, &ia_data->slist);
124 * @ops: the custom allocator ops to be registered
138 int ioasid_register_allocator(struct ioasid_allocator_ops *ops)
146 ia_data = ioasid_alloc_allocator(ops);
172 if (pallocator->ops == ops) {
176 } else if (use_same_ops(pallocator->ops, ops)) {
178 * If the new allocator shares the same ops,
182 list_add_tail(&ops->list, &pallocator->slist);
199 * ioasid_unregister_allocator - Remove a custom IOASID allocator ops
200 * @ops: the custom allocator to be removed
206 void ioasid_unregister_allocator(struct ioasid_allocator_ops *ops)
218 if (!use_same_ops(pallocator->ops, ops))
226 * the last allocator that shares the same ops
243 * Find the matching shared ops to delete,
247 if (sops == ops) {
248 list_del(&ops->list);
323 adata = active_allocator->flags & IOASID_ALLOCATOR_CUSTOM ? active_allocator->ops->pdata : data;
324 id = active_allocator->ops->alloc(min, max, adata);
334 active_allocator->ops->free(id, active_allocator->ops->pdata);
363 active_allocator->ops->free(ioasid, active_allocator->ops->pdata);