Re: [External] [PATCH RFC v3 04/11] RISC-V: QoS: add CBQRI hardware interface
Drew Fustini <[email protected]> Wed, 6 May 2026 07:28:26 -0700
| Newsgroups | dev.linux.lists.acpica-devel,org.infradead.lists.linux-riscv,org.kernel.vger.linux-acpi,org.kernel.vger.linux-devicetree,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <aftQCk7f+hpBMkl3@x1> |
On Tue, May 05, 2026 at 12:43:46PM +0800, yunhui cui wrote: > Hi Drew, > > On Wed, Apr 15, 2026 at 9:57 AM Drew Fustini <[email protected]> wrote: > > > > Add the CBQRI controller hardware interface layer. > > > > Define data structures representing CBQRI controller properties > > (cbqri_controller) and hardware capabilities for capacity and bandwidth > > controllers (riscv_cbqri_capacity_caps, riscv_cbqri_bandwidth_caps) in > > include/linux/riscv_qos.h. > > > > Define MMIO register offsets, field masks, and internal wrapper structs > > (cbqri_resctrl_res, cbqri_resctrl_dom, cbqri_config) in internal.h. > > > > Implement MMIO helpers for capacity block mask and bandwidth reservation, > > alloc control operations for capacity and bandwidth controllers, and > > probe functions to discover controller capabilities. A per-controller > > spinlock serializes multi-step MMIO sequences. > > > > Co-developed-by: Adrien Ricciardi <[email protected]> > > Signed-off-by: Adrien Ricciardi <[email protected]> > > Signed-off-by: Drew Fustini <[email protected]> > > --- > > MAINTAINERS | 1 + > > arch/riscv/kernel/qos/internal.h | 81 +++++++ > > arch/riscv/kernel/qos/qos_resctrl.c | 432 ++++++++++++++++++++++++++++++++++++ > > include/linux/riscv_qos.h | 76 +++++++ > > 4 files changed, 590 insertions(+) > > [..] > > +/* Set capacity block mask (cc_block_mask) */ > > +static void cbqri_set_cbm(struct cbqri_controller *ctrl, u64 cbm) > > +{ > > + iowrite64(cbm, ctrl->base + CBQRI_CC_BLOCK_MASK_OFF); > > +} > > CBQRI capacity limits appear to include both cc_block_mask and > cc_cunits, but only cc_block_mask seems to be modeled here. How is > cc_cunits expected to be handled? There was no match for cc_units in the existing resctrl schema so I had planned to wait until the initial support is reviewed and merged to propose support for cc_units. Thanks, Drew