Lines Matching refs:n
57 struct genradix_node *n = genradix_root_to_node(r); in __genradix_ptr() local
64 if (!n) in __genradix_ptr()
71 n = n->children[offset >> genradix_depth_shift(level)]; in __genradix_ptr()
75 return &n->data[offset]; in __genradix_ptr()
108 struct genradix_node *n, *new_node = NULL; in __genradix_ptr_alloc() local
115 n = genradix_root_to_node(r); in __genradix_ptr_alloc()
118 if (n && ilog2(offset) < genradix_depth_shift(level)) in __genradix_ptr_alloc()
127 new_node->children[0] = n; in __genradix_ptr_alloc()
129 ((unsigned long) new_node | (n ? level + 1 : 0))); in __genradix_ptr_alloc()
139 &n->children[offset >> genradix_depth_shift(level)]; in __genradix_ptr_alloc()
142 n = READ_ONCE(*p); in __genradix_ptr_alloc()
143 if (!n) { in __genradix_ptr_alloc()
150 if (!(n = cmpxchg_release(p, NULL, new_node))) in __genradix_ptr_alloc()
151 swap(n, new_node); in __genradix_ptr_alloc()
158 return &n->data[offset]; in __genradix_ptr_alloc()
167 struct genradix_node *n; in __genradix_iter_peek() local
174 n = genradix_root_to_node(r); in __genradix_iter_peek()
186 while (!n->children[i]) { in __genradix_iter_peek()
197 n = n->children[i]; in __genradix_iter_peek()
200 return &n->data[iter->offset & (PAGE_SIZE - 1)]; in __genradix_iter_peek()
204 static void genradix_free_recurse(struct genradix_node *n, unsigned level) in genradix_free_recurse() argument
210 if (n->children[i]) in genradix_free_recurse()
211 genradix_free_recurse(n->children[i], level - 1); in genradix_free_recurse()
214 genradix_free_node(n); in genradix_free_recurse()