Lines Matching refs:wqcfg
307 union wqcfg wqcfg; in __idxd_wq_set_pasid_locked() local
312 wqcfg.bits[WQCFG_PASID_IDX] = ioread32(idxd->reg_base + offset); in __idxd_wq_set_pasid_locked()
313 wqcfg.pasid_en = 1; in __idxd_wq_set_pasid_locked()
314 wqcfg.pasid = pasid; in __idxd_wq_set_pasid_locked()
315 wq->wqcfg->bits[WQCFG_PASID_IDX] = wqcfg.bits[WQCFG_PASID_IDX]; in __idxd_wq_set_pasid_locked()
316 iowrite32(wqcfg.bits[WQCFG_PASID_IDX], idxd->reg_base + offset); in __idxd_wq_set_pasid_locked()
341 union wqcfg wqcfg; in idxd_wq_disable_pasid() local
350 wqcfg.bits[WQCFG_PASID_IDX] = ioread32(idxd->reg_base + offset); in idxd_wq_disable_pasid()
351 wqcfg.pasid_en = 0; in idxd_wq_disable_pasid()
352 wqcfg.pasid = 0; in idxd_wq_disable_pasid()
353 iowrite32(wqcfg.bits[WQCFG_PASID_IDX], idxd->reg_base + offset); in idxd_wq_disable_pasid()
369 memset(wq->wqcfg, 0, idxd->wqcfg_size); in idxd_wq_disable_cleanup()
927 wq->wqcfg->bits[i] |= ioread32(idxd->reg_base + wq_offset); in idxd_wq_config_write()
934 wq->wqcfg->wq_size = wq->size; in idxd_wq_config_write()
937 wq->wqcfg->wq_thresh = wq->threshold; in idxd_wq_config_write()
941 wq->wqcfg->mode = 1; in idxd_wq_config_write()
954 if (wq_dedicated(wq) && wq->wqcfg->pasid_en && in idxd_wq_config_write()
961 wq->wqcfg->priority = wq->priority; in idxd_wq_config_write()
966 wq->wqcfg->bof = 1; in idxd_wq_config_write()
969 wq->wqcfg->wq_ats_disable = test_bit(WQ_FLAG_ATS_DISABLE, &wq->flags); in idxd_wq_config_write()
972 wq->wqcfg->wq_prs_disable = test_bit(WQ_FLAG_PRS_DISABLE, &wq->flags); in idxd_wq_config_write()
975 wq->wqcfg->max_xfer_shift = ilog2(wq->max_xfer_bytes); in idxd_wq_config_write()
976 idxd_wqcfg_set_max_batch_shift(idxd->data->type, wq->wqcfg, ilog2(wq->max_batch_size)); in idxd_wq_config_write()
980 memset(wq->wqcfg->op_config, 0, IDXD_MAX_OPCAP_BITS / 8); in idxd_wq_config_write()
985 wq->wqcfg->op_config[idx] |= BIT(pos); in idxd_wq_config_write()
992 iowrite32(wq->wqcfg->bits[i], idxd->reg_base + wq_offset); in idxd_wq_config_write()
1140 memcpy_fromio(wq->wqcfg, idxd->reg_base + wqcfg_offset, idxd->wqcfg_size); in idxd_wq_load_config()
1142 wq->size = wq->wqcfg->wq_size; in idxd_wq_load_config()
1143 wq->threshold = wq->wqcfg->wq_thresh; in idxd_wq_load_config()
1146 if (wq->wqcfg->mode == 0 || wq->wqcfg->pasid_en) in idxd_wq_load_config()
1151 wq->priority = wq->wqcfg->priority; in idxd_wq_load_config()
1153 wq->max_xfer_bytes = 1ULL << wq->wqcfg->max_xfer_shift; in idxd_wq_load_config()
1154 idxd_wq_set_max_batch_size(idxd->data->type, wq, 1U << wq->wqcfg->max_batch_shift); in idxd_wq_load_config()
1158 dev_dbg(dev, "WQ[%d][%d][%#x]: %#x\n", wq->id, i, wqcfg_offset, wq->wqcfg->bits[i]); in idxd_wq_load_config()