Lines Matching refs:ctxid
134 if ((ctxi->ctxid == rctxid) || (ctxi->file == file)) in find_error_context()
163 u64 ctxid = DECODE_CTXID(rctxid); in get_context() local
175 if (likely(ctxid < MAX_CONTEXT)) { in get_context()
178 ctxi = cfg->ctx_tbl[ctxid]; in get_context()
181 (!file && (ctxi->ctxid != rctxid))) in get_context()
645 u64 ctxid = DECODE_CTXID(release->context_id), in _cxlflash_disk_release() local
652 __func__, ctxid, release->rsrc_handle, gli->mode, gli->users); in _cxlflash_disk_release()
658 __func__, ctxid); in _cxlflash_disk_release()
710 rcr = cxlflash_afu_sync(afu, ctxid, rhndl, AFU_HW_SYNC); in _cxlflash_disk_release()
826 void *ctx, int ctxid, struct file *file, u32 perms, in init_context() argument
832 ctxi->ctrl_map = &afu->afu_map->ctrls[ctxid].ctrl; in init_context()
833 ctxi->ctxid = ENCODE_CTXID(ctxi, ctxid); in init_context()
858 u64 ctxid = DECODE_CTXID(ctxi->ctxid); in remove_context() local
869 cfg->ctx_tbl[ctxid] = NULL; in remove_context()
902 u64 ctxid = DECODE_CTXID(detach->context_id), in _cxlflash_disk_detach() local
905 dev_dbg(dev, "%s: ctxid=%llu\n", __func__, ctxid); in _cxlflash_disk_detach()
911 __func__, ctxid); in _cxlflash_disk_detach()
999 int ctxid; in cxlflash_cxl_release() local
1001 ctxid = cfg->ops->process_element(ctx); in cxlflash_cxl_release()
1002 if (unlikely(ctxid < 0)) { in cxlflash_cxl_release()
1004 __func__, ctx, ctxid); in cxlflash_cxl_release()
1008 ctxi = get_context(cfg, ctxid, file, ctrl); in cxlflash_cxl_release()
1010 ctxi = get_context(cfg, ctxid, file, ctrl | CTX_CTRL_CLONE); in cxlflash_cxl_release()
1013 __func__, ctxid); in cxlflash_cxl_release()
1018 __func__, ctxid); in cxlflash_cxl_release()
1023 dev_dbg(dev, "%s: close for ctxid=%d\n", __func__, ctxid); in cxlflash_cxl_release()
1026 detach.context_id = ctxi->ctxid; in cxlflash_cxl_release()
1114 int ctxid; in cxlflash_mmap_fault() local
1116 ctxid = cfg->ops->process_element(ctx); in cxlflash_mmap_fault()
1117 if (unlikely(ctxid < 0)) { in cxlflash_mmap_fault()
1119 __func__, ctx, ctxid); in cxlflash_mmap_fault()
1123 ctxi = get_context(cfg, ctxid, file, ctrl); in cxlflash_mmap_fault()
1125 dev_dbg(dev, "%s: Bad context ctxid=%d\n", __func__, ctxid); in cxlflash_mmap_fault()
1129 dev_dbg(dev, "%s: fault for context %d\n", __func__, ctxid); in cxlflash_mmap_fault()
1185 int ctxid; in cxlflash_cxl_mmap() local
1188 ctxid = cfg->ops->process_element(ctx); in cxlflash_cxl_mmap()
1189 if (unlikely(ctxid < 0)) { in cxlflash_cxl_mmap()
1191 __func__, ctx, ctxid); in cxlflash_cxl_mmap()
1196 ctxi = get_context(cfg, ctxid, file, ctrl); in cxlflash_cxl_mmap()
1198 dev_dbg(dev, "%s: Bad context ctxid=%d\n", __func__, ctxid); in cxlflash_cxl_mmap()
1203 dev_dbg(dev, "%s: mmap for context %d\n", __func__, ctxid); in cxlflash_cxl_mmap()
1328 int ctxid = -1; in cxlflash_disk_attach() local
1406 __func__, ctxid); in cxlflash_disk_attach()
1426 ctxid = cfg->ops->process_element(ctx); in cxlflash_disk_attach()
1427 if (unlikely((ctxid >= MAX_CONTEXT) || (ctxid < 0))) { in cxlflash_disk_attach()
1428 dev_err(dev, "%s: ctxid=%d invalid\n", __func__, ctxid); in cxlflash_disk_attach()
1444 init_context(ctxi, cfg, ctx, ctxid, file, perms, irqs); in cxlflash_disk_attach()
1461 cfg->ctx_tbl[ctxid] = ctxi; in cxlflash_disk_attach()
1472 attach->context_id = ctxi->ctxid; in cxlflash_disk_attach()
1486 __func__, ctxid, fd, attach->block_size, rc, attach->last_lba); in cxlflash_disk_attach()
1540 int ctxid = -1; in recover_context() local
1560 ctxid = cfg->ops->process_element(ctx); in recover_context()
1561 if (unlikely((ctxid >= MAX_CONTEXT) || (ctxid < 0))) { in recover_context()
1562 dev_err(dev, "%s: ctxid=%d invalid\n", __func__, ctxid); in recover_context()
1575 ctxi->ctrl_map = &afu->afu_map->ctrls[ctxid].ctrl; in recover_context()
1587 ctxi->ctxid = ENCODE_CTXID(ctxi, ctxid); in recover_context()
1601 cfg->ctx_tbl[ctxid] = ctxi; in recover_context()
1607 __func__, ctxid, fd, rc); in recover_context()
1661 u64 ctxid = DECODE_CTXID(recover->context_id), in cxlflash_afu_recover() local
1692 dev_dbg(dev, "%s: Bad context ctxid=%llu\n", __func__, ctxid); in cxlflash_afu_recover()
1702 __func__, ctxid, rc); in cxlflash_afu_recover()
1729 recover->context_id = ctxi->ctxid; in cxlflash_afu_recover()
1846 u64 ctxid = DECODE_CTXID(verify->context_id), in cxlflash_disk_verify() local
1851 "flags=%016llx\n", __func__, ctxid, verify->rsrc_handle, in cxlflash_disk_verify()
1856 dev_dbg(dev, "%s: Bad context ctxid=%llu\n", __func__, ctxid); in cxlflash_disk_verify()
1971 u64 ctxid = DECODE_CTXID(pphys->context_id), in cxlflash_disk_direct_open() local
1983 dev_dbg(dev, "%s: ctxid=%llu ls=%llu\n", __func__, ctxid, lun_size); in cxlflash_disk_direct_open()
1993 dev_dbg(dev, "%s: Bad context ctxid=%llu\n", __func__, ctxid); in cxlflash_disk_direct_open()
2001 __func__, ctxid); in cxlflash_disk_direct_open()
2015 rc = cxlflash_afu_sync(afu, ctxid, rsrc_handle, AFU_LW_SYNC); in cxlflash_disk_direct_open()