[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20260209141649.330184-1-gong.shuai@sanechips.com.cn>
Date: Mon, 9 Feb 2026 22:16:49 +0800
From: Gong Shuai <gsh517025@...il.com>
To: fustini@...nel.org
Cc: Dave.Martin@....com,
acpica-devel@...ts.linux.dev,
alex@...ti.fr,
aou@...s.berkeley.edu,
aricciardi@...libre.com,
atish.patra@...ux.dev,
atishp@...osinc.com,
babu.moger@....com,
ben.horgan@....com,
conor+dt@...nel.org,
cp0613@...ux.alibaba.com,
cuiyunhui@...edance.com,
devicetree@...r.kernel.org,
fenghua.yu@...el.com,
guo.wenjia23@....com.cn,
james.morse@....com,
krzk+dt@...nel.org,
lenb@...nel.org,
linux-acpi@...r.kernel.org,
linux-kernel@...r.kernel.org,
linux-riscv@...ts.infradead.org,
liu.qingtao2@....com.cn,
liwei1518@...il.com,
mindal@...ihalf.com,
npitre@...libre.com,
palmer@...belt.com,
paul.walmsley@...ive.com,
peternewman@...gle.com,
pjw@...nel.org,
rafael@...nel.org,
reinette.chatre@...el.com,
rkrcmar@...tanamicro.com,
robert.moore@...el.com,
robh@...nel.org,
samuel.holland@...ive.com,
sunilvl@...tanamicro.com,
tony.luck@...el.com,
vasu@...osinc.com,
ved@...osinc.com,
x86@...nel.org,
zhiwei_liu@...ux.alibaba.com,
gong.shuai@...echips.com.cn
Subject: Re: [PATCH RFC v2 08/17] RISC-V: QoS: add resctrl interface for CBQRI controllers
Hi, Drew
> Add interface for CBQRI controller drivers to make use of the resctrl
> filesystem.
>
> Co-developed-by: Adrien Ricciardi <aricciardi@...libre.com>
> Signed-off-by: Adrien Ricciardi <aricciardi@...libre.com>
> Signed-off-by: Drew Fustini <fustini@...nel.org>
>
> ...
>
> +u32 resctrl_arch_get_config(struct rdt_resource *r, struct rdt_ctrl_domain *d,
> + u32 closid, enum resctrl_conf_type type)
> +{
> + struct cbqri_resctrl_dom *hw_dom;
> + struct cbqri_controller *ctrl;
> + int reg_offset;
> + u32 percent;
> + u32 rbwb;
> + u64 reg;
> + int err;
> +
> + hw_dom = container_of(d, struct cbqri_resctrl_dom, resctrl_ctrl_dom);
> +
> + ctrl = hw_dom->hw_ctrl;
> +
> + if (!r->alloc_capable)
> + return resctrl_get_default_ctrl(r);
> +
> + switch (r->rid) {
> + case RDT_RESOURCE_L2:
> + case RDT_RESOURCE_L3:
> + /* Clear cc_block_mask before read limit operation */
> + cbqri_set_cbm(ctrl, 0);
> +
> + /* Capacity read limit operation for RCID (closid) */
> + err = cbqri_cc_alloc_op(ctrl, CBQRI_CC_ALLOC_CTL_OP_READ_LIMIT, type, closid);
It looks like the parameter order might be incorrect. I believe it
should be:
cbqri_cc_alloc_op(ctrl, CBQRI_CC_ALLOC_CTL_OP_READ_LIMIT, closid, type);
> + if (err < 0) {
> + pr_err("%s(): operation failed: err = %d", __func__, err);
> + return resctrl_get_default_ctrl(r);
> + }
> ...
Sorry for the resend, my company email had some formatting issues,
so I'm sending this from my personal address.
Hope it doesn't cause any trouble!
Thanks,
Shuai
Powered by blists - more mailing lists