Re: [PATCH RFC v5 10/18] riscv_cbqri: Add bandwidth controller monitoring device ops

From: Drew Fustini

Date: Mon May 25 2026 - 03:27:07 EST


On Mon, May 25, 2026 at 12:36:08AM +0000, sashiko-bot@xxxxxxxxxx wrote:
> > +/*
> > + * mon_ctl field masks (CC and BC share an identical OP/MCID/EVT_ID/STATUS
> > + * layout). Keep all masks u64-wide so FIELD_MODIFY() on a u64 register
> > + * never zero-extends a 32-bit ~mask and clobbers the WPRI/STATUS/BUSY
> > + * fields in bits 63:32 for future support of RV32
> > + */
> > +#define CBQRI_MON_CTL_OP_MASK GENMASK_ULL(4, 0)
> > +#define CBQRI_MON_CTL_MCID_MASK GENMASK_ULL(19, 8)
> > +#define CBQRI_MON_CTL_EVT_ID_MASK GENMASK_ULL(27, 20)
>
> [Severity: High]
> This isn't a bug introduced by this patch, but does the same fix need to be
> applied to other masks?

I'll switch all instances like this to GENMASK_ULL() in v6.

Drew