/linux-6.12.1/drivers/media/rc/ |
D | imon.c | 494 static void free_imon_context(struct imon_context *ictx) in free_imon_context() argument 496 struct device *dev = ictx->dev; in free_imon_context() 498 usb_free_urb(ictx->tx_urb); in free_imon_context() 499 WARN_ON(ictx->dev_present_intf0); in free_imon_context() 500 usb_free_urb(ictx->rx_urb_intf0); in free_imon_context() 501 WARN_ON(ictx->dev_present_intf1); in free_imon_context() 502 usb_free_urb(ictx->rx_urb_intf1); in free_imon_context() 503 kfree_rcu(ictx, rcu); in free_imon_context() 515 struct imon_context *ictx = NULL; in display_open() local 528 ictx = usb_get_intfdata(interface); in display_open() [all …]
|
/linux-6.12.1/drivers/iommu/iommufd/ |
D | vfio_compat.c | 15 static struct iommufd_ioas *get_compat_ioas(struct iommufd_ctx *ictx) in get_compat_ioas() argument 19 xa_lock(&ictx->objects); in get_compat_ioas() 20 if (!ictx->vfio_ioas || !iommufd_lock_obj(&ictx->vfio_ioas->obj)) in get_compat_ioas() 22 ioas = ictx->vfio_ioas; in get_compat_ioas() 24 xa_unlock(&ictx->objects); in get_compat_ioas() 36 int iommufd_vfio_compat_ioas_get_id(struct iommufd_ctx *ictx, u32 *out_ioas_id) in iommufd_vfio_compat_ioas_get_id() argument 40 ioas = get_compat_ioas(ictx); in iommufd_vfio_compat_ioas_get_id() 44 iommufd_put_object(ictx, &ioas->obj); in iommufd_vfio_compat_ioas_get_id() 55 int iommufd_vfio_compat_set_no_iommu(struct iommufd_ctx *ictx) in iommufd_vfio_compat_set_no_iommu() argument 59 xa_lock(&ictx->objects); in iommufd_vfio_compat_set_no_iommu() [all …]
|
D | main.c | 32 struct iommufd_object *_iommufd_object_alloc(struct iommufd_ctx *ictx, in _iommufd_object_alloc() argument 54 rc = xa_alloc(&ictx->objects, &obj->id, XA_ZERO_ENTRY, in _iommufd_object_alloc() 73 void iommufd_object_finalize(struct iommufd_ctx *ictx, in iommufd_object_finalize() argument 78 old = xa_store(&ictx->objects, obj->id, obj, GFP_KERNEL); in iommufd_object_finalize() 84 void iommufd_object_abort(struct iommufd_ctx *ictx, struct iommufd_object *obj) in iommufd_object_abort() argument 88 old = xa_erase(&ictx->objects, obj->id); in iommufd_object_abort() 97 void iommufd_object_abort_and_destroy(struct iommufd_ctx *ictx, in iommufd_object_abort_and_destroy() argument 104 iommufd_object_abort(ictx, obj); in iommufd_object_abort_and_destroy() 107 struct iommufd_object *iommufd_get_object(struct iommufd_ctx *ictx, u32 id, in iommufd_get_object() argument 115 xa_lock(&ictx->objects); in iommufd_get_object() [all …]
|
D | iommufd_private.h | 68 int iopt_map_user_pages(struct iommufd_ctx *ictx, struct io_pagetable *iopt, 106 struct iommufd_ctx *ictx; member 112 int iommufd_vfio_ioctl(struct iommufd_ctx *ictx, unsigned int cmd, 164 struct iommufd_object *iommufd_get_object(struct iommufd_ctx *ictx, u32 id, 166 static inline void iommufd_put_object(struct iommufd_ctx *ictx, in iommufd_put_object() argument 175 wake_up_interruptible_all(&ictx->destroy_wait); in iommufd_put_object() 178 void iommufd_object_abort(struct iommufd_ctx *ictx, struct iommufd_object *obj); 179 void iommufd_object_abort_and_destroy(struct iommufd_ctx *ictx, 181 void iommufd_object_finalize(struct iommufd_ctx *ictx, 187 int iommufd_object_remove(struct iommufd_ctx *ictx, [all …]
|
D | ioas.c | 23 struct iommufd_ioas *iommufd_ioas_alloc(struct iommufd_ctx *ictx) in iommufd_ioas_alloc() argument 27 ioas = iommufd_object_alloc(ictx, ioas, IOMMUFD_OBJ_IOAS); in iommufd_ioas_alloc() 46 ioas = iommufd_ioas_alloc(ucmd->ictx); in iommufd_ioas_alloc_ioctl() 54 iommufd_object_finalize(ucmd->ictx, &ioas->obj); in iommufd_ioas_alloc_ioctl() 58 iommufd_object_abort_and_destroy(ucmd->ictx, &ioas->obj); in iommufd_ioas_alloc_ioctl() 74 ioas = iommufd_get_ioas(ucmd->ictx, cmd->ioas_id); in iommufd_ioas_iova_ranges() 108 iommufd_put_object(ucmd->ictx, &ioas->obj); in iommufd_ioas_iova_ranges() 154 ioas = iommufd_get_ioas(ucmd->ictx, cmd->ioas_id); in iommufd_ioas_allow_iovas() 178 iommufd_put_object(ucmd->ictx, &ioas->obj); in iommufd_ioas_allow_iovas() 220 ioas = iommufd_get_ioas(ucmd->ictx, cmd->ioas_id); in iommufd_ioas_map() [all …]
|
D | device.c | 27 xa_cmpxchg(&igroup->ictx->groups, iommu_group_id(igroup->group), igroup, in iommufd_group_release() 60 static struct iommufd_group *iommufd_get_group(struct iommufd_ctx *ictx, in iommufd_get_group() argument 75 xa_lock(&ictx->groups); in iommufd_get_group() 76 igroup = xa_load(&ictx->groups, id); in iommufd_get_group() 78 xa_unlock(&ictx->groups); in iommufd_get_group() 82 xa_unlock(&ictx->groups); in iommufd_get_group() 101 new_igroup->ictx = ictx; in iommufd_get_group() 108 xa_lock(&ictx->groups); in iommufd_get_group() 110 igroup = __xa_cmpxchg(&ictx->groups, id, cur_igroup, new_igroup, in iommufd_get_group() 113 xa_unlock(&ictx->groups); in iommufd_get_group() [all …]
|
D | hw_pagetable.c | 104 iommufd_hwpt_paging_alloc(struct iommufd_ctx *ictx, struct iommufd_ioas *ioas, in iommufd_hwpt_paging_alloc() argument 127 ictx, hwpt_paging, IOMMUFD_OBJ_HWPT_PAGING, common.obj); in iommufd_hwpt_paging_alloc() 198 iommufd_object_abort_and_destroy(ictx, &hwpt->obj); in iommufd_hwpt_paging_alloc() 215 iommufd_hwpt_nested_alloc(struct iommufd_ctx *ictx, in iommufd_hwpt_nested_alloc() argument 233 ictx, hwpt_nested, IOMMUFD_OBJ_HWPT_NESTED, common.obj); in iommufd_hwpt_nested_alloc() 259 iommufd_object_abort_and_destroy(ictx, &hwpt->obj); in iommufd_hwpt_nested_alloc() 287 pt_obj = iommufd_get_object(ucmd->ictx, cmd->pt_id, IOMMUFD_OBJ_ANY); in iommufd_hwpt_alloc() 299 ucmd->ictx, ioas, idev, cmd->flags, false, in iommufd_hwpt_alloc() 310 ucmd->ictx, in iommufd_hwpt_alloc() 336 iommufd_put_object(ucmd->ictx, &fault->obj); in iommufd_hwpt_alloc() [all …]
|
D | fault.c | 352 iommufd_ctx_put(fault->ictx); in iommufd_fault_fops_release() 376 fault = iommufd_object_alloc(ucmd->ictx, fault, IOMMUFD_OBJ_FAULT); in iommufd_fault_alloc() 380 fault->ictx = ucmd->ictx; in iommufd_fault_alloc() 394 iommufd_ctx_get(fault->ictx); in iommufd_fault_alloc() 409 iommufd_object_finalize(ucmd->ictx, &fault->obj); in iommufd_fault_alloc() 419 iommufd_ctx_put(fault->ictx); in iommufd_fault_alloc() 421 iommufd_object_abort_and_destroy(ucmd->ictx, &fault->obj); in iommufd_fault_alloc()
|
/linux-6.12.1/fs/netfs/ |
D | locking.c | 32 static int netfs_block_o_direct(struct netfs_inode *ictx) in netfs_block_o_direct() argument 34 if (!test_bit(NETFS_ICTX_ODIRECT, &ictx->flags)) in netfs_block_o_direct() 36 clear_bit(NETFS_ICTX_ODIRECT, &ictx->flags); in netfs_block_o_direct() 37 return netfs_inode_dio_wait_interruptible(&ictx->inode); in netfs_block_o_direct() 59 struct netfs_inode *ictx = netfs_inode(inode); in netfs_start_io_read() local 64 if (test_bit(NETFS_ICTX_ODIRECT, &ictx->flags) == 0) in netfs_start_io_read() 71 if (netfs_block_o_direct(ictx) < 0) { in netfs_start_io_read() 104 struct netfs_inode *ictx = netfs_inode(inode); in netfs_start_io_write() local 108 if (netfs_block_o_direct(ictx) < 0) { in netfs_start_io_write() 134 struct netfs_inode *ictx = netfs_inode(inode); in netfs_block_buffered() local [all …]
|
D | write_issue.c | 96 struct netfs_inode *ictx; in netfs_create_write_req() local 107 ictx = netfs_inode(wreq->inode); in netfs_create_write_req() 108 if (is_buffered && netfs_is_cache_enabled(ictx)) in netfs_create_write_req() 109 fscache_begin_write_operation(&wreq->cache_resources, netfs_i_cookie(ictx)); in netfs_create_write_req() 115 wreq->io_streams[0].prepare_write = ictx->ops->prepare_write; in netfs_create_write_req() 116 wreq->io_streams[0].issue_write = ictx->ops->issue_write; in netfs_create_write_req() 541 struct netfs_inode *ictx = netfs_inode(mapping->host); in netfs_writepages() local 546 if (!mutex_trylock(&ictx->wb_lock)) { in netfs_writepages() 552 mutex_lock(&ictx->wb_lock); in netfs_writepages() 588 mutex_unlock(&ictx->wb_lock); in netfs_writepages() [all …]
|
D | direct_write.c | 141 struct netfs_inode *ictx = netfs_inode(inode); in netfs_unbuffered_write_iter() local 188 if (end > ictx->zero_point) in netfs_unbuffered_write_iter() 189 ictx->zero_point = end; in netfs_unbuffered_write_iter() 191 fscache_invalidate(netfs_i_cookie(ictx), NULL, i_size_read(inode), in netfs_unbuffered_write_iter()
|
/linux-6.12.1/arch/s390/crypto/ |
D | sha3_512_s390.c | 50 const struct sha3_state *ictx = in; in sha3_512_import() local 52 if (unlikely(ictx->rsizw)) in sha3_512_import() 54 sctx->count = ictx->rsiz; in sha3_512_import() 56 memcpy(sctx->state, ictx->st, sizeof(ictx->st)); in sha3_512_import() 57 memcpy(sctx->buf, ictx->buf, sizeof(ictx->buf)); in sha3_512_import() 58 sctx->first_message_part = ictx->partial; in sha3_512_import() 67 const struct sha3_state *ictx = in; in sha3_384_import() local 69 if (unlikely(ictx->rsizw)) in sha3_384_import() 71 sctx->count = ictx->rsiz; in sha3_384_import() 73 memcpy(sctx->state, ictx->st, sizeof(ictx->st)); in sha3_384_import() [all …]
|
D | sha3_256_s390.c | 49 const struct sha3_state *ictx = in; in sha3_256_import() local 51 sctx->count = ictx->rsiz; in sha3_256_import() 52 memcpy(sctx->state, ictx->st, sizeof(ictx->st)); in sha3_256_import() 53 memcpy(sctx->buf, ictx->buf, sizeof(ictx->buf)); in sha3_256_import() 54 sctx->first_message_part = ictx->partial; in sha3_256_import() 63 const struct sha3_state *ictx = in; in sha3_224_import() local 65 sctx->count = ictx->rsiz; in sha3_224_import() 66 memcpy(sctx->state, ictx->st, sizeof(ictx->st)); in sha3_224_import() 67 memcpy(sctx->buf, ictx->buf, sizeof(ictx->buf)); in sha3_224_import() 68 sctx->first_message_part = ictx->partial; in sha3_224_import()
|
D | sha1_s390.c | 59 const struct sha1_state *ictx = in; in s390_sha1_import() local 61 sctx->count = ictx->count; in s390_sha1_import() 62 memcpy(sctx->state, ictx->state, sizeof(ictx->state)); in s390_sha1_import() 63 memcpy(sctx->buf, ictx->buffer, sizeof(ictx->buffer)); in s390_sha1_import()
|
D | sha512_s390.c | 54 const struct sha512_state *ictx = in; in sha512_import() local 56 if (unlikely(ictx->count[1])) in sha512_import() 58 sctx->count = ictx->count[0]; in sha512_import() 60 memcpy(sctx->state, ictx->state, sizeof(ictx->state)); in sha512_import() 61 memcpy(sctx->buf, ictx->buf, sizeof(ictx->buf)); in sha512_import()
|
D | sha256_s390.c | 52 const struct sha256_state *ictx = in; in sha256_import() local 54 sctx->count = ictx->count; in sha256_import() 55 memcpy(sctx->state, ictx->state, sizeof(ictx->state)); in sha256_import() 56 memcpy(sctx->buf, ictx->buf, sizeof(ictx->buf)); in sha256_import()
|
/linux-6.12.1/include/linux/ |
D | iommufd.h | 21 struct iommufd_device *iommufd_device_bind(struct iommufd_ctx *ictx, 48 iommufd_access_create(struct iommufd_ctx *ictx, 55 void iommufd_ctx_get(struct iommufd_ctx *ictx); 60 void iommufd_ctx_put(struct iommufd_ctx *ictx); 61 bool iommufd_ctx_has_group(struct iommufd_ctx *ictx, struct iommu_group *group); 70 int iommufd_vfio_compat_ioas_get_id(struct iommufd_ctx *ictx, u32 *out_ioas_id); 71 int iommufd_vfio_compat_ioas_create(struct iommufd_ctx *ictx); 72 int iommufd_vfio_compat_set_no_iommu(struct iommufd_ctx *ictx); 79 static inline void iommufd_ctx_put(struct iommufd_ctx *ictx) in iommufd_ctx_put() argument 104 static inline int iommufd_vfio_compat_ioas_create(struct iommufd_ctx *ictx) in iommufd_vfio_compat_ioas_create() argument [all …]
|
D | vfio.h | 114 struct iommufd_ctx *ictx, u32 *out_device_id); 136 int vfio_iommufd_get_dev_id(struct vfio_device *vdev, struct iommufd_ctx *ictx); 138 struct iommufd_ctx *ictx, u32 *out_device_id); 143 struct iommufd_ctx *ictx, u32 *out_device_id); 155 vfio_iommufd_get_dev_id(struct vfio_device *vdev, struct iommufd_ctx *ictx) in vfio_iommufd_get_dev_id() argument 161 ((int (*)(struct vfio_device *vdev, struct iommufd_ctx *ictx, \ 170 ((int (*)(struct vfio_device *vdev, struct iommufd_ctx *ictx, \
|
/linux-6.12.1/drivers/vfio/ |
D | iommufd.c | 14 struct iommufd_ctx *ictx) in vfio_iommufd_device_has_compat_ioas() argument 18 return !iommufd_vfio_compat_ioas_get_id(ictx, &ioas_id); in vfio_iommufd_device_has_compat_ioas() 24 struct iommufd_ctx *ictx = df->iommufd; in vfio_df_iommufd_bind() local 28 return vdev->ops->bind_iommufd(vdev, ictx, &df->devid); in vfio_df_iommufd_bind() 32 struct iommufd_ctx *ictx) in vfio_iommufd_compat_attach_ioas() argument 43 ret = iommufd_vfio_compat_ioas_get_id(ictx, &ioas_id); in vfio_iommufd_compat_attach_ioas() 85 int vfio_iommufd_get_dev_id(struct vfio_device *vdev, struct iommufd_ctx *ictx) in vfio_iommufd_get_dev_id() argument 90 if (vfio_iommufd_device_ictx(vdev) == ictx) in vfio_iommufd_get_dev_id() 97 if (iommufd_ctx_has_group(ictx, group)) in vfio_iommufd_get_dev_id() 114 struct iommufd_ctx *ictx, u32 *out_device_id) in vfio_iommufd_physical_bind() argument [all …]
|
/linux-6.12.1/crypto/ |
D | essiv.c | 270 static int essiv_init_tfm(struct essiv_instance_ctx *ictx, in essiv_init_tfm() argument 277 essiv_cipher = crypto_alloc_cipher(ictx->essiv_cipher_name, 0, 0); in essiv_init_tfm() 281 hash = crypto_alloc_shash(ictx->shash_driver_name, 0, 0); in essiv_init_tfm() 300 struct essiv_instance_ctx *ictx = skcipher_instance_ctx(inst); in essiv_skcipher_init_tfm() local 305 skcipher = crypto_spawn_skcipher(&ictx->u.skcipher_spawn); in essiv_skcipher_init_tfm() 312 err = essiv_init_tfm(ictx, tctx); in essiv_skcipher_init_tfm() 325 struct essiv_instance_ctx *ictx = aead_instance_ctx(inst); in essiv_aead_init_tfm() local 334 aead = crypto_spawn_aead(&ictx->u.aead_spawn); in essiv_aead_init_tfm() 345 err = essiv_init_tfm(ictx, tctx); in essiv_aead_init_tfm() 375 struct essiv_instance_ctx *ictx = skcipher_instance_ctx(inst); in essiv_skcipher_free_instance() local [all …]
|
D | hctr2.c | 337 struct hctr2_instance_ctx *ictx = skcipher_instance_ctx(inst); in hctr2_init_tfm() local 345 xctr = crypto_spawn_skcipher(&ictx->xctr_spawn); in hctr2_init_tfm() 349 blockcipher = crypto_spawn_cipher(&ictx->blockcipher_spawn); in hctr2_init_tfm() 355 polyval = crypto_spawn_shash(&ictx->polyval_spawn); in hctr2_init_tfm() 396 struct hctr2_instance_ctx *ictx = skcipher_instance_ctx(inst); in hctr2_free_instance() local 398 crypto_drop_cipher(&ictx->blockcipher_spawn); in hctr2_free_instance() 399 crypto_drop_skcipher(&ictx->xctr_spawn); in hctr2_free_instance() 400 crypto_drop_shash(&ictx->polyval_spawn); in hctr2_free_instance() 412 struct hctr2_instance_ctx *ictx; in hctr2_create_common() local 423 inst = kzalloc(sizeof(*inst) + sizeof(*ictx), GFP_KERNEL); in hctr2_create_common() [all …]
|
D | authenc.c | 117 struct authenc_instance_ctx *ictx = aead_instance_ctx(inst); in authenc_geniv_ahash_done() local 119 struct ahash_request *ahreq = (void *)(areq_ctx->tail + ictx->reqoff); in authenc_geniv_ahash_done() 137 struct authenc_instance_ctx *ictx = aead_instance_ctx(inst); in crypto_authenc_genicv() local 140 struct ahash_request *ahreq = (void *)(areq_ctx->tail + ictx->reqoff); in crypto_authenc_genicv() 193 struct authenc_instance_ctx *ictx = aead_instance_ctx(inst); in crypto_authenc_encrypt() local 198 ictx->reqoff); in crypto_authenc_encrypt() 231 struct authenc_instance_ctx *ictx = aead_instance_ctx(inst); in crypto_authenc_decrypt_tail() local 233 struct ahash_request *ahreq = (void *)(areq_ctx->tail + ictx->reqoff); in crypto_authenc_decrypt_tail() 235 ictx->reqoff); in crypto_authenc_decrypt_tail() 279 struct authenc_instance_ctx *ictx = aead_instance_ctx(inst); in crypto_authenc_decrypt() local [all …]
|
D | adiantum.c | 430 struct adiantum_instance_ctx *ictx = skcipher_instance_ctx(inst); in adiantum_init_tfm() local 438 streamcipher = crypto_spawn_skcipher(&ictx->streamcipher_spawn); in adiantum_init_tfm() 442 blockcipher = crypto_spawn_cipher(&ictx->blockcipher_spawn); in adiantum_init_tfm() 448 hash = crypto_spawn_shash(&ictx->hash_spawn); in adiantum_init_tfm() 490 struct adiantum_instance_ctx *ictx = skcipher_instance_ctx(inst); in adiantum_free_instance() local 492 crypto_drop_skcipher(&ictx->streamcipher_spawn); in adiantum_free_instance() 493 crypto_drop_cipher(&ictx->blockcipher_spawn); in adiantum_free_instance() 494 crypto_drop_shash(&ictx->hash_spawn); in adiantum_free_instance() 527 struct adiantum_instance_ctx *ictx; in adiantum_create() local 537 inst = kzalloc(sizeof(*inst) + sizeof(*ictx), GFP_KERNEL); in adiantum_create() [all …]
|
D | pcrypt.c | 101 struct pcrypt_instance_ctx *ictx; in pcrypt_aead_encrypt() local 103 ictx = pcrypt_tfm_ictx(aead); in pcrypt_aead_encrypt() 117 err = padata_do_parallel(ictx->psenc, padata, &ctx->cb_cpu); in pcrypt_aead_encrypt() 150 struct pcrypt_instance_ctx *ictx; in pcrypt_aead_decrypt() local 152 ictx = pcrypt_tfm_ictx(aead); in pcrypt_aead_decrypt() 166 err = padata_do_parallel(ictx->psdec, padata, &ctx->cb_cpu); in pcrypt_aead_decrypt() 179 struct pcrypt_instance_ctx *ictx = aead_instance_ctx(inst); in pcrypt_aead_init_tfm() local 183 cpu_index = (unsigned int)atomic_inc_return(&ictx->tfm_count) % in pcrypt_aead_init_tfm() 190 cipher = crypto_spawn_aead(&ictx->spawn); in pcrypt_aead_init_tfm()
|
/linux-6.12.1/drivers/crypto/allwinner/sun4i-ss/ |
D | sun4i-ss-hash.c | 88 const struct md5_state *ictx = in; in sun4i_hash_import_md5() local 93 op->byte_count = ictx->byte_count & ~0x3F; in sun4i_hash_import_md5() 94 op->len = ictx->byte_count & 0x3F; in sun4i_hash_import_md5() 96 memcpy(op->buf, ictx->block, op->len); in sun4i_hash_import_md5() 99 op->hash[i] = ictx->hash[i]; in sun4i_hash_import_md5() 131 const struct sha1_state *ictx = in; in sun4i_hash_import_sha1() local 136 op->byte_count = ictx->count & ~0x3F; in sun4i_hash_import_sha1() 137 op->len = ictx->count & 0x3F; in sun4i_hash_import_sha1() 139 memcpy(op->buf, ictx->buffer, op->len); in sun4i_hash_import_sha1() 142 op->hash[i] = ictx->state[i]; in sun4i_hash_import_sha1()
|