| /lib/ |
| D | radix-tree.c | 100 static inline void tag_set(struct radix_tree_node *node, unsigned int tag, in tag_set() argument 103 __set_bit(offset, node->tags[tag]); in tag_set() 106 static inline void tag_clear(struct radix_tree_node *node, unsigned int tag, in tag_clear() argument 109 __clear_bit(offset, node->tags[tag]); in tag_clear() 112 static inline int tag_get(const struct radix_tree_node *node, unsigned int tag, in tag_get() argument 115 return test_bit(offset, node->tags[tag]); in tag_get() 152 static inline int any_tag_set(const struct radix_tree_node *node, in any_tag_set() argument 157 if (node->tags[tag][idx]) in any_tag_set() 163 static inline void all_tag_set(struct radix_tree_node *node, unsigned int tag) in all_tag_set() argument 165 bitmap_fill(node->tags[tag], RADIX_TREE_MAP_SIZE); in all_tag_set() [all …]
|
| D | bootconfig.c | 131 int __init xbc_node_index(struct xbc_node *node) in xbc_node_index() argument 133 return node - &xbc_nodes[0]; in xbc_node_index() 143 struct xbc_node * __init xbc_node_get_parent(struct xbc_node *node) in xbc_node_get_parent() argument 145 return node->parent == XBC_NODE_MAX ? NULL : &xbc_nodes[node->parent]; in xbc_node_get_parent() 155 struct xbc_node * __init xbc_node_get_child(struct xbc_node *node) in xbc_node_get_child() argument 157 return node->child ? &xbc_nodes[node->child] : NULL; in xbc_node_get_child() 169 struct xbc_node * __init xbc_node_get_next(struct xbc_node *node) in xbc_node_get_next() argument 171 return node->next ? &xbc_nodes[node->next] : NULL; in xbc_node_get_next() 181 const char * __init xbc_node_get_data(struct xbc_node *node) in xbc_node_get_data() argument 183 int offset = node->data & ~XBC_VALUE; in xbc_node_get_data() [all …]
|
| D | btree.c | 94 unsigned long *node; in btree_node_alloc() local 96 node = mempool_alloc(head->mempool, gfp); in btree_node_alloc() 97 if (likely(node)) in btree_node_alloc() 98 memset(node, 0, NODESIZE); in btree_node_alloc() 99 return node; in btree_node_alloc() 147 static unsigned long *bkey(struct btree_geo *geo, unsigned long *node, int n) in bkey() argument 149 return &node[n * geo->keylen]; in bkey() 152 static void *bval(struct btree_geo *geo, unsigned long *node, int n) in bval() argument 154 return (void *)node[geo->no_longs + n]; in bval() 157 static void setkey(struct btree_geo *geo, unsigned long *node, int n, in setkey() argument [all …]
|
| D | rbtree.c | 85 __rb_insert(struct rb_node *node, struct rb_root *root, in __rb_insert() argument 88 struct rb_node *parent = rb_red_parent(node), *gparent, *tmp; in __rb_insert() 100 rb_set_parent_color(node, NULL, RB_BLACK); in __rb_insert() 133 node = gparent; in __rb_insert() 134 parent = rb_parent(node); in __rb_insert() 135 rb_set_parent_color(node, parent, RB_RED); in __rb_insert() 140 if (node == tmp) { in __rb_insert() 154 tmp = node->rb_left; in __rb_insert() 156 WRITE_ONCE(node->rb_left, parent); in __rb_insert() 160 rb_set_parent_color(parent, node, RB_RED); in __rb_insert() [all …]
|
| D | xarray.c | 80 static inline unsigned long *node_marks(struct xa_node *node, xa_mark_t mark) in node_marks() argument 82 return node->marks[(__force unsigned)mark]; in node_marks() 85 static inline bool node_get_mark(struct xa_node *node, in node_get_mark() argument 88 return test_bit(offset, node_marks(node, mark)); in node_get_mark() 92 static inline bool node_set_mark(struct xa_node *node, unsigned int offset, in node_set_mark() argument 95 return __test_and_set_bit(offset, node_marks(node, mark)); in node_set_mark() 99 static inline bool node_clear_mark(struct xa_node *node, unsigned int offset, in node_clear_mark() argument 102 return __test_and_clear_bit(offset, node_marks(node, mark)); in node_clear_mark() 105 static inline bool node_any_mark(struct xa_node *node, xa_mark_t mark) in node_any_mark() argument 107 return !bitmap_empty(node_marks(node, mark), XA_CHUNK_SIZE); in node_any_mark() [all …]
|
| D | timerqueue.c | 18 rb_entry((_n), struct timerqueue_node, node) 35 bool timerqueue_add(struct timerqueue_head *head, struct timerqueue_node *node) in timerqueue_add() argument 38 WARN_ON_ONCE(!RB_EMPTY_NODE(&node->node)); in timerqueue_add() 40 return rb_add_cached(&node->node, &head->rb_root, __timerqueue_less); in timerqueue_add() 53 bool timerqueue_del(struct timerqueue_head *head, struct timerqueue_node *node) in timerqueue_del() argument 55 WARN_ON_ONCE(RB_EMPTY_NODE(&node->node)); in timerqueue_del() 57 rb_erase_cached(&node->node, &head->rb_root); in timerqueue_del() 58 RB_CLEAR_NODE(&node->node); in timerqueue_del() 73 struct timerqueue_node *timerqueue_iterate_next(struct timerqueue_node *node) in timerqueue_iterate_next() argument 77 if (!node) in timerqueue_iterate_next() [all …]
|
| D | maple_tree.c | 170 static inline void mt_free_one(struct maple_node *node) in mt_free_one() argument 172 kmem_cache_free(maple_node_cache, node); in mt_free_one() 182 struct maple_node *node = container_of(head, struct maple_node, rcu); in mt_free_rcu() local 184 kmem_cache_free(maple_node_cache, node); in mt_free_rcu() 194 static void ma_free_rcu(struct maple_node *node) in ma_free_rcu() argument 196 WARN_ON(node->parent != ma_parent_ptr(node)); in ma_free_rcu() 197 call_rcu(&node->rcu, mt_free_rcu); in ma_free_rcu() 254 mas->node = MA_ERROR(err); in mas_set_err() 314 return mte_to_node(mas->node); in mas_mn() 334 static inline struct maple_enode *mt_mk_node(const struct maple_node *node, in mt_mk_node() argument [all …]
|
| D | rbtree_test.c | 32 static void insert(struct test_node *node, struct rb_root_cached *root) in insert() argument 35 u32 key = node->key; in insert() 45 rb_link_node(&node->rb, parent, new); in insert() 46 rb_insert_color(&node->rb, &root->rb_root); in insert() 49 static void insert_cached(struct test_node *node, struct rb_root_cached *root) in insert_cached() argument 52 u32 key = node->key; in insert_cached() 65 rb_link_node(&node->rb, parent, new); in insert_cached() 66 rb_insert_color_cached(&node->rb, root, leftmost); in insert_cached() 69 static inline void erase(struct test_node *node, struct rb_root_cached *root) in erase() argument 71 rb_erase(&node->rb, &root->rb_root); in erase() [all …]
|
| D | plist.c | 73 void plist_add(struct plist_node *node, struct plist_head *head) in plist_add() argument 79 WARN_ON(!plist_node_empty(node)); in plist_add() 80 WARN_ON(!list_empty(&node->prio_list)); in plist_add() 89 if (node->prio < iter->prio) { in plist_add() 92 } else if (node->prio >= reverse_iter->prio) { in plist_add() 108 if (!prev || prev->prio != node->prio) in plist_add() 109 list_add_tail(&node->prio_list, &iter->prio_list); in plist_add() 111 list_add_tail(&node->node_list, node_next); in plist_add() 122 void plist_del(struct plist_node *node, struct plist_head *head) in plist_del() argument 126 if (!list_empty(&node->prio_list)) { in plist_del() [all …]
|
| D | assoc_array.c | 26 const struct assoc_array_node *node; in assoc_array_subtree_iterate() local 40 node = assoc_array_ptr_to_node(cursor); in assoc_array_subtree_iterate() 52 ptr = READ_ONCE(node->slots[slot]); /* Address dependency. */ in assoc_array_subtree_iterate() 79 node = assoc_array_ptr_to_node(cursor); in assoc_array_subtree_iterate() 81 ptr = READ_ONCE(node->slots[slot]); /* Address dependency. */ in assoc_array_subtree_iterate() 90 parent = READ_ONCE(node->back_pointer); /* Address dependency. */ in assoc_array_subtree_iterate() 91 slot = node->parent_slot; in assoc_array_subtree_iterate() 153 struct assoc_array_node *node; /* Node in which leaf might be found */ member 176 struct assoc_array_node *node; in assoc_array_walk() local 206 node = assoc_array_ptr_to_node(cursor); in assoc_array_walk() [all …]
|
| D | hashtable_test.c | 15 struct hlist_node node; member 43 hash_add(hash, &a.node, a.key); in hashtable_test_hash_empty() 56 hash_add(hash, &a.node, a.key); in hashtable_test_hash_hashed() 59 hash_add(hash, &b.node, b.key); in hashtable_test_hash_hashed() 61 KUNIT_EXPECT_TRUE(test, hash_hashed(&a.node)); in hashtable_test_hash_hashed() 62 KUNIT_EXPECT_TRUE(test, hash_hashed(&b.node)); in hashtable_test_hash_hashed() 74 hash_add(hash, &a.node, a.key); in hashtable_test_hash_add() 78 hash_add(hash, &b.node, b.key); in hashtable_test_hash_add() 80 hash_for_each(hash, bkt, x, node) { in hashtable_test_hash_add() 102 hash_add(hash, &a.node, a.key); in hashtable_test_hash_del() [all …]
|
| D | union_find.c | 13 struct uf_node *uf_find(struct uf_node *node) in uf_find() argument 17 while (node->parent != node) { in uf_find() 18 parent = node->parent; in uf_find() 19 node->parent = parent->parent; in uf_find() 20 node = parent; in uf_find() 22 return node; in uf_find()
|
| D | group_cpus.c | 48 int node; in alloc_node_to_cpumask() local 54 for (node = 0; node < nr_node_ids; node++) { in alloc_node_to_cpumask() 55 if (!zalloc_cpumask_var(&masks[node], GFP_KERNEL)) in alloc_node_to_cpumask() 62 while (--node >= 0) in alloc_node_to_cpumask() 63 free_cpumask_var(masks[node]); in alloc_node_to_cpumask() 70 int node; in free_node_to_cpumask() local 72 for (node = 0; node < nr_node_ids; node++) in free_node_to_cpumask() 73 free_cpumask_var(masks[node]); in free_node_to_cpumask()
|
| D | debugobjects.c | 151 obj = hlist_entry(obj_to_free.first, typeof(*obj), node); in fill_pool() 152 hlist_del(&obj->node); in fill_pool() 154 hlist_add_head(&obj->node, &obj_pool); in fill_pool() 177 hlist_add_head(&new[--cnt]->node, &obj_pool); in fill_pool() 193 hlist_for_each_entry(obj, &b->list, node) { in lookup_object() 212 obj = hlist_entry(list->first, typeof(*obj), node); in __alloc_object() 213 hlist_del(&obj->node); in __alloc_object() 252 hlist_add_head(&obj2->node, in alloc_object() 274 hlist_add_head(&obj->node, &b->list); in alloc_object() 307 obj = hlist_entry(obj_to_free.first, typeof(*obj), node); in free_obj_work() [all …]
|
| D | objagg.c | 740 struct objagg_tmp_node *node = &graph->nodes[index]; in objagg_tmp_graph_node_weight() local 741 unsigned int weight = node->objagg_obj->stats.user_count; in objagg_tmp_graph_node_weight() 751 node = &graph->nodes[j]; in objagg_tmp_graph_node_weight() 752 if (node->crossed_out) in objagg_tmp_graph_node_weight() 754 weight += node->objagg_obj->stats.user_count; in objagg_tmp_graph_node_weight() 761 struct objagg_tmp_node *node; in objagg_tmp_graph_node_max_weight() local 768 node = &graph->nodes[i]; in objagg_tmp_graph_node_max_weight() 769 if (node->crossed_out) in objagg_tmp_graph_node_max_weight() 784 struct objagg_tmp_node *node; in objagg_tmp_graph_create() local 804 node = &graph->nodes[i++]; in objagg_tmp_graph_create() [all …]
|
| D | interval_tree_test.c | 32 struct interval_tree_node *node; in search() local 35 for (node = interval_tree_iter_first(root, start, last); node; in search() 36 node = interval_tree_iter_next(node, start, last)) in search()
|
| D | cpumask.c | 60 bool alloc_cpumask_var_node(cpumask_var_t *mask, gfp_t flags, int node) in alloc_cpumask_var_node() argument 62 *mask = kmalloc_node(cpumask_size(), flags, node); in alloc_cpumask_var_node() 143 unsigned int cpumask_local_spread(unsigned int i, int node) in cpumask_local_spread() argument 150 cpu = sched_numa_find_nth_cpu(cpu_online_mask, i, node); in cpumask_local_spread()
|
| D | interval_tree.c | 7 #define START(node) ((node)->start) argument 8 #define LAST(node) ((node)->last) argument
|
| D | idr.c | 292 struct radix_tree_node *node; in idr_replace() local 298 entry = __radix_tree_lookup(&idr->idr_rt, id, &node, &slot); in idr_replace() 302 __radix_tree_replace(&idr->idr_rt, node, slot, ptr); in idr_replace() 569 struct xa_node *node = xa_to_node(entry); in ida_dump_entry() local 570 unsigned int shift = node->shift + IDA_CHUNK_SHIFT + in ida_dump_entry() 574 xa_dump_node(node); in ida_dump_entry() 576 ida_dump_entry(node->slots[i], in ida_dump_entry() 577 index | (i << node->shift)); in ida_dump_entry()
|
| D | alloc_tag.c | 49 loff_t node = *pos; in allocinfo_start() local 56 priv->print_header = (node == 0); in allocinfo_start() 59 while ((ct = codetag_next_ct(&priv->iter)) != NULL && node) in allocinfo_start() 60 node--; in allocinfo_start() 519 ret = ERR_PTR(xa_err(mas.node)); in reserve_module_tags() 528 ret = ERR_PTR(xa_err(mas.node)); in reserve_module_tags() 534 ret = ERR_PTR(xa_err(mas.node)); in reserve_module_tags()
|
| D | klist.c | 175 struct klist_node *node; member 192 if (waiter->node != n) in klist_release() 242 waiter.node = n; in klist_remove()
|
| /lib/842/ |
| D | 842_compress.c | 68 struct hlist_node node; member 74 struct hlist_node node; member 80 struct hlist_node node; member 115 for (_i = 0; _i < ARRAY_SIZE((p)->node##b); _i++) { \ 116 (p)->node##b[_i].index = _i; \ 117 (p)->node##b[_i].data = 0; \ 118 INIT_HLIST_NODE(&(p)->node##b[_i].node); \ 125 hash_for_each_possible(p->htable##b, _n, node, p->data##b[n]) { \ 140 struct sw842_hlist_node##b *_n = &(p)->node##b[(i)+(d)]; \ 141 hash_del(&_n->node); \ [all …]
|
| /lib/kunit/ |
| D | string-stream.c | 36 list_del(&frag->node); in string_stream_fragment_destroy() 84 list_add_tail(&frag_container->node, &stream->fragments); in string_stream_vadd() 110 node) { in string_stream_clear() 128 list_for_each_entry(frag_container, &stream->fragments, node) in string_stream_get_string()
|
| D | resource.c | 40 list_add_tail(&res->node, &test->resources); in __kunit_add_resource() 54 was_linked = !list_empty(&res->node); in kunit_remove_resource() 55 list_del_init(&res->node); in kunit_remove_resource()
|
| /lib/zlib_deflate/ |
| D | deftree.c | 494 int node; /* new node being created */ in build_tree() local 517 node = s->heap[++(s->heap_len)] = (max_code < 2 ? ++max_code : 0); in build_tree() 518 tree[node].Freq = 1; in build_tree() 519 s->depth[node] = 0; in build_tree() 520 s->opt_len--; if (stree) s->static_len -= stree[node].Len; in build_tree() 533 node = elems; /* next internal node of the tree */ in build_tree() 542 tree[node].Freq = tree[n].Freq + tree[m].Freq; in build_tree() 543 s->depth[node] = (uch) (max(s->depth[n], s->depth[m]) + 1); in build_tree() 544 tree[n].Dad = tree[m].Dad = (ush)node; in build_tree() 548 node, tree[node].Freq, n, tree[n].Freq, m, tree[m].Freq); in build_tree() [all …]
|