| /linux-5.15/block/ |
| A D | blk-mq-tag.c | 37 atomic_inc(&hctx->tags->active_queues); in __blk_mq_tag_busy() 46 void blk_mq_tag_wakeup_all(struct blk_mq_tags *tags, bool include_reserve) in blk_mq_tag_wakeup_all() argument 48 sbitmap_queue_wake_all(tags->bitmap_tags); in blk_mq_tag_wakeup_all() 50 sbitmap_queue_wake_all(tags->breserved_tags); in blk_mq_tag_wakeup_all() 59 struct blk_mq_tags *tags = hctx->tags; in __blk_mq_tag_idle() local 71 atomic_dec(&tags->active_queues); in __blk_mq_tag_idle() 74 blk_mq_tag_wakeup_all(tags, false); in __blk_mq_tag_idle() 92 struct blk_mq_tags *tags = blk_mq_tags_from_data(data); in blk_mq_get_tag() local 100 if (unlikely(!tags->nr_reserved_tags)) { in blk_mq_get_tag() 104 bt = tags->breserved_tags; in blk_mq_get_tag() [all …]
|
| A D | blk-mq-tag.h | 34 extern void blk_mq_free_tags(struct blk_mq_tags *tags, unsigned int flags); 44 extern void blk_mq_put_tag(struct blk_mq_tags *tags, struct blk_mq_ctx *ctx, 47 struct blk_mq_tags **tags, 52 extern void blk_mq_tag_wakeup_all(struct blk_mq_tags *tags, bool); 55 void blk_mq_all_tag_iter(struct blk_mq_tags *tags, busy_tag_iter_fn *fn, 91 static inline bool blk_mq_tag_is_reserved(struct blk_mq_tags *tags, in blk_mq_tag_is_reserved() argument 94 return tag < tags->nr_reserved_tags; in blk_mq_tag_is_reserved()
|
| A D | blk-mq.c | 272 blk_mq_tag_wakeup_all(hctx->tags, true); in blk_mq_wake_waiters() 287 struct blk_mq_tags *tags = blk_mq_tags_from_data(data); in blk_mq_rq_ctx_init() local 288 struct request *rq = tags->static_rqs[tag]; in blk_mq_rq_ctx_init() 507 blk_mq_put_tag(hctx->tags, ctx, rq->tag); in __blk_mq_free_request() 847 struct request *blk_mq_tag_to_rq(struct blk_mq_tags *tags, unsigned int tag) in blk_mq_tag_to_rq() argument 849 if (tag < tags->nr_tags) { in blk_mq_tag_to_rq() 850 prefetch(tags->rqs[tag]); in blk_mq_tag_to_rq() 851 return tags->rqs[tag]; in blk_mq_tag_to_rq() 1072 struct sbitmap_queue *bt = rq->mq_hctx->tags->bitmap_tags; in __blk_mq_get_driver_tag() 1073 unsigned int tag_offset = rq->mq_hctx->tags->nr_reserved_tags; in __blk_mq_get_driver_tag() [all …]
|
| A D | blk-mq.h | 55 void blk_mq_free_rqs(struct blk_mq_tag_set *set, struct blk_mq_tags *tags, 57 void blk_mq_free_rq_map(struct blk_mq_tags *tags, unsigned int flags); 63 int blk_mq_alloc_rqs(struct blk_mq_tag_set *set, struct blk_mq_tags *tags, 173 return data->hctx->tags; in blk_mq_tags_from_data() 183 return hctx->nr_ctx && hctx->tags; in blk_mq_hw_queue_mapped() 246 blk_mq_put_tag(hctx->tags, rq->mq_ctx, rq->tag); in __blk_mq_put_driver_tag() 344 users = atomic_read(&hctx->tags->active_queues); in hctx_may_queue()
|
| /linux-5.15/drivers/gpu/drm/nouveau/nvkm/core/ |
| A D | memory.c | 34 struct nvkm_tags *tags = *ptags; in nvkm_memory_tags_put() local 35 if (tags) { in nvkm_memory_tags_put() 36 mutex_lock(&fb->tags.mutex); in nvkm_memory_tags_put() 37 if (refcount_dec_and_test(&tags->refcount)) { in nvkm_memory_tags_put() 38 nvkm_mm_free(&fb->tags.mm, &tags->mn); in nvkm_memory_tags_put() 39 kfree(memory->tags); in nvkm_memory_tags_put() 40 memory->tags = NULL; in nvkm_memory_tags_put() 42 mutex_unlock(&fb->tags.mutex); in nvkm_memory_tags_put() 53 struct nvkm_tags *tags; in nvkm_memory_tags_get() local 55 mutex_lock(&fb->tags.mutex); in nvkm_memory_tags_get() [all …]
|
| /linux-5.15/fs/erofs/ |
| A D | tagptr.h | 57 const typeof(_tags) tags = (_tags); \ 58 if (__builtin_constant_p(tags) && (tags & ~__tagptr_mask(type))) \ 60 tagptr_init(type, (uintptr_t)(ptr) | tags); }) 86 #define tagptr_replace_tags(_ptptr, tags) ({ \ argument 88 *ptptr = tagptr_fold(*ptptr, tagptr_unfold_ptr(*ptptr), tags); \ 93 const typeof(_tags) tags = (_tags); \ 94 if (__builtin_constant_p(tags) && (tags & ~__tagptr_mask(*ptptr))) \ 96 ptptr->v |= tags; \ 101 const typeof(_tags) tags = (_tags); \ 102 if (__builtin_constant_p(tags) && (tags & ~__tagptr_mask(*ptptr))) \ [all …]
|
| /linux-5.15/arch/arm64/mm/ |
| A D | mteswap.c | 51 void *tags = xa_load(&mte_pages, entry.val); in mte_restore_tags() local 53 if (!tags) in mte_restore_tags() 65 mte_restore_page_tags(page_address(page), tags); in mte_restore_tags() 73 void *tags = xa_erase(&mte_pages, entry.val); in mte_invalidate_tags() local 75 mte_free_tag_storage(tags); in mte_invalidate_tags() 82 void *tags; in mte_invalidate_tags_area() local 87 xas_for_each(&xa_state, tags, last_entry.val - 1) { in mte_invalidate_tags_area() 89 mte_free_tag_storage(tags); in mte_invalidate_tags_area()
|
| /linux-5.15/drivers/gpu/drm/nouveau/nvkm/subdev/fb/ |
| A D | nv20.c | 47 u32 tags = round_up(tiles / fb->ram->parts, 0x40); in nv20_fb_tile_comp() local 48 if (!nvkm_mm_head(&fb->tags.mm, 0, 1, tags, tags, 1, &tile->tag)) { in nv20_fb_tile_comp() 66 nvkm_mm_free(&fb->tags.mm, &tile->tag); in nv20_fb_tile_fini() 83 const u32 tags = nvkm_rd32(fb->subdev.device, 0x100320); in nv20_fb_tags() local 84 return tags ? tags + 1 : 0; in nv20_fb_tags() 89 .tags = nv20_fb_tags,
|
| A D | nv35.c | 34 u32 tags = round_up(tiles / fb->ram->parts, 0x40); in nv35_fb_tile_comp() local 35 if (!nvkm_mm_head(&fb->tags.mm, 0, 1, tags, tags, 1, &tile->tag)) { in nv35_fb_tile_comp() 39 tile->zcomp |= ((tile->tag->offset + tags - 1) >> 6) << 13; in nv35_fb_tile_comp() 48 .tags = nv20_fb_tags,
|
| A D | nv36.c | 34 u32 tags = round_up(tiles / fb->ram->parts, 0x40); in nv36_fb_tile_comp() local 35 if (!nvkm_mm_head(&fb->tags.mm, 0, 1, tags, tags, 1, &tile->tag)) { in nv36_fb_tile_comp() 39 tile->zcomp |= ((tile->tag->offset + tags - 1) >> 6) << 14; in nv36_fb_tile_comp() 48 .tags = nv20_fb_tags,
|
| A D | nv40.c | 34 u32 tags = round_up(tiles / fb->ram->parts, 0x100); in nv40_fb_tile_comp() local 36 !nvkm_mm_head(&fb->tags.mm, 0, 1, tags, tags, 1, &tile->tag)) { in nv40_fb_tile_comp() 39 tile->zcomp |= ((tile->tag->offset + tags - 1) >> 8) << 13; in nv40_fb_tile_comp() 54 .tags = nv20_fb_tags,
|
| A D | nv25.c | 34 u32 tags = round_up(tiles / fb->ram->parts, 0x40); in nv25_fb_tile_comp() local 35 if (!nvkm_mm_head(&fb->tags.mm, 0, 1, tags, tags, 1, &tile->tag)) { in nv25_fb_tile_comp() 47 .tags = nv20_fb_tags,
|
| A D | base.c | 100 u32 tags = 0; in nvkm_fb_oneinit() local 120 if (fb->func->tags) { in nvkm_fb_oneinit() 121 tags = fb->func->tags(fb); in nvkm_fb_oneinit() 122 nvkm_debug(subdev, "%d comptags\n", tags); in nvkm_fb_oneinit() 125 return nvkm_mm_init(&fb->tags.mm, 0, 0, tags, 1); in nvkm_fb_oneinit() 208 nvkm_mm_fini(&fb->tags.mm); in nvkm_fb_dtor() 209 mutex_destroy(&fb->tags.mutex); in nvkm_fb_dtor() 236 mutex_init(&fb->tags.mutex); in nvkm_fb_ctor()
|
| A D | nv30.c | 53 u32 tags = round_up(tiles / fb->ram->parts, 0x40); in nv30_fb_tile_comp() local 54 if (!nvkm_mm_head(&fb->tags.mm, 0, 1, tags, tags, 1, &tile->tag)) { in nv30_fb_tile_comp() 58 tile->zcomp |= ((tile->tag->offset + tags - 1) >> 6) << 12; in nv30_fb_tile_comp() 119 .tags = nv20_fb_tags,
|
| /linux-5.15/arch/arm/kernel/ |
| H A D | atags_parse.c | 179 struct tag *tags = (struct tag *)&default_tags; in setup_machine_tags() local 199 tags = atags_vaddr; in setup_machine_tags() 201 tags = (void *)(PAGE_OFFSET + mdesc->atag_offset); in setup_machine_tags() 208 if (tags->hdr.tag != ATAG_CORE) in setup_machine_tags() 209 convert_to_tag_list(tags); in setup_machine_tags() 211 if (tags->hdr.tag != ATAG_CORE) { in setup_machine_tags() 213 tags = (struct tag *)&default_tags; in setup_machine_tags() 217 mdesc->fixup(tags, &from); in setup_machine_tags() 219 if (tags->hdr.tag == ATAG_CORE) { in setup_machine_tags() 221 squash_mem_tags(tags); in setup_machine_tags() [all …]
|
| /linux-5.15/drivers/gpu/drm/nouveau/nvkm/subdev/volt/ |
| A D | gpio.c | 30 static const u8 tags[] = { variable 42 for (i = 0; i < ARRAY_SIZE(tags); i++) { in nvkm_voltgpio_get() 44 int ret = nvkm_gpio_get(gpio, 0, tags[i], 0xff); in nvkm_voltgpio_get() 60 for (i = 0; i < ARRAY_SIZE(tags); i++, vid >>= 1) { in nvkm_voltgpio_set() 62 int ret = nvkm_gpio_set(gpio, 0, tags[i], 0xff, vid & 1); in nvkm_voltgpio_set() 85 for (i = 0; i < ARRAY_SIZE(tags); i++) { in nvkm_voltgpio_init() 87 int ret = nvkm_gpio_find(gpio, 0, tags[i], 0xff, &func); in nvkm_voltgpio_init()
|
| /linux-5.15/arch/sparc/kernel/ |
| A D | adi_64.c | 160 unsigned char *tags; in alloc_tag_store() local 284 tags = kzalloc(size, GFP_NOWAIT|__GFP_NOWARN); in alloc_tag_store() 285 if (tags == NULL) { in alloc_tag_store() 291 tag_desc->tags = tags; in alloc_tag_store() 302 unsigned char *tags = NULL; in del_tag_store() local 313 tags = tag_desc->tags; in del_tag_store() 314 tag_desc->tags = NULL; in del_tag_store() 318 kfree(tags); in del_tag_store() 322 ((tag_desc)->tags + ((addr - (tag_desc)->start)/(2*adi_blksize())))
|
| /linux-5.15/arch/arm64/kernel/ |
| A D | mte.c | 293 unsigned long tags, offset; in __access_remote_tags() local 318 tags = min(len, (PAGE_SIZE - offset) / MTE_GRANULE_SIZE); in __access_remote_tags() 322 tags = mte_copy_tags_from_user(maddr + offset, buf, tags); in __access_remote_tags() 325 tags = mte_copy_tags_to_user(buf, maddr + offset, tags); in __access_remote_tags() 330 if (!tags) in __access_remote_tags() 333 len -= tags; in __access_remote_tags() 334 buf += tags; in __access_remote_tags() 335 addr += tags * MTE_GRANULE_SIZE; in __access_remote_tags()
|
| A D | hibernate.c | 271 void *tags; in swsusp_mte_free_storage() local 274 xas_for_each(&xa_state, tags, ULONG_MAX) { in swsusp_mte_free_storage() 275 mte_free_tag_storage(tags); in swsusp_mte_free_storage() 322 void *tags; in swsusp_mte_restore_tags() local 325 xas_for_each(&xa_state, tags, ULONG_MAX) { in swsusp_mte_restore_tags() 334 mte_restore_page_tags(page_address(page), tags); in swsusp_mte_restore_tags() 336 mte_free_tag_storage(tags); in swsusp_mte_restore_tags()
|
| /linux-5.15/tools/testing/selftests/arm64/mte/ |
| A D | mte_common_util.c | 121 bool tags, int fd) in __mte_allocate_memory_range() argument 156 if (tags) in __mte_allocate_memory_range() 168 void *mte_allocate_memory(size_t size, int mem_type, int mapping, bool tags) in mte_allocate_memory() argument 170 return __mte_allocate_memory_range(size, mem_type, mapping, 0, 0, tags, -1); in mte_allocate_memory() 173 void *mte_allocate_file_memory(size_t size, int mem_type, int mapping, bool tags, int fd) in mte_allocate_file_memory() argument 195 return __mte_allocate_memory_range(size, mem_type, mapping, 0, 0, tags, fd); in mte_allocate_file_memory() 226 size_t range_before, size_t range_after, bool tags) in __mte_free_memory_range() argument 234 if (tags) in __mte_free_memory_range() 250 void mte_free_memory(void *ptr, size_t size, int mem_type, bool tags) in mte_free_memory() argument 252 __mte_free_memory_range(ptr, size, mem_type, 0, 0, tags); in mte_free_memory()
|
| A D | mte_common_util.h | 45 void *mte_allocate_memory(size_t size, int mem_type, int mapping, bool tags); 49 bool tags, int fd); 52 void mte_free_memory(void *ptr, size_t size, int mem_type, bool tags); 85 int mem_type, bool tags) in check_allocated_memory() argument 92 if (tags && !MT_FETCH_TAG((uintptr_t)ptr)) { in check_allocated_memory()
|
| /linux-5.15/Documentation/arm64/ |
| A D | memory-tagging-extension.rst | 36 To access the allocation tags, a user process must enable the Tagged 40 ``PROT_MTE`` - Pages allow access to the MTE allocation tags. 44 supported and the allocation tags can be shared between processes. 55 ``MADV_FREE`` may have the allocation tags cleared (set to 0) at any 62 the logical and allocation tags occurs on access, there are three 104 **Note**: There are no *match-all* logical tags available for user 118 The architecture allows excluding certain tags to be randomly generated 120 excludes all tags other than 0. A user thread can enable specific tags 122 flags, 0, 0, 0)`` system call where ``flags`` contains the tags bitmap 162 - ``PR_MTE_TAG_MASK`` set to 0 (all tags excluded) [all …]
|
| A D | tagged-pointers.rst | 38 Using non-zero address tags in any of these locations when the 44 passing non-zero address tags to the kernel via system calls is 49 address tags may suffer impaired or inaccurate debug and profiling 53 Preserving tags 56 When delivering signals, non-zero tags are not preserved in 59 that signal handlers in applications making use of tags cannot rely 73 Non-zero tags are never preserved in sigcontext.fault_address
|
| /linux-5.15/include/linux/ |
| H A D | radix-tree.h | 107 unsigned long tags; member 341 iter->tags = 0; in radix_tree_iter_retry() 399 iter->tags >>= 1; in radix_tree_next_slot() 400 if (unlikely(!iter->tags)) in radix_tree_next_slot() 402 if (likely(iter->tags & 1ul)) { in radix_tree_next_slot() 408 unsigned offset = __ffs(iter->tags); in radix_tree_next_slot() 410 iter->tags >>= offset++; in radix_tree_next_slot()
|
| /linux-5.15/Documentation/sparc/ |
| A D | adi.rst | 6 ADI allows a task to set version tags on any subset of its address 7 space. Once ADI is enabled and version tags are set for ranges of 26 be repeated for entire page to set tags for entire page. 34 SPARC M7 processor, MMU uses bits 63-60 for version tags and ADI block 41 kernel sets the PSTATE.mcde bit fot the task. Version tags for memory 61 - Version tags are set on virtual addresses from userspace even though 62 tags are stored in physical memory. Tags are set on a physical page 66 - When a task frees a memory page it had set version tags on, the page 69 version tags as well for the page. If a page allocated to a task is 70 freed and allocated back to the same task, old version tags set by the [all …]
|