wqcfg
wq->wqcfg->op_config[idx] |= BIT(pos);
iowrite32(wq->wqcfg->bits[i], idxd->reg_base + wq_offset);
memcpy_fromio(wq->wqcfg, idxd->reg_base + wqcfg_offset, idxd->wqcfg_size);
wq->size = wq->wqcfg->wq_size;
wq->threshold = wq->wqcfg->wq_thresh;
if (wq->wqcfg->mode == 0 || wq->wqcfg->pasid_en)
wq->priority = wq->wqcfg->priority;
wq->max_xfer_bytes = 1ULL << wq->wqcfg->max_xfer_shift;
idxd_wq_set_max_batch_size(idxd->data->type, wq, 1U << wq->wqcfg->max_batch_shift);
wq->max_sgl_size = 1U << wq->wqcfg->max_sgl_shift;
dev_dbg(dev, "WQ[%d][%d][%#x]: %#x\n", wq->id, i, wqcfg_offset, wq->wqcfg->bits[i]);
union wqcfg wqcfg;
wqcfg.bits[WQCFG_PASID_IDX] = ioread32(idxd->reg_base + offset);
wqcfg.pasid_en = 1;
wqcfg.pasid = pasid;
wq->wqcfg->bits[WQCFG_PASID_IDX] = wqcfg.bits[WQCFG_PASID_IDX];
iowrite32(wqcfg.bits[WQCFG_PASID_IDX], idxd->reg_base + offset);
union wqcfg wqcfg;
wqcfg.bits[WQCFG_PASID_IDX] = ioread32(idxd->reg_base + offset);
wqcfg.pasid_en = 0;
wqcfg.pasid = 0;
iowrite32(wqcfg.bits[WQCFG_PASID_IDX], idxd->reg_base + offset);
memset(wq->wqcfg, 0, idxd->wqcfg_size);
wq->wqcfg->bits[i] |= ioread32(idxd->reg_base + wq_offset);
wq->wqcfg->wq_size = wq->size;
wq->wqcfg->wq_thresh = wq->threshold;
wq->wqcfg->mode = 1;
if (wq_dedicated(wq) && wq->wqcfg->pasid_en &&
wq->wqcfg->priority = wq->priority;
wq->wqcfg->bof = 1;
wq->wqcfg->wq_ats_disable = test_bit(WQ_FLAG_ATS_DISABLE, &wq->flags);
wq->wqcfg->wq_prs_disable = test_bit(WQ_FLAG_PRS_DISABLE, &wq->flags);
wq->wqcfg->max_xfer_shift = ilog2(wq->max_xfer_bytes);
idxd_wqcfg_set_max_batch_shift(idxd->data->type, wq->wqcfg, ilog2(wq->max_batch_size));
wq->wqcfg->max_sgl_shift = ilog2(wq->max_sgl_size);
memset(wq->wqcfg->op_config, 0, IDXD_MAX_OPCAP_BITS / 8);
union wqcfg *wqcfg;
static inline void idxd_wqcfg_set_max_batch_shift(int idxd_type, union wqcfg *wqcfg,
wqcfg->max_batch_shift = 0;
wqcfg->max_batch_shift = max_batch_shift;
kfree(wq->wqcfg);
wq->wqcfg = kzalloc_node(idxd->wqcfg_size, GFP_KERNEL, dev_to_node(dev));
if (!wq->wqcfg) {
kfree(wq->wqcfg);
kfree(wq->wqcfg);
idxd->wqcfg_offset = offsets.wqcfg * IDXD_TABLE_MULT;
u64 wqcfg:16;
kfree(wq->wqcfg);
union wqcfg wqcfg;
wqcfg = (union wqcfg) {
for (i = 0; i < wqcfg_size / sizeof(wqcfg.bits[0]); i++)
writel(wqcfg.bits[i], dsa->wqcfg_table + offsetof(union wqcfg, bits[i]));
dsa->wqcfg_table = bar0 + dsa->table_offsets.wqcfg * IDXD_TABLE_MULT;
u64 wqcfg:16;