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()
646 u64 ctxid = DECODE_CTXID(release->context_id), in _cxlflash_disk_release() local
653 __func__, ctxid, release->rsrc_handle, gli->mode, gli->users); in _cxlflash_disk_release()
659 __func__, ctxid); in _cxlflash_disk_release()
711 rcr = cxlflash_afu_sync(afu, ctxid, rhndl, AFU_HW_SYNC); in _cxlflash_disk_release()
827 void *ctx, int ctxid, struct file *file, u32 perms, in init_context() argument
833 ctxi->ctrl_map = &afu->afu_map->ctrls[ctxid].ctrl; in init_context()
834 ctxi->ctxid = ENCODE_CTXID(ctxi, ctxid); in init_context()
859 u64 ctxid = DECODE_CTXID(ctxi->ctxid); in remove_context() local
870 cfg->ctx_tbl[ctxid] = NULL; in remove_context()
903 u64 ctxid = DECODE_CTXID(detach->context_id), in _cxlflash_disk_detach() local
906 dev_dbg(dev, "%s: ctxid=%llu\n", __func__, ctxid); in _cxlflash_disk_detach()
912 __func__, ctxid); in _cxlflash_disk_detach()
1000 int ctxid; in cxlflash_cxl_release() local
1002 ctxid = cfg->ops->process_element(ctx); in cxlflash_cxl_release()
1003 if (unlikely(ctxid < 0)) { in cxlflash_cxl_release()
1005 __func__, ctx, ctxid); in cxlflash_cxl_release()
1009 ctxi = get_context(cfg, ctxid, file, ctrl); in cxlflash_cxl_release()
1011 ctxi = get_context(cfg, ctxid, file, ctrl | CTX_CTRL_CLONE); in cxlflash_cxl_release()
1014 __func__, ctxid); in cxlflash_cxl_release()
1019 __func__, ctxid); in cxlflash_cxl_release()
1024 dev_dbg(dev, "%s: close for ctxid=%d\n", __func__, ctxid); in cxlflash_cxl_release()
1027 detach.context_id = ctxi->ctxid; in cxlflash_cxl_release()
1115 int ctxid; in cxlflash_mmap_fault() local
1117 ctxid = cfg->ops->process_element(ctx); in cxlflash_mmap_fault()
1118 if (unlikely(ctxid < 0)) { in cxlflash_mmap_fault()
1120 __func__, ctx, ctxid); in cxlflash_mmap_fault()
1124 ctxi = get_context(cfg, ctxid, file, ctrl); in cxlflash_mmap_fault()
1126 dev_dbg(dev, "%s: Bad context ctxid=%d\n", __func__, ctxid); in cxlflash_mmap_fault()
1130 dev_dbg(dev, "%s: fault for context %d\n", __func__, ctxid); in cxlflash_mmap_fault()
1186 int ctxid; in cxlflash_cxl_mmap() local
1189 ctxid = cfg->ops->process_element(ctx); in cxlflash_cxl_mmap()
1190 if (unlikely(ctxid < 0)) { in cxlflash_cxl_mmap()
1192 __func__, ctx, ctxid); in cxlflash_cxl_mmap()
1197 ctxi = get_context(cfg, ctxid, file, ctrl); in cxlflash_cxl_mmap()
1199 dev_dbg(dev, "%s: Bad context ctxid=%d\n", __func__, ctxid); in cxlflash_cxl_mmap()
1204 dev_dbg(dev, "%s: mmap for context %d\n", __func__, ctxid); in cxlflash_cxl_mmap()
1329 int ctxid = -1; in cxlflash_disk_attach() local
1407 __func__, ctxid); in cxlflash_disk_attach()
1427 ctxid = cfg->ops->process_element(ctx); in cxlflash_disk_attach()
1428 if (unlikely((ctxid >= MAX_CONTEXT) || (ctxid < 0))) { in cxlflash_disk_attach()
1429 dev_err(dev, "%s: ctxid=%d invalid\n", __func__, ctxid); in cxlflash_disk_attach()
1445 init_context(ctxi, cfg, ctx, ctxid, file, perms, irqs); in cxlflash_disk_attach()
1462 cfg->ctx_tbl[ctxid] = ctxi; in cxlflash_disk_attach()
1473 attach->context_id = ctxi->ctxid; in cxlflash_disk_attach()
1487 __func__, ctxid, fd, attach->block_size, rc, attach->last_lba); in cxlflash_disk_attach()
1541 int ctxid = -1; in recover_context() local
1561 ctxid = cfg->ops->process_element(ctx); in recover_context()
1562 if (unlikely((ctxid >= MAX_CONTEXT) || (ctxid < 0))) { in recover_context()
1563 dev_err(dev, "%s: ctxid=%d invalid\n", __func__, ctxid); in recover_context()
1576 ctxi->ctrl_map = &afu->afu_map->ctrls[ctxid].ctrl; in recover_context()
1588 ctxi->ctxid = ENCODE_CTXID(ctxi, ctxid); in recover_context()
1602 cfg->ctx_tbl[ctxid] = ctxi; in recover_context()
1608 __func__, ctxid, fd, rc); in recover_context()
1662 u64 ctxid = DECODE_CTXID(recover->context_id), in cxlflash_afu_recover() local
1693 dev_dbg(dev, "%s: Bad context ctxid=%llu\n", __func__, ctxid); in cxlflash_afu_recover()
1703 __func__, ctxid, rc); in cxlflash_afu_recover()
1730 recover->context_id = ctxi->ctxid; in cxlflash_afu_recover()
1847 u64 ctxid = DECODE_CTXID(verify->context_id), in cxlflash_disk_verify() local
1852 "flags=%016llx\n", __func__, ctxid, verify->rsrc_handle, in cxlflash_disk_verify()
1857 dev_dbg(dev, "%s: Bad context ctxid=%llu\n", __func__, ctxid); in cxlflash_disk_verify()
1972 u64 ctxid = DECODE_CTXID(pphys->context_id), in cxlflash_disk_direct_open() local
1984 dev_dbg(dev, "%s: ctxid=%llu ls=%llu\n", __func__, ctxid, lun_size); in cxlflash_disk_direct_open()
1994 dev_dbg(dev, "%s: Bad context ctxid=%llu\n", __func__, ctxid); in cxlflash_disk_direct_open()
2002 __func__, ctxid); in cxlflash_disk_direct_open()
2016 rc = cxlflash_afu_sync(afu, ctxid, rsrc_handle, AFU_LW_SYNC); in cxlflash_disk_direct_open()