Lines Matching refs:offset
97 unsigned int offset = (index >> parent->shift) & RADIX_TREE_MAP_MASK; in radix_tree_descend() local
98 void __rcu **entry = rcu_dereference_raw(parent->slots[offset]); in radix_tree_descend()
101 return offset; in radix_tree_descend()
110 int offset) in tag_set() argument
112 __set_bit(offset, node->tags[tag]); in tag_set()
116 int offset) in tag_clear() argument
118 __clear_bit(offset, node->tags[tag]); in tag_clear()
122 int offset) in tag_get() argument
124 return test_bit(offset, node->tags[tag]); in tag_get()
190 unsigned long offset) in radix_tree_find_next_bit() argument
194 if (offset < RADIX_TREE_MAP_SIZE) { in radix_tree_find_next_bit()
197 addr += offset / BITS_PER_LONG; in radix_tree_find_next_bit()
198 tmp = *addr >> (offset % BITS_PER_LONG); in radix_tree_find_next_bit()
200 return __ffs(tmp) + offset; in radix_tree_find_next_bit()
201 offset = (offset + BITS_PER_LONG) & ~(BITS_PER_LONG - 1); in radix_tree_find_next_bit()
202 while (offset < RADIX_TREE_MAP_SIZE) { in radix_tree_find_next_bit()
205 return __ffs(tmp) + offset; in radix_tree_find_next_bit()
206 offset += BITS_PER_LONG; in radix_tree_find_next_bit()
232 unsigned long offset) in next_index() argument
234 return (index & ~node_maxindex(node)) + (offset << node->shift); in next_index()
244 unsigned int shift, unsigned int offset, in radix_tree_node_alloc() argument
290 ret->offset = offset; in radix_tree_node_alloc()
569 parent->slots[node->offset] = NULL; in delete_node()
614 unsigned int shift, offset = 0; in __radix_tree_create() local
634 offset, 0, 0); in __radix_tree_create()
645 offset = radix_tree_descend(node, &child, index); in __radix_tree_create()
646 slot = &node->slots[offset]; in __radix_tree_create()
667 unsigned offset = 0; in radix_tree_free_nodes() local
671 void *entry = rcu_dereference_raw(child->slots[offset]); in radix_tree_free_nodes()
674 offset = 0; in radix_tree_free_nodes()
677 offset++; in radix_tree_free_nodes()
678 while (offset == RADIX_TREE_MAP_SIZE) { in radix_tree_free_nodes()
680 offset = child->offset + 1; in radix_tree_free_nodes()
730 unsigned offset = get_slot_offset(node, slot); in radix_tree_insert() local
731 BUG_ON(tag_get(node, 0, offset)); in radix_tree_insert()
732 BUG_ON(tag_get(node, 1, offset)); in radix_tree_insert()
733 BUG_ON(tag_get(node, 2, offset)); in radix_tree_insert()
772 unsigned offset; in __radix_tree_lookup() local
775 offset = radix_tree_descend(parent, &node, index); in __radix_tree_lookup()
776 slot = parent->slots + offset; in __radix_tree_lookup()
845 unsigned int tag, unsigned int offset) in node_tag_get() argument
848 return tag_get(node, tag, offset); in node_tag_get()
864 unsigned offset = get_slot_offset(node, slot); in calculate_count() local
865 bool free = node_tag_get(root, node, IDR_FREE, offset); in calculate_count()
948 unsigned int tag, unsigned int offset) in node_tag_set() argument
951 if (tag_get(node, tag, offset)) in node_tag_set()
953 tag_set(node, tag, offset); in node_tag_set()
954 offset = node->offset; in node_tag_set()
985 unsigned offset; in radix_tree_tag_set() local
988 offset = radix_tree_descend(parent, &node, index); in radix_tree_tag_set()
991 if (!tag_get(parent, tag, offset)) in radix_tree_tag_set()
992 tag_set(parent, tag, offset); in radix_tree_tag_set()
1005 unsigned int tag, unsigned int offset) in node_tag_clear() argument
1008 if (!tag_get(node, tag, offset)) in node_tag_clear()
1010 tag_clear(node, tag, offset); in node_tag_clear()
1014 offset = node->offset; in node_tag_clear()
1042 int uninitialized_var(offset); in radix_tree_tag_clear()
1052 offset = radix_tree_descend(parent, &node, index); in radix_tree_tag_clear()
1056 node_tag_clear(root, parent, tag, offset); in radix_tree_tag_clear()
1103 unsigned offset; in radix_tree_tag_get() local
1106 offset = radix_tree_descend(parent, &node, index); in radix_tree_tag_get()
1108 if (!tag_get(parent, tag, offset)) in radix_tree_tag_get()
1120 struct radix_tree_node *node, unsigned offset, in set_iter_tags() argument
1123 unsigned tag_long = offset / BITS_PER_LONG; in set_iter_tags()
1124 unsigned tag_bit = offset % BITS_PER_LONG; in set_iter_tags()
1168 unsigned long index, offset, maxindex; in radix_tree_next_chunk() local
1204 offset = radix_tree_descend(node, &child, index); in radix_tree_next_chunk()
1207 !tag_get(node, tag, offset) : !child) { in radix_tree_next_chunk()
1213 offset = radix_tree_find_next_bit(node, tag, in radix_tree_next_chunk()
1214 offset + 1); in radix_tree_next_chunk()
1216 while (++offset < RADIX_TREE_MAP_SIZE) { in radix_tree_next_chunk()
1218 node->slots[offset]); in radix_tree_next_chunk()
1223 index += offset << node->shift; in radix_tree_next_chunk()
1227 if (offset == RADIX_TREE_MAP_SIZE) in radix_tree_next_chunk()
1229 child = rcu_dereference_raw(node->slots[offset]); in radix_tree_next_chunk()
1239 iter->index = (index &~ node_maxindex(node)) | offset; in radix_tree_next_chunk()
1244 set_iter_tags(iter, node, offset, tag); in radix_tree_next_chunk()
1246 return node->slots + offset; in radix_tree_next_chunk()
1378 unsigned offset = get_slot_offset(node, slot); in __radix_tree_delete() local
1382 node_tag_set(root, node, IDR_FREE, offset); in __radix_tree_delete()
1385 node_tag_clear(root, node, tag, offset); in __radix_tree_delete()
1492 unsigned int shift, offset = 0; in idr_get_free() local
1516 offset, 0, 0); in idr_get_free()
1527 offset = radix_tree_descend(node, &child, start); in idr_get_free()
1528 if (!tag_get(node, IDR_FREE, offset)) { in idr_get_free()
1529 offset = radix_tree_find_next_bit(node, IDR_FREE, in idr_get_free()
1530 offset + 1); in idr_get_free()
1531 start = next_index(start, node, offset); in idr_get_free()
1534 while (offset == RADIX_TREE_MAP_SIZE) { in idr_get_free()
1535 offset = node->offset + 1; in idr_get_free()
1541 child = rcu_dereference_raw(node->slots[offset]); in idr_get_free()
1543 slot = &node->slots[offset]; in idr_get_free()
1552 set_iter_tags(iter, node, offset, IDR_FREE); in idr_get_free()