Lines Matching refs:ht
44 int vmwgfx_ht_create(struct vmwgfx_open_hash *ht, unsigned int order) in vmwgfx_ht_create() argument
48 ht->order = order; in vmwgfx_ht_create()
49 ht->table = NULL; in vmwgfx_ht_create()
50 if (size <= PAGE_SIZE / sizeof(*ht->table)) in vmwgfx_ht_create()
51 ht->table = kcalloc(size, sizeof(*ht->table), GFP_KERNEL); in vmwgfx_ht_create()
53 ht->table = vzalloc(array_size(size, sizeof(*ht->table))); in vmwgfx_ht_create()
54 if (!ht->table) { in vmwgfx_ht_create()
61 void vmwgfx_ht_verbose_list(struct vmwgfx_open_hash *ht, unsigned long key) in vmwgfx_ht_verbose_list() argument
68 hashed_key = hash_long(key, ht->order); in vmwgfx_ht_verbose_list()
70 h_list = &ht->table[hashed_key]; in vmwgfx_ht_verbose_list()
75 static struct hlist_node *vmwgfx_ht_find_key(struct vmwgfx_open_hash *ht, unsigned long key) in vmwgfx_ht_find_key() argument
81 hashed_key = hash_long(key, ht->order); in vmwgfx_ht_find_key()
82 h_list = &ht->table[hashed_key]; in vmwgfx_ht_find_key()
92 static struct hlist_node *vmwgfx_ht_find_key_rcu(struct vmwgfx_open_hash *ht, unsigned long key) in vmwgfx_ht_find_key_rcu() argument
98 hashed_key = hash_long(key, ht->order); in vmwgfx_ht_find_key_rcu()
99 h_list = &ht->table[hashed_key]; in vmwgfx_ht_find_key_rcu()
109 int vmwgfx_ht_insert_item(struct vmwgfx_open_hash *ht, struct vmwgfx_hash_item *item) in vmwgfx_ht_insert_item() argument
117 hashed_key = hash_long(key, ht->order); in vmwgfx_ht_insert_item()
118 h_list = &ht->table[hashed_key]; in vmwgfx_ht_insert_item()
138 int vmwgfx_ht_just_insert_please(struct vmwgfx_open_hash *ht, struct vmwgfx_hash_item *item, in vmwgfx_ht_just_insert_please() argument
150 ret = vmwgfx_ht_insert_item(ht, item); in vmwgfx_ht_just_insert_please()
162 int vmwgfx_ht_find_item(struct vmwgfx_open_hash *ht, unsigned long key, in vmwgfx_ht_find_item() argument
167 list = vmwgfx_ht_find_key_rcu(ht, key); in vmwgfx_ht_find_item()
175 int vmwgfx_ht_remove_key(struct vmwgfx_open_hash *ht, unsigned long key) in vmwgfx_ht_remove_key() argument
179 list = vmwgfx_ht_find_key(ht, key); in vmwgfx_ht_remove_key()
187 int vmwgfx_ht_remove_item(struct vmwgfx_open_hash *ht, struct vmwgfx_hash_item *item) in vmwgfx_ht_remove_item() argument
193 void vmwgfx_ht_remove(struct vmwgfx_open_hash *ht) in vmwgfx_ht_remove() argument
195 if (ht->table) { in vmwgfx_ht_remove()
196 kvfree(ht->table); in vmwgfx_ht_remove()
197 ht->table = NULL; in vmwgfx_ht_remove()