Lines Matching defs:ctxid
134 if ((ctxi->ctxid == rctxid) || (ctxi->file == file))
163 u64 ctxid = DECODE_CTXID(rctxid);
175 if (likely(ctxid < MAX_CONTEXT)) {
178 ctxi = cfg->ctx_tbl[ctxid];
181 (!file && (ctxi->ctxid != rctxid)))
646 u64 ctxid = DECODE_CTXID(release->context_id),
652 dev_dbg(dev, "%s: ctxid=%llu rhndl=%llu gli->mode=%u gli->users=%u\n",
653 __func__, ctxid, release->rsrc_handle, gli->mode, gli->users);
658 dev_dbg(dev, "%s: Bad context ctxid=%llu\n",
659 __func__, ctxid);
711 rcr = cxlflash_afu_sync(afu, ctxid, rhndl, AFU_HW_SYNC);
820 * @ctxid: Previously obtained process element associated with CXL context.
826 void *ctx, int ctxid, struct file *file, u32 perms,
832 ctxi->ctrl_map = &afu->afu_map->ctrls[ctxid].ctrl;
833 ctxi->ctxid = ENCODE_CTXID(ctxi, ctxid);
858 u64 ctxid = DECODE_CTXID(ctxi->ctxid);
869 cfg->ctx_tbl[ctxid] = NULL;
902 u64 ctxid = DECODE_CTXID(detach->context_id),
905 dev_dbg(dev, "%s: ctxid=%llu\n", __func__, ctxid);
910 dev_dbg(dev, "%s: Bad context ctxid=%llu\n",
911 __func__, ctxid);
998 int ctxid;
1000 ctxid = cfg->ops->process_element(ctx);
1001 if (unlikely(ctxid < 0)) {
1002 dev_err(dev, "%s: Context %p was closed ctxid=%d\n",
1003 __func__, ctx, ctxid);
1007 ctxi = get_context(cfg, ctxid, file, ctrl);
1009 ctxi = get_context(cfg, ctxid, file, ctrl | CTX_CTRL_CLONE);
1011 dev_dbg(dev, "%s: ctxid=%d already free\n",
1012 __func__, ctxid);
1016 dev_dbg(dev, "%s: Another process owns ctxid=%d\n",
1017 __func__, ctxid);
1022 dev_dbg(dev, "%s: close for ctxid=%d\n", __func__, ctxid);
1025 detach.context_id = ctxi->ctxid;
1113 int ctxid;
1115 ctxid = cfg->ops->process_element(ctx);
1116 if (unlikely(ctxid < 0)) {
1117 dev_err(dev, "%s: Context %p was closed ctxid=%d\n",
1118 __func__, ctx, ctxid);
1122 ctxi = get_context(cfg, ctxid, file, ctrl);
1124 dev_dbg(dev, "%s: Bad context ctxid=%d\n", __func__, ctxid);
1128 dev_dbg(dev, "%s: fault for context %d\n", __func__, ctxid);
1184 int ctxid;
1187 ctxid = cfg->ops->process_element(ctx);
1188 if (unlikely(ctxid < 0)) {
1189 dev_err(dev, "%s: Context %p was closed ctxid=%d\n",
1190 __func__, ctx, ctxid);
1195 ctxi = get_context(cfg, ctxid, file, ctrl);
1197 dev_dbg(dev, "%s: Bad context ctxid=%d\n", __func__, ctxid);
1202 dev_dbg(dev, "%s: mmap for context %d\n", __func__, ctxid);
1327 int ctxid = -1;
1404 dev_err(dev, "%s: Failed to create context ctxid=%d\n",
1405 __func__, ctxid);
1425 ctxid = cfg->ops->process_element(ctx);
1426 if (unlikely((ctxid >= MAX_CONTEXT) || (ctxid < 0))) {
1427 dev_err(dev, "%s: ctxid=%d invalid\n", __func__, ctxid);
1443 init_context(ctxi, cfg, ctx, ctxid, file, perms, irqs);
1460 cfg->ctx_tbl[ctxid] = ctxi;
1471 attach->context_id = ctxi->ctxid;
1484 dev_dbg(dev, "%s: returning ctxid=%d fd=%d bs=%lld rc=%d llba=%lld\n",
1485 __func__, ctxid, fd, attach->block_size, rc, attach->last_lba);
1539 int ctxid = -1;
1559 ctxid = cfg->ops->process_element(ctx);
1560 if (unlikely((ctxid >= MAX_CONTEXT) || (ctxid < 0))) {
1561 dev_err(dev, "%s: ctxid=%d invalid\n", __func__, ctxid);
1574 ctxi->ctrl_map = &afu->afu_map->ctrls[ctxid].ctrl;
1586 ctxi->ctxid = ENCODE_CTXID(ctxi, ctxid);
1600 cfg->ctx_tbl[ctxid] = ctxi;
1605 dev_dbg(dev, "%s: returning ctxid=%d fd=%d rc=%d\n",
1606 __func__, ctxid, fd, rc);
1660 u64 ctxid = DECODE_CTXID(recover->context_id),
1691 dev_dbg(dev, "%s: Bad context ctxid=%llu\n", __func__, ctxid);
1700 dev_err(dev, "%s: Recovery failed ctxid=%llu rc=%d\n",
1701 __func__, ctxid, rc);
1728 recover->context_id = ctxi->ctxid;
1845 u64 ctxid = DECODE_CTXID(verify->context_id),
1849 dev_dbg(dev, "%s: ctxid=%llu rhndl=%016llx, hint=%016llx, "
1850 "flags=%016llx\n", __func__, ctxid, verify->rsrc_handle,
1855 dev_dbg(dev, "%s: Bad context ctxid=%llu\n", __func__, ctxid);
1970 u64 ctxid = DECODE_CTXID(pphys->context_id),
1982 dev_dbg(dev, "%s: ctxid=%llu ls=%llu\n", __func__, ctxid, lun_size);
1992 dev_dbg(dev, "%s: Bad context ctxid=%llu\n", __func__, ctxid);
1999 dev_dbg(dev, "%s: Too many opens ctxid=%lld\n",
2000 __func__, ctxid);
2014 rc = cxlflash_afu_sync(afu, ctxid, rsrc_handle, AFU_LW_SYNC);