Home
last modified time | relevance | path

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

12

/linux/lib/zstd/compress/
H A Dzstd_compress.c100 static void ZSTD_initCCtx(ZSTD_CCtx* cctx, ZSTD_customMem memManager) in ZSTD_initCCtx() argument
102 assert(cctx != NULL); in ZSTD_initCCtx()
103 ZSTD_memset(cctx, 0, sizeof(*cctx)); in ZSTD_initCCtx()
104 cctx->customMem = memManager; in ZSTD_initCCtx()
105 cctx->bmi2 = ZSTD_cpuSupportsBmi2(); in ZSTD_initCCtx()
106 { size_t const err = ZSTD_CCtx_reset(cctx, ZSTD_reset_parameters); in ZSTD_initCCtx()
117 { ZSTD_CCtx* const cctx = (ZSTD_CCtx*)ZSTD_customMalloc(sizeof(ZSTD_CCtx), customMem); in ZSTD_createCCtx_advanced() local
118 if (!cctx) return NULL; in ZSTD_createCCtx_advanced()
119 ZSTD_initCCtx(cctx, customMem); in ZSTD_createCCtx_advanced()
120 return cctx; in ZSTD_createCCtx_advanced()
[all …]
/linux/lib/zstd/
H A Dzstd_compress_module.c28 static size_t zstd_cctx_init(zstd_cctx *cctx, const zstd_parameters *parameters, in zstd_cctx_init() argument
32 cctx, ZSTD_reset_session_and_parameters)); in zstd_cctx_init()
34 cctx, pledged_src_size)); in zstd_cctx_init()
36 cctx, ZSTD_c_windowLog, parameters->cParams.windowLog)); in zstd_cctx_init()
38 cctx, ZSTD_c_hashLog, parameters->cParams.hashLog)); in zstd_cctx_init()
40 cctx, ZSTD_c_chainLog, parameters->cParams.chainLog)); in zstd_cctx_init()
42 cctx, ZSTD_c_searchLog, parameters->cParams.searchLog)); in zstd_cctx_init()
44 cctx, ZSTD_c_minMatch, parameters->cParams.minMatch)); in zstd_cctx_init()
46 cctx, ZSTD_c_targetLength, parameters->cParams.targetLength)); in zstd_cctx_init()
48 cctx, ZSTD_c_strategy, parameters->cParams.strategy)); in zstd_cctx_init()
[all …]
/linux/tools/testing/selftests/bpf/progs/
H A Dcrypto_basic.c21 struct bpf_crypto_ctx *cctx; in crypto_release() local
26 cctx = bpf_crypto_ctx_create(&params, sizeof(params), &err); in crypto_release()
28 if (!cctx) { in crypto_release()
33 bpf_crypto_ctx_release(cctx); in crypto_release()
47 struct bpf_crypto_ctx *cctx; in crypto_acquire() local
52 cctx = bpf_crypto_ctx_create(&params, sizeof(params), &err); in crypto_acquire()
54 if (!cctx) { in crypto_acquire()
59 cctx = bpf_crypto_ctx_acquire(cctx); in crypto_acquire()
60 if (!cctx) in crypto_acquire()
63 bpf_crypto_ctx_release(cctx); in crypto_acquire()
H A Dcrypto_bench.c24 struct bpf_crypto_ctx *cctx; in crypto_setup() local
41 cctx = bpf_crypto_ctx_create(&params, sizeof(params), &err); in crypto_setup()
43 if (!cctx) { in crypto_setup()
48 err = crypto_ctx_insert(cctx); in crypto_setup()
H A Dcrypto_sanity.c61 struct bpf_crypto_ctx *cctx; in skb_crypto_setup() local
73 cctx = bpf_crypto_ctx_create(&params, sizeof(params), &err); in skb_crypto_setup()
74 if (!cctx) { in skb_crypto_setup()
79 err = crypto_ctx_insert(cctx); in skb_crypto_setup()
/linux/drivers/misc/
H A Dfastrpc.c250 struct fastrpc_channel_ctx *cctx; member
291 struct fastrpc_channel_ctx *cctx; member
302 struct fastrpc_channel_ctx *cctx; member
316 static inline dma_addr_t fastrpc_ipa_to_dma_addr(struct fastrpc_channel_ctx *cctx, dma_addr_t iova) in fastrpc_ipa_to_dma_addr() argument
318 if (!cctx->soc_data->sid_pos) in fastrpc_ipa_to_dma_addr()
320 return iova & GENMASK_ULL(cctx->soc_data->sid_pos - 1, 0); in fastrpc_ipa_to_dma_addr()
327 static inline u64 fastrpc_sid_offset(struct fastrpc_channel_ctx *cctx, in fastrpc_sid_offset() argument
330 return (u64)sctx->sid << cctx->soc_data->sid_pos; in fastrpc_sid_offset()
342 int vmid = map->fl->cctx->vmperms[0].vmid; in fastrpc_free_map()
418 fastrpc_ipa_to_dma_addr(buf->fl->cctx, buf->dma_addr)); in fastrpc_buf_free()
[all …]
/linux/drivers/gpu/drm/nouveau/nvkm/engine/fifo/
H A Dchan.c41 nvkm_chan_cctx_bind(struct nvkm_chan *chan, struct nvkm_engn *engn, struct nvkm_cctx *cctx) in nvkm_chan_cctx_bind() argument
50 CHAN_TRACE(chan, "%sbind cctx %d[%s]", cctx ? "" : "un", engn->id, engine->subdev.name); in nvkm_chan_cctx_bind()
62 engn->func->bind(engn, cctx, chan); in nvkm_chan_cctx_bind()
74 struct nvkm_cctx *cctx = *pcctx; in nvkm_chan_cctx_put() local
76 if (cctx) { in nvkm_chan_cctx_put()
77 struct nvkm_engn *engn = cctx->vctx->ectx->engn; in nvkm_chan_cctx_put()
79 if (refcount_dec_and_mutex_lock(&cctx->refs, &chan->cgrp->mutex)) { in nvkm_chan_cctx_put()
81 nvkm_cgrp_vctx_put(chan->cgrp, &cctx->vctx); in nvkm_chan_cctx_put()
82 list_del(&cctx->head); in nvkm_chan_cctx_put()
83 kfree(cctx); in nvkm_chan_cctx_put()
[all …]
H A Duchan.c70 struct nvkm_cctx *cctx; member
79 struct nvkm_cctx *cctx = uobj->cctx; in nvkm_uchan_object_fini_1() local
80 struct nvkm_ectx *ectx = cctx->vctx->ectx; in nvkm_uchan_object_fini_1()
86 if (refcount_dec_and_mutex_lock(&cctx->uses, &chan->cgrp->mutex)) { in nvkm_uchan_object_fini_1()
102 struct nvkm_cctx *cctx = uobj->cctx; in nvkm_uchan_object_init_0() local
103 struct nvkm_ectx *ectx = cctx->vctx->ectx; in nvkm_uchan_object_init_0()
110 if (!refcount_inc_not_zero(&cctx->uses)) { in nvkm_uchan_object_init_0()
112 if (!refcount_inc_not_zero(&cctx->uses)) { in nvkm_uchan_object_init_0()
120 nvkm_chan_cctx_bind(chan, ectx->engn, cctx); in nvkm_uchan_object_init_0()
121 refcount_set(&cctx->uses, 1); in nvkm_uchan_object_init_0()
[all …]
H A Dgv100.c91 gv100_ectx_bind(struct nvkm_engn *engn, struct nvkm_cctx *cctx, struct nvkm_chan *chan) in gv100_ectx_bind() argument
95 if (cctx) { in gv100_ectx_bind()
96 addr = cctx->vctx->vma->addr; in gv100_ectx_bind()
103 nvkm_mo32(chan->inst, 0x0ac, 0x00010000, cctx ? 0x00010000 : 0x00000000); in gv100_ectx_bind()
116 gv100_ectx_ce_bind(struct nvkm_engn *engn, struct nvkm_cctx *cctx, struct nvkm_chan *chan) in gv100_ectx_ce_bind() argument
118 const u64 bar2 = cctx ? nvkm_memory_bar2(cctx->vctx->inst->memory) : 0ULL; in gv100_ectx_ce_bind()
123 nvkm_mo32(chan->inst, 0x0ac, 0x00020000, cctx ? 0x00020000 : 0x00000000); in gv100_ectx_ce_bind()
H A Dg84.c106 g84_ectx_bind(struct nvkm_engn *engn, struct nvkm_cctx *cctx, struct nvkm_chan *chan) in g84_ectx_bind() argument
129 if (!cctx) { in g84_ectx_bind()
139 start = cctx->vctx->inst->addr; in g84_ectx_bind()
140 limit = start + cctx->vctx->inst->size - 1; in g84_ectx_bind()
H A Dnv40.c125 nv40_ectx_bind(struct nvkm_engn *engn, struct nvkm_cctx *cctx, struct nvkm_chan *chan) in nv40_ectx_bind() argument
149 if (cctx) in nv40_ectx_bind()
150 inst = cctx->vctx->inst->addr >> 4; in nv40_ectx_bind()
H A Dnv50.c150 nv50_ectx_bind(struct nvkm_engn *engn, struct nvkm_cctx *cctx, struct nvkm_chan *chan) in nv50_ectx_bind() argument
165 if (!cctx) { in nv50_ectx_bind()
189 start = cctx->vctx->inst->addr; in nv50_ectx_bind()
190 limit = start + cctx->vctx->inst->size - 1; in nv50_ectx_bind()
/linux/include/linux/
H A Dzstd_lib.h261 ZSTDLIB_API size_t ZSTD_freeCCtx(ZSTD_CCtx* cctx); /* compatible with NULL pointer */
271 ZSTDLIB_API size_t ZSTD_compressCCtx(ZSTD_CCtx* cctx,
549 ZSTDLIB_API size_t ZSTD_CCtx_setParameter(ZSTD_CCtx* cctx, ZSTD_cParameter param, int value);
566 ZSTDLIB_API size_t ZSTD_CCtx_setPledgedSrcSize(ZSTD_CCtx* cctx, unsigned long long pledgedSrcSize);
588 ZSTDLIB_API size_t ZSTD_CCtx_reset(ZSTD_CCtx* cctx, ZSTD_ResetDirective reset);
602 ZSTDLIB_API size_t ZSTD_compress2( ZSTD_CCtx* cctx,
802 ZSTDLIB_API size_t ZSTD_compressStream2( ZSTD_CCtx* cctx,
991 ZSTDLIB_API size_t ZSTD_compress_usingCDict(ZSTD_CCtx* cctx,
1087 ZSTDLIB_API size_t ZSTD_CCtx_loadDictionary(ZSTD_CCtx* cctx, const void* dict, size_t dictSize);
1101 ZSTDLIB_API size_t ZSTD_CCtx_refCDict(ZSTD_CCtx* cctx, const ZSTD_CDict* cdict);
[all …]
H A Dzstd.h186 size_t zstd_cctx_set_param(zstd_cctx *cctx, zstd_cparameter param, int value);
241 size_t zstd_compress_cctx(zstd_cctx *cctx, void *dst, size_t dst_capacity,
258 size_t zstd_free_cctx(zstd_cctx* cctx);
305 size_t zstd_compress_using_cdict(zstd_cctx *cctx, void *dst,
627 zstd_cctx *cctx,
686 size_t zstd_compress_sequences_and_literals(zstd_cctx *cctx, void* dst, size_t dst_capacity,
/linux/drivers/infiniband/hw/bnxt_re/
H A Dqplib_res.h313 struct bnxt_qplib_chip_ctx *cctx; member
330 static inline bool bnxt_qplib_is_chip_gen_p7(struct bnxt_qplib_chip_ctx *cctx) in bnxt_qplib_is_chip_gen_p7() argument
332 return (cctx->chip_num == CHIP_NUM_58818 || in bnxt_qplib_is_chip_gen_p7()
333 cctx->chip_num == CHIP_NUM_57608); in bnxt_qplib_is_chip_gen_p7()
336 static inline bool bnxt_qplib_is_chip_gen_p5(struct bnxt_qplib_chip_ctx *cctx) in bnxt_qplib_is_chip_gen_p5() argument
338 return (cctx->chip_num == CHIP_NUM_57508 || in bnxt_qplib_is_chip_gen_p5()
339 cctx->chip_num == CHIP_NUM_57504 || in bnxt_qplib_is_chip_gen_p5()
340 cctx->chip_num == CHIP_NUM_57502); in bnxt_qplib_is_chip_gen_p5()
343 static inline bool bnxt_qplib_is_chip_gen_p5_p7(struct bnxt_qplib_chip_ctx *cctx) in bnxt_qplib_is_chip_gen_p5_p7() argument
345 return bnxt_qplib_is_chip_gen_p5(cctx) || bnxt_qplib_is_chip_gen_p7(cctx); in bnxt_qplib_is_chip_gen_p5_p7()
[all …]
H A Dmain.c91 struct bnxt_qplib_chip_ctx *cctx; in bnxt_re_set_db_offset() local
101 cctx = rdev->chip_ctx; in bnxt_re_set_db_offset()
109 if (bnxt_qplib_is_chip_gen_p7(cctx)) { in bnxt_re_set_db_offset()
124 if (cctx->modes.db_push && l2db_len && en_dev->l2_db_size != barlen) { in bnxt_re_set_db_offset()
132 struct bnxt_qplib_chip_ctx *cctx; in bnxt_re_set_drv_mode() local
134 cctx = rdev->chip_ctx; in bnxt_re_set_drv_mode()
135 cctx->modes.wqe_mode = bnxt_qplib_is_chip_gen_p7(rdev->chip_ctx) ? in bnxt_re_set_drv_mode()
141 cctx->modes.toggle_bits |= BNXT_QPLIB_CQ_TOGGLE_BIT; in bnxt_re_set_drv_mode()
142 cctx->modes.toggle_bits |= BNXT_QPLIB_SRQ_TOGGLE_BIT; in bnxt_re_set_drv_mode()
159 rdev->qplib_res.cctx = NULL; in bnxt_re_destroy_chip_ctx()
[all …]
H A Dqplib_sp.c62 if (!bnxt_qplib_is_chip_gen_p5_p7(rcfw->res->cctx)) in bnxt_qplib_is_atomic_cap()
99 struct bnxt_qplib_chip_ctx *cctx; in bnxt_qplib_get_dev_attr() local
105 cctx = rcfw->res->cctx; in bnxt_qplib_get_dev_attr()
134 if (!bnxt_qplib_is_chip_gen_p5_p7(rcfw->res->cctx)) { in bnxt_qplib_get_dev_attr()
143 if (cctx->modes.wqe_mode == BNXT_QPLIB_WQE_MODE_VARIABLE) in bnxt_qplib_get_dev_attr()
146 attr->max_qp_sges = cctx->modes.wqe_mode == BNXT_QPLIB_WQE_MODE_VARIABLE ? in bnxt_qplib_get_dev_attr()
150 if (!bnxt_qplib_is_chip_gen_p7(rcfw->res->cctx)) in bnxt_qplib_get_dev_attr()
166 if (!bnxt_qplib_is_chip_gen_p7(rcfw->res->cctx)) in bnxt_qplib_get_dev_attr()
192 if (rcfw->res->cctx->hwrm_intf_ver >= HWRM_VERSION_DEV_ATTR_MAX_DPI) in bnxt_qplib_get_dev_attr()
817 if (bnxt_qplib_is_chip_gen_p7(rcfw->res->cctx) && rcfw->res->is_vf) in bnxt_qplib_qext_stat()
[all …]
/linux/drivers/block/zram/
H A Dbackend_deflate.c15 struct z_stream_s cctx; member
40 if (zctx->cctx.workspace) { in deflate_destroy()
41 zlib_deflateEnd(&zctx->cctx); in deflate_destroy()
42 vfree(zctx->cctx.workspace); in deflate_destroy()
63 zctx->cctx.workspace = vzalloc(sz); in deflate_create()
64 if (!zctx->cctx.workspace) in deflate_create()
67 ret = zlib_deflateInit2(&zctx->cctx, params->level, Z_DEFLATED, in deflate_create()
96 deflate = &zctx->cctx; in deflate_compress()
H A Dbackend_zstd.c11 zstd_cctx *cctx; member
109 zstd_free_cctx(zctx->cctx); in zstd_destroy()
137 zctx->cctx = zstd_init_cctx(zctx->cctx_mem, sz); in zstd_create()
138 if (!zctx->cctx) in zstd_create()
152 zctx->cctx = zstd_create_cctx_advanced(zp->custom_mem); in zstd_create()
153 if (!zctx->cctx) in zstd_create()
177 ret = zstd_compress_cctx(zctx->cctx, req->dst, req->dst_len, in zstd_compress()
180 ret = zstd_compress_using_cdict(zctx->cctx, req->dst, in zstd_compress()
/linux/crypto/
H A Dzstd.c25 zstd_cctx *cctx; member
83 ctx->cctx = zstd_init_cctx(ctx->wksp, ctx->wksp_size); in zstd_compress_one()
84 if (!ctx->cctx) in zstd_compress_one()
87 out_len = zstd_compress_cctx(ctx->cctx, dst, req->dlen, src, req->slen, in zstd_compress_one()
118 ctx->cctx = zstd_init_cstream(&ctx->params, 0, ctx->wksp, ctx->wksp_size); in zstd_compress()
119 if (!ctx->cctx) { in zstd_compress()
154 num_bytes = zstd_compress_stream(ctx->cctx, &outbuf, &inbuf); in zstd_compress()
160 pending_bytes = zstd_flush_stream(ctx->cctx, &outbuf); in zstd_compress()
173 num_bytes = zstd_end_stream(ctx->cctx, &outbuf); in zstd_compress()
H A Dcamellia_generic.c963 struct camellia_ctx *cctx = crypto_tfm_ctx(tfm); in camellia_set_key() local
969 cctx->key_length = key_len; in camellia_set_key()
973 camellia_setup128(key, cctx->key_table); in camellia_set_key()
976 camellia_setup192(key, cctx->key_table); in camellia_set_key()
979 camellia_setup256(key, cctx->key_table); in camellia_set_key()
988 const struct camellia_ctx *cctx = crypto_tfm_ctx(tfm); in camellia_encrypt() local
998 if (cctx->key_length == 16) in camellia_encrypt()
1003 camellia_do_encrypt(cctx->key_table, tmp, max); in camellia_encrypt()
1014 const struct camellia_ctx *cctx = crypto_tfm_ctx(tfm); in camellia_decrypt() local
1024 if (cctx->key_length == 16) in camellia_decrypt()
[all …]
/linux/drivers/pinctrl/intel/
H A Dpinctrl-cherryview.c750 struct intel_community_context *cctx = &pctrl->context.communities[0]; in chv_gpio_request_enable() local
754 for (i = 0; i < ARRAY_SIZE(cctx->intr_lines); i++) { in chv_gpio_request_enable()
755 if (cctx->intr_lines[i] == offset) { in chv_gpio_request_enable()
756 cctx->intr_lines[i] = CHV_INVALID_HWIRQ; in chv_gpio_request_enable()
1244 struct intel_community_context *cctx = &pctrl->context.communities[0]; in chv_gpio_irq_startup() local
1259 if (cctx->intr_lines[intsel] == CHV_INVALID_HWIRQ) { in chv_gpio_irq_startup()
1263 cctx->intr_lines[intsel] = hwirq; in chv_gpio_irq_startup()
1274 struct intel_community_context *cctx = &pctrl->context.communities[0]; in chv_gpio_set_intr_line() local
1282 if (cctx->intr_lines[intsel] == pin) in chv_gpio_set_intr_line()
1285 if (cctx->intr_lines[intsel] == CHV_INVALID_HWIRQ) { in chv_gpio_set_intr_line()
[all …]
/linux/drivers/infiniband/hw/bng_re/
H A Dbng_dev.c63 rdev->bng_res.cctx = NULL; in bng_re_destroy_chip_ctx()
84 rdev->bng_res.cctx = rdev->chip_ctx; in bng_re_setup_chip_ctx()
218 struct bng_re_chip_ctx *cctx; in bng_re_query_hwrm_version() local
236 cctx = rdev->chip_ctx; in bng_re_query_hwrm_version()
237 cctx->hwrm_intf_ver = in bng_re_query_hwrm_version()
243 cctx->hwrm_cmd_max_timeout = le16_to_cpu(ver_get_resp.max_req_timeout); in bng_re_query_hwrm_version()
245 if (!cctx->hwrm_cmd_max_timeout) in bng_re_query_hwrm_version()
246 cctx->hwrm_cmd_max_timeout = BNG_ROCE_FW_MAX_TIMEOUT; in bng_re_query_hwrm_version()
H A Dbng_res.h137 struct bng_re_chip_ctx *cctx; member
178 struct bng_re_chip_ctx *cctx, in bng_re_ring_nq_db() argument
213 struct bng_re_chip_ctx *cctx,
/linux/arch/x86/crypto/
H A Dcamellia_glue.c1231 int __camellia_setkey(struct camellia_ctx *cctx, const unsigned char *key, in __camellia_setkey() argument
1237 cctx->key_length = key_len; in __camellia_setkey()
1241 camellia_setup128(key, cctx->key_table); in __camellia_setkey()
1244 camellia_setup192(key, cctx->key_table); in __camellia_setkey()
1247 camellia_setup256(key, cctx->key_table); in __camellia_setkey()

12