Lines Matching refs:layer
61 static int idr_layer_prefix_mask(int layer) in idr_layer_prefix_mask() argument
63 return ~idr_max(layer + 1); in idr_layer_prefix_mask()
139 struct idr_layer *layer; in idr_layer_rcu_free() local
141 layer = container_of(head, struct idr_layer, rcu_head); in idr_layer_rcu_free()
142 kmem_cache_free(idr_layer_cache, layer); in idr_layer_rcu_free()
276 new->layer = l-1; in sub_alloc()
277 new->prefix = id & idr_layer_prefix_mask(new->layer); in sub_alloc()
304 p->layer = 0; in idr_get_empty_slot()
318 p->layer++; in idr_get_empty_slot()
340 new->layer = layers-1; in idr_get_empty_slot()
341 new->prefix = id & idr_layer_prefix_mask(new->layer); in idr_get_empty_slot()
653 n = (p->layer+1) * IDR_BITS; in idr_find_slowpath()
655 if (id > idr_max(p->layer + 1)) in idr_find_slowpath()
661 BUG_ON(n != p->layer*IDR_BITS); in idr_find_slowpath()
747 n = (p->layer + 1) * IDR_BITS; in idr_get_next()
748 max = idr_max(p->layer + 1); in idr_get_next()
805 if (id > idr_max(p->layer + 1)) in idr_replace()
808 n = p->layer * IDR_BITS; in idr_replace()