Re: [PATCH 08/23] dmaengine: sdxi: Install administrative context

From: Frank Li

Date: Mon Apr 20 2026 - 03:16:42 EST


On Fri, Apr 10, 2026 at 08:07:18AM -0500, Nathan Lynch wrote:
> Serialize the context control block, akey table, and L1 entry for the
> admin context, making its descriptor ring, write index, and context
> status block visible to the SDXI implementation once it is activated.
>
> Co-developed-by: Wei Huang <wei.huang2@xxxxxxx>
> Signed-off-by: Wei Huang <wei.huang2@xxxxxxx>
> Signed-off-by: Nathan Lynch <nathan.lynch@xxxxxxx>
> ---
...
> +
> +static int configure_cxt_ctl(struct sdxi_cxt_ctl *ctl, const struct sdxi_cxt_ctl_cfg *cfg)
> +{
> + u64 ds_ring_ptr, cxt_sts_ptr, write_index_ptr;
> +
> + write_index_ptr = FIELD_PREP(SDXI_CXT_CTL_WRITE_INDEX_PTR,
> + cfg->write_index_ptr >> WRT_INDEX_PTR_SHIFT);
> + cxt_sts_ptr = FIELD_PREP(SDXI_CXT_CTL_CXT_STS_PTR,
> + cfg->cxt_sts_ptr >> CXT_STATUS_PTR_SHIFT);
> +
> + *ctl = (typeof(*ctl)) {
> + /*
> + * ds_ring_ptr contains the validity bit and is updated
> + * after a barrier is issued.
> + */
> + .ds_ring_sz = cpu_to_le32(cfg->ds_ring_sz),
> + .cxt_sts_ptr = cpu_to_le64(cxt_sts_ptr),
> + .write_index_ptr = cpu_to_le64(write_index_ptr),
> + };
> +
> + ds_ring_ptr = FIELD_PREP(SDXI_CXT_CTL_VL, 1) |
> + FIELD_PREP(SDXI_CXT_CTL_QOS, cfg->qos) |

Align to previous line FIELD_PREP, check others.

Frank