| /linux-6.15/drivers/media/rc/ |
| H A D | imon.c | 529 if (!ictx || ictx->disconnected || !refcount_inc_not_zero(&ictx->users)) { in display_open() 1369 ictx->last_keycode = ictx->kc; in imon_mouse_event() 1536 ictx->kc = ictx->last_keycode; in imon_parse_press_type() 1541 ictx->kc = ictx->last_keycode; in imon_parse_press_type() 1546 ictx->kc = ictx->last_keycode; in imon_parse_press_type() 1615 ictx->pad_mouse = !ictx->pad_mouse; in imon_incoming_packet() 1674 ictx->last_keycode = ictx->kc; in imon_incoming_packet() 2032 ictx->vendor, ictx->product); in imon_init_idev() 2081 ictx->vendor, ictx->product); in imon_init_touch() 2271 ictx->idev = imon_init_idev(ictx); in imon_init_intf0() [all …]
|
| /linux-6.15/drivers/iommu/iommufd/ |
| H A D | vfio_compat.c | 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() 59 xa_lock(&ictx->objects); in iommufd_vfio_compat_set_no_iommu() 60 if (!ictx->vfio_ioas) { in iommufd_vfio_compat_set_no_iommu() 61 ictx->no_iommu_mode = 1; in iommufd_vfio_compat_set_no_iommu() 89 xa_lock(&ictx->objects); in iommufd_vfio_compat_ioas_create() 99 if (ictx->vfio_ioas && iommufd_lock_obj(&ictx->vfio_ioas->obj)) { in iommufd_vfio_compat_ioas_create() 101 iommufd_put_object(ictx, &ictx->vfio_ioas->obj); in iommufd_vfio_compat_ioas_create() [all …]
|
| H A D | main.c | 47 xa_lock(&ictx->objects); in iommufd_object_finalize() 60 xa_lock(&ictx->objects); in iommufd_object_abort() 89 xa_lock(&ictx->objects); in iommufd_get_object() 211 ictx = kzalloc(sizeof(*ictx), GFP_KERNEL_ACCOUNT); in iommufd_fops_open() 212 if (!ictx) in iommufd_fops_open() 228 ictx->file = filp; in iommufd_fops_open() 274 kfree(ictx); in iommufd_fops_release() 402 ucmd.ictx = ictx; in iommufd_fops_ioctl() 438 get_file(ictx->file); in iommufd_ctx_get() 458 return ictx; in iommufd_ctx_from_file() [all …]
|
| H A D | ioas.c | 47 ioas = iommufd_ioas_alloc(ucmd->ictx); in iommufd_ioas_alloc_ioctl() 414 xa_lock(&ictx->objects); in iommufd_take_all_iova_rwsem() 424 xa_unlock(&ictx->objects); in iommufd_take_all_iova_rwsem() 428 &ictx->ioas_creation_lock); in iommufd_take_all_iova_rwsem() 436 xa_lock(&ictx->objects); in iommufd_take_all_iova_rwsem() 438 xa_unlock(&ictx->objects); in iommufd_take_all_iova_rwsem() 522 struct iommufd_ctx *ictx = ucmd->ictx; in iommufd_ioas_change_process() local 590 struct iommufd_ctx *ictx) in iommufd_option_rlimit_mode() argument 605 xa_lock(&ictx->objects); in iommufd_option_rlimit_mode() 606 if (!xa_empty(&ictx->objects)) { in iommufd_option_rlimit_mode() [all …]
|
| H A D | iommufd_private.h | 36 int iommufd_sw_msi_install(struct iommufd_ctx *ictx, 134 struct iommufd_ctx *ictx; member 230 iommufd_object_remove(ictx, obj, obj->id, 0); in iommufd_object_put_and_try_destroy() 242 #define iommufd_object_alloc(ictx, ptr, type) \ argument 243 __iommufd_object_alloc(ictx, ptr, type, obj) 286 struct iommufd_ctx *ictx); 408 struct iommufd_ctx *ictx; member 422 struct iommufd_ctx *ictx; member 446 struct iommufd_ctx *ictx; member 464 struct iommufd_ctx *ictx; member [all …]
|
| H A D | driver.c | 138 lockdep_assert_held(&ictx->sw_msi_lock); in iommufd_sw_msi_get_map() 148 if (ictx->sw_msi_id >= in iommufd_sw_msi_get_map() 159 cur->id = ictx->sw_msi_id++; in iommufd_sw_msi_get_map() 160 list_add_tail(&cur->sw_msi_item, &ictx->sw_msi_list); in iommufd_sw_msi_get_map() 164 int iommufd_sw_msi_install(struct iommufd_ctx *ictx, in iommufd_sw_msi_install() argument 170 lockdep_assert_held(&ictx->sw_msi_lock); in iommufd_sw_msi_install() 202 struct iommufd_ctx *ictx; in iommufd_sw_msi() local 224 ictx = handle->idev->ictx; in iommufd_sw_msi() 225 guard(mutex)(&ictx->sw_msi_lock); in iommufd_sw_msi() 231 msi_map = iommufd_sw_msi_get_map(handle->idev->ictx, in iommufd_sw_msi() [all …]
|
| H A D | device.c | 81 xa_lock(&ictx->groups); in iommufd_get_group() 84 xa_unlock(&ictx->groups); in iommufd_get_group() 88 xa_unlock(&ictx->groups); in iommufd_get_group() 107 new_igroup->ictx = ictx; in iommufd_get_group() 114 xa_lock(&ictx->groups); in iommufd_get_group() 214 idev->ictx = ictx; in iommufd_device_bind() 216 iommufd_ctx_get(ictx); in iommufd_device_bind() 258 if (!ictx || !group) in iommufd_ctx_has_group() 292 return idev->ictx; in iommufd_device_to_ictx() 323 struct iommufd_ctx *ictx = igroup->ictx; in iommufd_group_setup_msi() local [all …]
|
| H A D | viommu.c | 51 ucmd->ictx, cmd->type); in iommufd_viommu_alloc_ioctl() 59 viommu->ictx = ucmd->ictx; in iommufd_viommu_alloc_ioctl() 75 iommufd_object_finalize(ucmd->ictx, &viommu->obj); in iommufd_viommu_alloc_ioctl() 79 iommufd_object_abort_and_destroy(ucmd->ictx, &viommu->obj); in iommufd_viommu_alloc_ioctl() 81 iommufd_put_object(ucmd->ictx, &hwpt_paging->common.obj); in iommufd_viommu_alloc_ioctl() 83 iommufd_put_object(ucmd->ictx, &idev->obj); in iommufd_viommu_alloc_ioctl() 127 vdev = iommufd_object_alloc(ucmd->ictx, vdev, IOMMUFD_OBJ_VDEVICE); in iommufd_vdevice_alloc_ioctl() 149 iommufd_object_finalize(ucmd->ictx, &vdev->obj); in iommufd_vdevice_alloc_ioctl() 153 iommufd_object_abort_and_destroy(ucmd->ictx, &vdev->obj); in iommufd_vdevice_alloc_ioctl() 155 iommufd_put_object(ucmd->ictx, &idev->obj); in iommufd_vdevice_alloc_ioctl() [all …]
|
| H A D | hw_pagetable.c | 136 ictx, hwpt_paging, IOMMUFD_OBJ_HWPT_PAGING, common.obj); in iommufd_hwpt_paging_alloc() 210 iommufd_object_abort_and_destroy(ictx, &hwpt->obj); in iommufd_hwpt_paging_alloc() 227 iommufd_hwpt_nested_alloc(struct iommufd_ctx *ictx, in iommufd_hwpt_nested_alloc() argument 273 iommufd_object_abort_and_destroy(ictx, &hwpt->obj); in iommufd_hwpt_nested_alloc() 372 ucmd->ictx, ioas, idev, IOMMU_NO_PASID, cmd->flags, in iommufd_hwpt_alloc() 383 ucmd->ictx, in iommufd_hwpt_alloc() 424 iommufd_put_object(ucmd->ictx, &fault->common.obj); in iommufd_hwpt_alloc() 431 iommufd_object_finalize(ucmd->ictx, &hwpt->obj); in iommufd_hwpt_alloc() 440 iommufd_put_object(ucmd->ictx, pt_obj); in iommufd_hwpt_alloc() 442 iommufd_put_object(ucmd->ictx, &idev->obj); in iommufd_hwpt_alloc() [all …]
|
| H A D | eventq.c | 423 iommufd_ctx_put(eventq->ictx); in iommufd_eventq_fops_release() 438 struct iommufd_ctx *ictx, in iommufd_eventq_init() argument 452 eventq->ictx = ictx; in iommufd_eventq_init() 453 iommufd_ctx_get(eventq->ictx); in iommufd_eventq_init() 485 ucmd->ictx, &iommufd_fault_fops); in iommufd_fault_alloc() 497 iommufd_object_finalize(ucmd->ictx, &fault->common.obj); in iommufd_fault_alloc() 506 iommufd_object_abort_and_destroy(ucmd->ictx, &fault->common.obj); in iommufd_fault_alloc() 556 veventq = __iommufd_object_alloc(ucmd->ictx, veventq, in iommufd_veventq_alloc() 572 ucmd->ictx, &iommufd_veventq_fops); in iommufd_veventq_alloc() 585 iommufd_object_finalize(ucmd->ictx, &veventq->common.obj); in iommufd_veventq_alloc() [all …]
|
| H A D | selftest.c | 116 ioas = iommufd_get_ioas(ucmd->ictx, ioas_id); in iommufd_test_syz_conv_iova_id() 120 iommufd_put_object(ucmd->ictx, &ioas->obj); in iommufd_test_syz_conv_iova_id() 185 struct iommufd_ctx *ictx; member 738 struct iommufd_ctx *ictx, in mock_viommu_alloc() argument 983 sobj->idev.ictx = ucmd->ictx; in iommufd_test_mock_domain() 1044 iommufd_put_object(ictx, dev_obj); in iommufd_test_get_selftest_obj() 1070 iommufd_put_object(ucmd->ictx, &sobj->obj); in iommufd_test_mock_domain_replace() 1088 iommufd_put_object(ucmd->ictx, &ioas->obj); in iommufd_test_add_reserved() 1143 iommufd_put_object(ucmd->ictx, &hwpt->obj); in iommufd_test_md_check_pa() 1376 ucmd->ictx, in iommufd_test_create_access() [all …]
|
| /linux-6.15/fs/netfs/ |
| H A D | locking.c | 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() 59 struct netfs_inode *ictx = netfs_inode(inode); in netfs_start_io_read() local 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 137 if (!test_bit(NETFS_ICTX_ODIRECT, &ictx->flags)) { in netfs_block_buffered() 138 set_bit(NETFS_ICTX_ODIRECT, &ictx->flags); in netfs_block_buffered() 143 clear_bit(NETFS_ICTX_ODIRECT, &ictx->flags); in netfs_block_buffered() [all …]
|
| H A D | write_issue.c | 96 struct netfs_inode *ictx; in netfs_create_write_req() local 108 ictx = netfs_inode(wreq->inode); in netfs_create_write_req() 565 mutex_lock(&ictx->wb_lock); in netfs_writepages() 601 mutex_unlock(&ictx->wb_lock); in netfs_writepages() 610 mutex_unlock(&ictx->wb_lock); in netfs_writepages() 624 mutex_lock(&ictx->wb_lock); in netfs_begin_writethrough() 629 mutex_unlock(&ictx->wb_lock); in netfs_begin_writethrough() 689 mutex_unlock(&ictx->wb_lock); in netfs_end_writethrough() 879 mutex_lock(&ictx->wb_lock); in netfs_writeback_single() 916 mutex_unlock(&ictx->wb_lock); in netfs_writeback_single() [all …]
|
| /linux-6.15/arch/s390/crypto/ |
| H A 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 …]
|
| H A 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()
|
| H A 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()
|
| H A 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()
|
| H A 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.15/include/linux/ |
| H A D | iommufd.h | 54 struct iommufd_device *iommufd_device_bind(struct iommufd_ctx *ictx, 83 iommufd_access_create(struct iommufd_ctx *ictx, 90 void iommufd_ctx_get(struct iommufd_ctx *ictx); 94 struct iommufd_ctx *ictx; member 136 void iommufd_ctx_put(struct iommufd_ctx *ictx); 147 int iommufd_vfio_compat_ioas_create(struct iommufd_ctx *ictx); 148 int iommufd_vfio_compat_set_no_iommu(struct iommufd_ctx *ictx); 155 static inline void iommufd_ctx_put(struct iommufd_ctx *ictx) in iommufd_ctx_put() argument 192 struct iommufd_object *_iommufd_object_alloc(struct iommufd_ctx *ictx, 204 _iommufd_object_alloc(struct iommufd_ctx *ictx, size_t size, in _iommufd_object_alloc() argument [all …]
|
| /linux-6.15/crypto/ |
| H A D | krb5enc.c | 143 struct krb5enc_instance_ctx *ictx = aead_instance_ctx(inst); in krb5enc_dispatch_encrypt() local 147 ictx->reqoff); in krb5enc_dispatch_encrypt() 314 ictx->reqoff); in krb5enc_dispatch_decrypt() 353 auth = crypto_spawn_ahash(&ictx->auth); in krb5enc_init_tfm() 357 enc = crypto_spawn_skcipher(&ictx->enc); in krb5enc_init_tfm() 368 ictx->reqoff + /* Space for two checksums */ in krb5enc_init_tfm() 401 struct krb5enc_instance_ctx *ictx; in krb5enc_create() local 418 ictx = aead_instance_ctx(inst); in krb5enc_create() 426 auth = crypto_spawn_ahash_alg(&ictx->auth); in krb5enc_create() 435 enc = crypto_spawn_skcipher_alg_common(&ictx->enc); in krb5enc_create() [all …]
|
| H A D | essiv.c | 312 err = essiv_init_tfm(ictx, tctx); in essiv_skcipher_init_tfm() 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() 385 crypto_drop_aead(&ictx->u.aead_spawn); in essiv_aead_free_instance() 452 struct essiv_instance_ctx *ictx; in essiv_create() local 479 sizeof(*ictx), GFP_KERNEL); in essiv_create() 484 ictx = crypto_instance_ctx(inst); in essiv_create() 492 &ictx->u.skcipher_spawn); in essiv_create() 499 sizeof(*ictx), GFP_KERNEL); in essiv_create() 504 ictx = crypto_instance_ctx(inst); in essiv_create() [all …]
|
| H A D | hctr2.c | 345 xctr = crypto_spawn_skcipher(&ictx->xctr_spawn); in hctr2_init_tfm() 355 polyval = crypto_spawn_shash(&ictx->polyval_spawn); in hctr2_init_tfm() 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() 426 ictx = skcipher_instance_ctx(inst); in hctr2_create_common() 429 err = crypto_grab_skcipher(&ictx->xctr_spawn, in hctr2_create_common() 448 err = crypto_grab_cipher(&ictx->blockcipher_spawn, in hctr2_create_common() [all …]
|
| H A D | authenc.c | 117 struct authenc_instance_ctx *ictx = aead_instance_ctx(inst); in authenc_geniv_ahash_done() local 137 struct authenc_instance_ctx *ictx = aead_instance_ctx(inst); in crypto_authenc_genicv() local 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 235 ictx->reqoff); in crypto_authenc_decrypt_tail() 279 struct authenc_instance_ctx *ictx = aead_instance_ctx(inst); in crypto_authenc_decrypt() local 302 struct authenc_instance_ctx *ictx = aead_instance_ctx(inst); in crypto_authenc_init_tfm() local 309 auth = crypto_spawn_ahash(&ictx->auth); in crypto_authenc_init_tfm() 313 enc = crypto_spawn_skcipher(&ictx->enc); in crypto_authenc_init_tfm() [all …]
|
| H A D | adiantum.c | 448 hash = crypto_spawn_shash(&ictx->hash_spawn); in adiantum_init_tfm() 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() 540 ictx = skcipher_instance_ctx(inst); in adiantum_create() 543 err = crypto_grab_skcipher(&ictx->streamcipher_spawn, in adiantum_create() 551 err = crypto_grab_cipher(&ictx->blockcipher_spawn, in adiantum_create() 562 err = crypto_grab_shash(&ictx->hash_spawn, in adiantum_create() [all …]
|
| /linux-6.15/drivers/vfio/ |
| H A 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() 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 118 idev = iommufd_device_bind(ictx, vdev->dev, out_device_id); in vfio_iommufd_physical_bind() [all …]
|