Lines Matching full:bucket
249 * Request exclusive access to a hash bucket for a given dma_debug_entry.
264 * Give up exclusive access to the hash bucket
266 static void put_hash_bucket(struct hash_bucket *bucket, in put_hash_bucket() argument
268 __releases(&bucket->lock) in put_hash_bucket()
270 spin_unlock_irqrestore(&bucket->lock, flags); in put_hash_bucket()
293 * Search a given entry in the hash bucket list
295 static struct dma_debug_entry *__hash_bucket_find(struct hash_bucket *bucket, in __hash_bucket_find() argument
302 list_for_each_entry(entry, &bucket->list, list) { in __hash_bucket_find()
345 static struct dma_debug_entry *bucket_find_exact(struct hash_bucket *bucket, in bucket_find_exact() argument
348 return __hash_bucket_find(bucket, ref, exact_match); in bucket_find_exact()
351 static struct dma_debug_entry *bucket_find_contain(struct hash_bucket **bucket, in bucket_find_contain() argument
360 entry = __hash_bucket_find(*bucket, ref, containing_match); in bucket_find_contain()
366 * Nothing found, go back a hash bucket in bucket_find_contain()
368 put_hash_bucket(*bucket, *flags); in bucket_find_contain()
370 *bucket = get_hash_bucket(&index, flags); in bucket_find_contain()
377 * Add an entry to a hash bucket
379 static void hash_bucket_add(struct hash_bucket *bucket, in hash_bucket_add() argument
382 list_add_tail(&entry->list, &bucket->list); in hash_bucket_add()
386 * Remove entry from a hash bucket list
525 struct hash_bucket *bucket = &dma_entry_hash[idx]; in debug_dma_dump_mappings() local
529 spin_lock_irqsave(&bucket->lock, flags); in debug_dma_dump_mappings()
530 list_for_each_entry(entry, &bucket->list, list) { in debug_dma_dump_mappings()
542 spin_unlock_irqrestore(&bucket->lock, flags); in debug_dma_dump_mappings()
557 struct hash_bucket *bucket = &dma_entry_hash[idx]; in dump_show() local
561 spin_lock_irqsave(&bucket->lock, flags); in dump_show()
562 list_for_each_entry(entry, &bucket->list, list) { in dump_show()
574 spin_unlock_irqrestore(&bucket->lock, flags); in dump_show()
586 struct hash_bucket *bucket; in add_dma_entry() local
590 bucket = get_hash_bucket(entry, &flags); in add_dma_entry()
591 hash_bucket_add(bucket, entry); in add_dma_entry()
592 put_hash_bucket(bucket, flags); in add_dma_entry()
962 struct hash_bucket *bucket; in check_unmap() local
965 bucket = get_hash_bucket(ref, &flags); in check_unmap()
966 entry = bucket_find_exact(bucket, ref); in check_unmap()
970 put_hash_bucket(bucket, flags); in check_unmap()
1051 put_hash_bucket(bucket, flags); in check_unmap()
1101 struct hash_bucket *bucket; in check_sync() local
1104 bucket = get_hash_bucket(ref, &flags); in check_sync()
1106 entry = bucket_find_contain(&bucket, ref, &flags); in check_sync()
1168 put_hash_bucket(bucket, flags); in check_sync()
1248 struct hash_bucket *bucket; in debug_dma_mapping_error() local
1256 bucket = get_hash_bucket(&ref, &flags); in debug_dma_mapping_error()
1258 list_for_each_entry(entry, &bucket->list, list) { in debug_dma_mapping_error()
1278 put_hash_bucket(bucket, flags); in debug_dma_mapping_error()
1339 struct hash_bucket *bucket; in get_nr_mapped_entries() local
1343 bucket = get_hash_bucket(ref, &flags); in get_nr_mapped_entries()
1344 entry = bucket_find_exact(bucket, ref); in get_nr_mapped_entries()
1349 put_hash_bucket(bucket, flags); in get_nr_mapped_entries()