Lines Matching refs:wqcfg

305 	union wqcfg wqcfg;  in __idxd_wq_set_pasid_locked()  local
310 wqcfg.bits[WQCFG_PASID_IDX] = ioread32(idxd->reg_base + offset); in __idxd_wq_set_pasid_locked()
311 wqcfg.pasid_en = 1; in __idxd_wq_set_pasid_locked()
312 wqcfg.pasid = pasid; in __idxd_wq_set_pasid_locked()
313 wq->wqcfg->bits[WQCFG_PASID_IDX] = wqcfg.bits[WQCFG_PASID_IDX]; in __idxd_wq_set_pasid_locked()
314 iowrite32(wqcfg.bits[WQCFG_PASID_IDX], idxd->reg_base + offset); in __idxd_wq_set_pasid_locked()
339 union wqcfg wqcfg; in idxd_wq_disable_pasid() local
348 wqcfg.bits[WQCFG_PASID_IDX] = ioread32(idxd->reg_base + offset); in idxd_wq_disable_pasid()
349 wqcfg.pasid_en = 0; in idxd_wq_disable_pasid()
350 wqcfg.pasid = 0; in idxd_wq_disable_pasid()
351 iowrite32(wqcfg.bits[WQCFG_PASID_IDX], idxd->reg_base + offset); in idxd_wq_disable_pasid()
367 memset(wq->wqcfg, 0, idxd->wqcfg_size); in idxd_wq_disable_cleanup()
915 wq->wqcfg->bits[i] |= ioread32(idxd->reg_base + wq_offset); in idxd_wq_config_write()
922 wq->wqcfg->wq_size = wq->size; in idxd_wq_config_write()
925 wq->wqcfg->wq_thresh = wq->threshold; in idxd_wq_config_write()
929 wq->wqcfg->mode = 1; in idxd_wq_config_write()
942 if (wq_dedicated(wq) && wq->wqcfg->pasid_en && in idxd_wq_config_write()
949 wq->wqcfg->priority = wq->priority; in idxd_wq_config_write()
954 wq->wqcfg->bof = 1; in idxd_wq_config_write()
957 wq->wqcfg->wq_ats_disable = test_bit(WQ_FLAG_ATS_DISABLE, &wq->flags); in idxd_wq_config_write()
960 wq->wqcfg->wq_prs_disable = test_bit(WQ_FLAG_PRS_DISABLE, &wq->flags); in idxd_wq_config_write()
963 wq->wqcfg->max_xfer_shift = ilog2(wq->max_xfer_bytes); in idxd_wq_config_write()
964 idxd_wqcfg_set_max_batch_shift(idxd->data->type, wq->wqcfg, ilog2(wq->max_batch_size)); in idxd_wq_config_write()
968 memset(wq->wqcfg->op_config, 0, IDXD_MAX_OPCAP_BITS / 8); in idxd_wq_config_write()
973 wq->wqcfg->op_config[idx] |= BIT(pos); in idxd_wq_config_write()
980 iowrite32(wq->wqcfg->bits[i], idxd->reg_base + wq_offset); in idxd_wq_config_write()
1128 memcpy_fromio(wq->wqcfg, idxd->reg_base + wqcfg_offset, idxd->wqcfg_size); in idxd_wq_load_config()
1130 wq->size = wq->wqcfg->wq_size; in idxd_wq_load_config()
1131 wq->threshold = wq->wqcfg->wq_thresh; in idxd_wq_load_config()
1134 if (wq->wqcfg->mode == 0 || wq->wqcfg->pasid_en) in idxd_wq_load_config()
1139 wq->priority = wq->wqcfg->priority; in idxd_wq_load_config()
1141 wq->max_xfer_bytes = 1ULL << wq->wqcfg->max_xfer_shift; in idxd_wq_load_config()
1142 idxd_wq_set_max_batch_size(idxd->data->type, wq, 1U << wq->wqcfg->max_batch_shift); in idxd_wq_load_config()
1146 dev_dbg(dev, "WQ[%d][%d][%#x]: %#x\n", wq->id, i, wqcfg_offset, wq->wqcfg->bits[i]); in idxd_wq_load_config()