Home
last modified time | relevance | path

Searched refs:tctx (Results 1 – 25 of 25) sorted by relevance

/linux/io_uring/
H A Dtctx.c13 #include "tctx.h"
48 struct io_uring_task *tctx = tsk->io_uring; in __io_uring_free() local
58 if (tctx) { in __io_uring_free()
59 xa_for_each(&tctx->xa, index, node) { in __io_uring_free()
63 WARN_ON_ONCE(tctx->io_wq); in __io_uring_free()
64 WARN_ON_ONCE(tctx->cached_refs); in __io_uring_free()
66 percpu_counter_destroy(&tctx->inflight); in __io_uring_free()
67 kfree(tctx); in __io_uring_free()
80 struct io_uring_task *tctx; in io_uring_alloc_task_context() local
83 tctx in io_uring_alloc_task_context()
112 io_tctx_install_node(struct io_ring_ctx * ctx,struct io_uring_task * tctx) io_tctx_install_node() argument
141 struct io_uring_task *tctx = current->io_uring; __io_uring_add_tctx_node() local
213 struct io_uring_task *tctx = current->io_uring; io_uring_del_tctx_node() local
237 io_uring_clean_tctx(struct io_uring_task * tctx) io_uring_clean_tctx() argument
259 struct io_uring_task *tctx = current->io_uring; io_uring_unreg_ringfd() local
270 io_ring_add_registered_file(struct io_uring_task * tctx,struct file * file,int start,int end) io_ring_add_registered_file() argument
285 io_ring_add_registered_fd(struct io_uring_task * tctx,int fd,int start,int end) io_ring_add_registered_fd() argument
317 struct io_uring_task *tctx; io_ringfd_register() local
375 struct io_uring_task *tctx = current->io_uring; io_ringfd_unregister() local
[all...]
H A Dcancel.c14 #include "tctx.h"
78 static int io_async_cancel_one(struct io_uring_task *tctx, in io_async_cancel_one() argument
85 if (!tctx || !tctx->io_wq) in io_async_cancel_one()
89 cancel_ret = io_wq_cancel_cb(tctx->io_wq, io_cancel_cb, cd, all); in io_async_cancel_one()
105 int io_try_cancel(struct io_uring_task *tctx, struct io_cancel_data *cd, in io_try_cancel() argument
111 WARN_ON_ONCE(!io_wq_current_is_worker() && tctx != current->io_uring); in io_try_cancel()
113 ret = io_async_cancel_one(tctx, cd); in io_try_cancel()
175 struct io_uring_task *tctx, in __io_async_cancel() argument
184 ret = io_try_cancel(tctx, c in __io_async_cancel()
220 struct io_uring_task *tctx = req->tctx; io_async_cancel() local
247 __io_sync_cancel(struct io_uring_task * tctx,struct io_cancel_data * cd,int fd) __io_sync_cancel() argument
357 io_cancel_remove_all(struct io_ring_ctx * ctx,struct io_uring_task * tctx,struct hlist_head * list,bool cancel_all,bool (* cancel)(struct io_kiocb *)) io_cancel_remove_all() argument
414 io_match_task_safe(struct io_kiocb * head,struct io_uring_task * tctx,bool cancel_all) io_match_task_safe() argument
444 struct io_uring_task *tctx; global() member
457 io_cancel_defer_files(struct io_ring_ctx * ctx,struct io_uring_task * tctx,bool cancel_all) io_cancel_defer_files() argument
498 struct io_uring_task *tctx = node->task->io_uring; io_uring_try_cancel_iowq() local
516 io_uring_try_cancel_requests(struct io_ring_ctx * ctx,struct io_uring_task * tctx,bool cancel_all,bool is_sqpoll_thread) io_uring_try_cancel_requests() argument
573 tctx_inflight(struct io_uring_task * tctx,bool tracked) tctx_inflight() argument
586 struct io_uring_task *tctx = current->io_uring; io_uring_cancel_generic() local
[all...]
H A Dtw.c12 #include "tctx.h"
33 struct io_uring_task *tctx = container_of(work, struct io_uring_task, in io_fallback_req_func()
38 clear_bit(0, &tctx->tw_pending); in ctx_flush_and_put()
46 tctx_task_work_run(tctx, UINT_MAX, &count); in ctx_flush_and_put()
47 put_task_struct(tctx->task);
50 static void io_fallback_tw(struct io_uring_task *tctx)
54 * only called when the task itself is freed, ensures the tctx (and in io_handle_tw_list()
57 get_task_struct(tctx->task); in io_handle_tw_list()
58 if (!queue_work(system_unbound_wq, &tctx->fallback_work)) in io_handle_tw_list()
59 put_task_struct(tctx in io_handle_tw_list()
116 io_fallback_tw(struct io_uring_task * tctx,bool sync) io_fallback_tw() argument
123 tctx_task_work_run(struct io_uring_task * tctx,unsigned int max_entries,unsigned int * count) tctx_task_work_run() argument
145 struct io_uring_task *tctx; tctx_task_work() local
241 struct io_uring_task *tctx = req->tctx; io_req_normal_work_add() local
[all...]
H A Dio_uring.c74 #include "tctx.h"
156 req->tctx = IO_URING_PTR_POISON; in io_poison_cached_req()
322 atomic_dec(&req->tctx->inflight_tracked); in io_clean_op()
341 atomic_inc(&req->tctx->inflight_tracked); in io_req_track_inflight()
410 struct io_uring_task *tctx = req->tctx; in io_queue_iowq()
412 BUG_ON(!tctx); in io_queue_iowq()
414 if ((current->flags & PF_KTHREAD) || !tctx->io_wq) { in io_queue_iowq()
429 if (WARN_ON_ONCE(!same_thread_group(tctx->task, current))) in io_queue_iowq()
433 io_wq_enqueue(tctx in io_queue_iowq()
409 struct io_uring_task *tctx = req->tctx; io_queue_iowq() local
601 struct io_uring_task *tctx = req->tctx; io_put_task() local
613 io_task_refs_refill(struct io_uring_task * tctx) io_task_refs_refill() argument
624 struct io_uring_task *tctx = task->io_uring; io_uring_drop_tctx_refs() local
2306 struct io_uring_task *tctx = current->io_uring; io_tctx_exit_cb() local
2580 struct io_uring_task *tctx = current->io_uring; io_uring_ctx_get_file() local
2982 struct io_uring_task *tctx; io_uring_create() local
[all...]
H A Dio_uring.h196 int io_ring_add_registered_file(struct io_uring_task *tctx, struct file *file,
211 void io_task_refs_refill(struct io_uring_task *tctx);
510 struct io_uring_task *tctx = current->io_uring; in io_get_task_refs()
512 tctx->cached_refs -= nr; in io_get_task_refs()
513 if (unlikely(tctx->cached_refs < 0)) in io_get_task_refs()
514 io_task_refs_refill(tctx); in io_get_task_refs()
509 struct io_uring_task *tctx = current->io_uring; io_get_task_refs() local
H A Dregister.c357 struct io_uring_task *tctx = NULL; in io_register_iowq_max_workers() local
384 tctx = tsk->io_uring; in io_register_iowq_max_workers()
387 tctx = current->io_uring; in io_register_iowq_max_workers()
397 if (tctx && tctx->io_wq) { in io_register_iowq_max_workers()
398 ret = io_wq_max_workers(tctx->io_wq, new_count); in io_register_iowq_max_workers()
422 tctx = node->task->io_uring; in io_register_iowq_max_workers()
423 if (WARN_ON_ONCE(!tctx->io_wq)) in io_register_iowq_max_workers()
429 (void)io_wq_max_workers(tctx->io_wq, new_count); in io_register_iowq_max_workers()
H A Dtimeout.c388 ret = io_try_cancel(req->tctx, &cd, 0); in io_req_task_link_timeout()
714 static bool io_match_task(struct io_kiocb *head, struct io_uring_task *tctx, in io_match_task() argument
720 if (tctx && head->tctx != tctx) in io_match_task()
733 __cold bool io_kill_timeouts(struct io_ring_ctx *ctx, struct io_uring_task *tctx, in io_kill_timeouts() argument
748 if (io_match_task(req, tctx, cancel_all)) in io_kill_timeouts()
H A Dwait.c48 struct io_uring_task *tctx = current->io_uring; in current_pending_io() local
50 if (!tctx) in current_pending_io()
52 return percpu_counter_read_positive(&tctx->inflight); in current_pending_io()
H A Dwaitid.c173 bool io_waitid_remove_all(struct io_ring_ctx *ctx, struct io_uring_task *tctx, in io_waitid_remove_all() argument
176 return io_cancel_remove_all(ctx, tctx, &ctx->waitid_list, cancel_all, __io_waitid_cancel); in io_waitid_remove_all()
317 iwa->wo.child_wait.private = req->tctx->task; in io_waitid()
H A During_cmd.h17 struct io_uring_task *tctx, bool cancel_all);
H A Dio-wq.c1446 int io_wq_cpu_affinity(struct io_uring_task *tctx, cpumask_var_t mask) in io_wq_cpu_affinity() argument
1451 if (!tctx || !tctx->io_wq) in io_wq_cpu_affinity()
1458 cpuset_cpus_allowed(tctx->io_wq->task, allowed_mask); in io_wq_cpu_affinity()
1461 cpumask_copy(tctx->io_wq->cpu_mask, mask); in io_wq_cpu_affinity()
1465 cpumask_copy(tctx->io_wq->cpu_mask, allowed_mask); in io_wq_cpu_affinity()
H A Dfutex.c121 bool io_futex_remove_all(struct io_ring_ctx *ctx, struct io_uring_task *tctx, in io_futex_remove_all() argument
124 return io_cancel_remove_all(ctx, tctx, &ctx->futex_list, cancel_all, __io_futex_cancel); in io_futex_remove_all()
H A Dfdinfo.c239 task_work_pending(req->tctx->task)); in __io_uring_show_fdinfo()
H A Dpoll.c733 __cold bool io_poll_remove_all(struct io_ring_ctx *ctx, struct io_uring_task *tctx, in io_poll_remove_all() argument
748 if (io_match_task_safe(req, tctx, cancel_all)) { in io_poll_remove_all()
/linux/tools/testing/selftests/lsm/
H A Dlsm_get_self_attr_test.c145 struct lsm_ctx *tctx = NULL; in TEST() local
191 tctx = ctx; in TEST()
193 ASSERT_EQ(0, strcmp((char *)tctx->ctx, attr)); in TEST()
195 tctx = next_ctx(tctx); in TEST()
196 ASSERT_NE(0, strcmp((char *)tctx->ctx, attr)); in TEST()
204 tctx = ctx; in TEST()
206 ASSERT_EQ(0, strcmp((char *)tctx->ctx, attr)); in TEST()
209 tctx = next_ctx(tctx); in TEST()
210 ASSERT_NE(0, strcmp((char *)tctx->ctx, attr)); in TEST()
218 tctx = ctx; in TEST()
[all …]
/linux/drivers/crypto/
H A Dgeode-aes.c70 geode_aes_crypt(const struct geode_aes_tfm_ctx *tctx, const void *src, in geode_aes_crypt() argument
97 _writefield(AES_WRITEKEY0_REG, tctx->key); in geode_aes_crypt()
113 struct geode_aes_tfm_ctx *tctx = crypto_tfm_ctx(tfm); in geode_setkey_cip() local
115 tctx->keylen = len; in geode_setkey_cip()
118 memcpy(tctx->key, key, len); in geode_setkey_cip()
129 tctx->fallback.cip->base.crt_flags &= ~CRYPTO_TFM_REQ_MASK; in geode_setkey_cip()
130 tctx->fallback.cip->base.crt_flags |= in geode_setkey_cip()
133 return crypto_cipher_setkey(tctx->fallback.cip, key, len); in geode_setkey_cip()
139 struct geode_aes_tfm_ctx *tctx = crypto_skcipher_ctx(tfm); in geode_setkey_skcipher() local
141 tctx->keylen = len; in geode_setkey_skcipher()
[all …]
/linux/crypto/
H A Dessiv.c69 struct essiv_tfm_ctx *tctx = crypto_skcipher_ctx(tfm); in essiv_skcipher_setkey() local
73 crypto_skcipher_clear_flags(tctx->u.skcipher, CRYPTO_TFM_REQ_MASK); in essiv_skcipher_setkey()
74 crypto_skcipher_set_flags(tctx->u.skcipher, in essiv_skcipher_setkey()
77 err = crypto_skcipher_setkey(tctx->u.skcipher, key, keylen); in essiv_skcipher_setkey()
81 err = crypto_shash_tfm_digest(tctx->hash, key, keylen, salt); in essiv_skcipher_setkey()
85 crypto_cipher_clear_flags(tctx->essiv_cipher, CRYPTO_TFM_REQ_MASK); in essiv_skcipher_setkey()
86 crypto_cipher_set_flags(tctx->essiv_cipher, in essiv_skcipher_setkey()
89 return crypto_cipher_setkey(tctx->essiv_cipher, salt, in essiv_skcipher_setkey()
90 crypto_shash_digestsize(tctx->hash)); in essiv_skcipher_setkey()
96 struct essiv_tfm_ctx *tctx = crypto_aead_ctx(tfm); in essiv_aead_setkey() local
[all …]
H A Dblake2b.c20 struct blake2b_tfm_ctx *tctx = crypto_shash_ctx(tfm); in crypto_blake2b_setkey() local
24 memcpy(tctx->key, key, keylen); in crypto_blake2b_setkey()
25 tctx->keylen = keylen; in crypto_blake2b_setkey()
33 const struct blake2b_tfm_ctx *tctx = crypto_shash_ctx(desc->tfm); in crypto_blake2b_init() local
37 tctx->key, tctx->keylen); in crypto_blake2b_init()
57 const struct blake2b_tfm_ctx *tctx = crypto_shash_ctx(desc->tfm); in crypto_blake2b_digest() local
60 blake2b(tctx->key, tctx->keylen, data, len, out, digestsize); in crypto_blake2b_digest()
/linux/tools/testing/selftests/sched_ext/
H A Dselect_cpu_dfl_nodispatch.bpf.c37 struct task_ctx *tctx; in BPF_STRUCT_OPS() local
40 tctx = bpf_task_storage_get(&task_ctx_stor, p, 0, 0); in BPF_STRUCT_OPS()
41 if (!tctx) { in BPF_STRUCT_OPS()
47 &tctx->force_local); in BPF_STRUCT_OPS()
56 struct task_ctx *tctx; in BPF_STRUCT_OPS() local
58 tctx = bpf_task_storage_get(&task_ctx_stor, p, 0, 0); in BPF_STRUCT_OPS()
59 if (!tctx) { in BPF_STRUCT_OPS()
64 if (tctx->force_local) { in BPF_STRUCT_OPS()
66 tctx->force_local = false; in BPF_STRUCT_OPS()
/linux/tools/sched_ext/
H A Dscx_qmap.bpf.c168 struct task_ctx *tctx; BPF_STRUCT_OPS() local
205 struct task_ctx *tctx; BPF_STRUCT_OPS() local
327 struct task_ctx *tctx; update_core_sched_head_seq() local
351 struct task_ctx *tctx; dispatch_highpri() local
402 struct task_ctx *tctx; BPF_STRUCT_OPS() local
447 struct task_ctx *tctx; BPF_STRUCT_OPS() local
573 struct task_ctx *tctx; task_qdist() local
/linux/include/trace/events/
H A Dio_uring.h603 TP_PROTO(void *tctx, unsigned int count),
605 TP_ARGS(tctx, count),
608 __field( void *, tctx )
613 __entry->tctx = tctx;
617 TP_printk("tctx %p, count %u", __entry->tctx, __entry->count)
/linux/arch/arm64/crypto/
H A Dsm4-ce-glue.c577 struct sm4_mac_tfm_ctx *tctx = crypto_shash_ctx(desc->tfm); in sm4_mac_update() local
583 sm4_ce_mac_update(tctx->key.rkey_enc, ctx->digest, p, in sm4_mac_update()
591 struct sm4_mac_tfm_ctx *tctx = crypto_shash_ctx(desc->tfm); in sm4_cmac_finup() local
593 const u8 *consts = tctx->consts; in sm4_cmac_finup()
601 sm4_ce_mac_update(tctx->key.rkey_enc, ctx->digest, consts, 1, in sm4_cmac_finup()
610 struct sm4_mac_tfm_ctx *tctx = crypto_shash_ctx(desc->tfm); in sm4_cbcmac_finup() local
616 sm4_ce_crypt_block(tctx->key.rkey_enc, ctx->digest, in sm4_cbcmac_finup()
/linux/include/linux/io_uring/
H A Dcmd.h161 return cmd_to_io_kiocb(cmd)->tctx->task; in io_uring_cmd_get_task()
/linux/drivers/gpu/drm/xe/
H A Dxe_bo.c1997 struct ttm_operation_ctx tctx = {
2035 err = xe_bo_fault_migrate(bo, &tctx, NULL); in xe_bo_cpu_fault_fastpath()
2108 struct ttm_operation_ctx tctx = { in xe_bo_cpu_fault()
2134 err = xe_bo_fault_migrate(bo, &tctx, &exec); in xe_bo_cpu_fault()
2141 err = xe_bo_wait_usage_kernel(bo, &tctx); in xe_bo_cpu_fault()
3636 * @tctx: A pointer to a struct ttm_operation_ctx or NULL if in xe_place_from_ttm_type()
3650 int xe_bo_migrate(struct xe_bo *bo, u32 mem_type, struct ttm_operation_ctx *tctx,
3663 tctx = tctx ? tctx in xe_bo_migrate()
2004 struct ttm_operation_ctx tctx = { xe_bo_cpu_fault_fastpath() local
2115 struct ttm_operation_ctx tctx = { xe_bo_cpu_fault() local
3657 xe_bo_migrate(struct xe_bo * bo,u32 mem_type,struct ttm_operation_ctx * tctx,struct drm_exec * exec) xe_bo_migrate() argument
[all...]
/linux/include/linux/
H A Dio_uring_types.h494 * List of tctx nodes for this ctx, protected by tctx_lock. For
766 struct io_uring_task *tctx;
736 struct io_uring_task *tctx; global() member