Re: [External] [PATCH RFC v2 14/17] include: acpi: actbl2: Add structs for RQSC table

Drew Fustini <[email protected]>
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 <acOLcRc2TWt2wV5f@gen8>
On Wed, Mar 25, 2026 at 09:48:37AM +0800, yunhui cui wrote:
> Hi Drew,
> 
> On Thu, Jan 29, 2026 at 4:28 AM Drew Fustini <[email protected]> wrote:
> >
> > Add structs for the RQSC table which describes the properties of the
> > RISC-V QoS controllers (CBQRI) in the system. The table also describes
> > the topological arrangement of the QoS controllers and resources in the
> > system. The topology is expressed in terms of the location of the
> > resources within the system and the relation between the QoS Controller
> > and the resource it manages.
> >
> > Link: https://github.com/riscv-non-isa/riscv-cbqri/releases/tag/v1.0
> > Link: https://github.com/riscv-non-isa/riscv-rqsc/blob/main/src/chapter2.adoc
> > Signed-off-by: Drew Fustini <[email protected]>
> > ---
> >  include/acpi/actbl2.h | 92 +++++++++++++++++++++++++++++++++++++++++++++++++++
> >  1 file changed, 92 insertions(+)
> >
> > diff --git a/include/acpi/actbl2.h b/include/acpi/actbl2.h
> > index f726bce3eb84..7367990349ee 100644
> > --- a/include/acpi/actbl2.h
> > +++ b/include/acpi/actbl2.h
> > @@ -53,6 +53,7 @@
> >  #define ACPI_SIG_RGRT           "RGRT" /* Regulatory Graphics Resource Table */
> >  #define ACPI_SIG_RHCT           "RHCT" /* RISC-V Hart Capabilities Table */
> >  #define ACPI_SIG_RIMT           "RIMT" /* RISC-V IO Mapping Table */
> > +#define ACPI_SIG_RQSC           "RQSC" /* RISC-V RISC-V Quality of Service Controller */
> >  #define ACPI_SIG_SBST           "SBST" /* Smart Battery Specification Table */
> >  #define ACPI_SIG_SDEI           "SDEI" /* Software Delegated Exception Interface Table */
> >  #define ACPI_SIG_SDEV           "SDEV" /* Secure Devices table */
> > @@ -3165,6 +3166,97 @@ enum acpi_rgrt_image_type {
> >         ACPI_RGRT_TYPE_RESERVED = 2     /* 2 and greater are reserved */
> >  };
> >
> > +/*******************************************************************************
> > + *
> > + * RQSC - RISC-V Quality of Service Controller
> > + *        Version 1
> > + *
> > + ******************************************************************************/
> > +
> > +struct acpi_table_rqsc_fields_res {
> > +       u8 type;        // 1
> > +       u8 resv;        // 1
> > +       u16 length;     // 2
> > +       u16 flags;      // 2
> > +       u8 resv2;       // 1
> > +       u8 id_type;     // 1
> > +       u64 id1;        // 8
> > +       u32 id2;        // 4
> > +};
> > +
> > +struct acpi_table_rqsc_fields {
> > +       u8 type;        //  1
> > +       u8 resv;        //  1
> > +       u16 length;     //  2
> > +       u32 reg[3];     // 12
> > +       u32 rcid;       //  4
> > +       u32 mcid;       //  4
> 
> The spec appears to specify a length of 2 bytes for this field?

Yes, this was a bug. I have changed rcid and mcid to u16:

https://github.com/tt-fustini/linux/blob/b4/ssqosid-cbqri/include/acpi/actbl2.h

Thanks,
Drew
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.