idr
#define CMMU_ID(idr) ((idr) >> 24)
#define CMMU_TYPE(idr) (((idr) >> 21) & 0x07)
#define CMMU_VERSION(idr) (((idr) >> 16) & 0x1f)
struct idr bufs_idr;
struct idr bufs_idr;
struct idr bo_list_handles;
struct idr *idp;
struct idr *idp;
struct idr ctx_handles;
struct idr pasid_idr;
struct idr gang_id_idr;
struct idr queue_id_idr;
struct idr userq_idr;
struct idr alloc_idr;
struct idr event_idr;
idr_destroy(&ida->idr);
r = idr_alloc(&ida->idr, NULL, start, end + 1, gfp);
idr_remove(&ida->idr, id);
idr_init(struct idr *idr)
SPLAY_INIT(&idr->tree);
idr->next = 0;
idr_destroy(struct idr *idr)
while ((id = SPLAY_MIN(idr_tree, &idr->tree))) {
SPLAY_REMOVE(idr_tree, &idr->tree, id);
idr_alloc(struct idr *idr, void *ptr, int start, int end, gfp_t gfp_mask)
while (SPLAY_INSERT(idr_tree, &idr->tree, id)) {
idr_alloc_cyclic(struct idr *idr, void *ptr, int start, int end, gfp_t gfp_mask)
id->id = idr->next;
while (SPLAY_INSERT(idr_tree, &idr->tree, id)) {
} else if (id->id == idr->next) {
idr->next = id->id + 1;
if (idr->next == end)
idr->next = start;
idr_replace(struct idr *idr, void *ptr, unsigned long id)
res = SPLAY_FIND(idr_tree, &idr->tree, &find);
idr_remove(struct idr *idr, unsigned long id)
res = SPLAY_FIND(idr_tree, &idr->tree, &find);
SPLAY_REMOVE(idr_tree, &idr->tree, res);
idr_find(struct idr *idr, unsigned long id)
res = SPLAY_FIND(idr_tree, &idr->tree, &find);
idr_get_next(struct idr *idr, int *id)
SPLAY_FOREACH(res, idr_tree, &idr->tree) {
idr_for_each(struct idr *idr, int (*func)(int, void *, void *), void *data)
SPLAY_FOREACH(id, idr_tree, &idr->tree) {
idr_init(&ida->idr);
struct idr object_idr;
struct idr vgpu_idr; /* vGPU IDR pool */
struct idr metrics_idr;
struct idr leases;
struct idr lessee_idr;
struct idr magic_map;
struct idr object_name_idr;
struct idr object_idr;
struct idr syncobj_idr;
struct idr object_idr;
struct idr tile_idr;
struct idr name = { \
.tree = SPLAY_INITIALIZER(&name.idr.tree), \
void idr_init(struct idr *);
int idr_alloc(struct idr *, void *, int, int, gfp_t);
int idr_alloc_cyclic(struct idr *, void *, int, int, gfp_t);
void *idr_find(struct idr *, unsigned long);
void *idr_replace(struct idr *, void *, unsigned long);
void *idr_remove(struct idr *, unsigned long);
void idr_destroy(struct idr *);
int idr_for_each(struct idr *, int (*)(int, void *, void *), void *);
void *idr_get_next(struct idr *, int *);
idr_init_base(struct idr *idr, int base)
idr_init(idr);
idr_is_empty(const struct idr *idr)
return SPLAY_EMPTY(&idr->tree);
struct idr idr;
.idr = { SPLAY_INITIALIZER(&name.idr.tree) } \