The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Drew Fustini <fustini@kernel.org>
To: sashiko-reviews@lists.linux.dev
Cc: linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org,
	x86@kernel.org
Subject: Re: [PATCH v6 8/8] riscv_cbqri: Add CBQRI capacity allocation platform driver
Date: Wed, 29 Jul 2026 19:11:14 -0700	[thread overview]
Message-ID: <amqywoRHZO9xKD+V@x1> (raw)
In-Reply-To: <20260730012125.2DA611F000E9@smtp.kernel.org>

On Thu, Jul 30, 2026 at 01:21:24AM +0000, sashiko-bot@kernel.org wrote:
> Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
> - [Medium] The probe function unconditionally fails if the `riscv,cbqri-rcid` device tree property is missing, which breaks support for monitoring-only capacity controllers.
> --
> 
> --- Patch [8]: [PATCH v6 8/8] riscv_cbqri: Add CBQRI capacity allocation platform driver ---
> commit 954af62b51bb07d376a8671fb6db032a2ae482bc
> Author: Drew Fustini <fustini@kernel.org>
> 
> riscv_cbqri: Add CBQRI capacity allocation platform driver
> 
> This commit adds a device-tree platform driver for the RISC-V CBQRI capacity
> controller. It binds to the "riscv,cbqri-capacity-controller" compatible,
> determines the cache domain, and registers the controller with the resctrl
> framework.
> 
> > diff --git a/drivers/resctrl/cbqri_capacity.c b/drivers/resctrl/cbqri_capacity.c
> > new file mode 100644
> > index 0000000000000..0670a676bdb1f
> > --- /dev/null
> > +++ b/drivers/resctrl/cbqri_capacity.c
> [ ... ]
> > +static int cbqri_capacity_probe(struct platform_device *pdev)
> > +{
> [ ... ]
> > +	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> > +	if (!res)
> > +		return -EINVAL;
> > +
> > +	ret = of_property_read_u32(dev->of_node, "riscv,cbqri-rcid", &rcid_count);
> > +	if (ret) {
> > +		dev_err(dev, "missing riscv,cbqri-rcid\n");
> > +		return ret;
> > +	}
> 
> [Severity: Medium]
> Will this unconditionally failing check prevent monitoring-only controllers
> from probing?
> 
> The core registration logic in riscv_cbqri_register_cc_dt() indicates that
> monitoring-only controllers do not need an RCID count.
> 
> However, by returning an error when the riscv,cbqri-rcid property is absent,
> the driver appears to reject valid monitoring-only controllers before they
> can be registered.
> 
> Would it be better to treat this property as optional and default rcid_count
> to 0 if it is missing?

This series only implements allocation, so there is no monitoring-only
controller to describe yet.

Drew

  reply	other threads:[~2026-07-30  2:11 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-30  1:11 [PATCH v6 0/8] riscv: Add Ssqosid and initial CBQRI resctrl support Drew Fustini
2026-07-30  1:11 ` [PATCH v6 1/8] dt-bindings: riscv: Add Ssqosid extension description Drew Fustini
2026-08-05  2:46   ` Paul Walmsley
2026-07-30  1:11 ` [PATCH v6 2/8] riscv: Detect the Ssqosid extension Drew Fustini
2026-08-05  2:47   ` Paul Walmsley
2026-08-05  3:40     ` Drew Fustini
2026-07-30  1:11 ` [PATCH v6 3/8] riscv: Add support for srmcfg CSR from " Drew Fustini
2026-07-30  1:22   ` sashiko-bot
2026-07-30  2:04     ` Drew Fustini
2026-08-05 18:54   ` Paul Walmsley
2026-08-05 20:50     ` Drew Fustini
2026-08-06  1:21       ` Paul Walmsley
2026-07-30  1:11 ` [PATCH v6 4/8] riscv_cbqri: Add capacity controller probe and allocation device ops Drew Fustini
2026-07-30  1:11 ` [PATCH v6 5/8] riscv_cbqri: resctrl: Add cache allocation via capacity block mask Drew Fustini
2026-07-30  1:27   ` sashiko-bot
2026-07-30  2:09     ` Drew Fustini
2026-07-30  1:11 ` [PATCH v6 6/8] riscv: Enable resctrl filesystem for Ssqosid Drew Fustini
2026-07-30  1:11 ` [PATCH v6 7/8] dt-bindings: riscv: Add binding for CBQRI controllers Drew Fustini
2026-07-30  1:11 ` [PATCH v6 8/8] riscv_cbqri: Add CBQRI capacity allocation platform driver Drew Fustini
2026-07-30  1:21   ` sashiko-bot
2026-07-30  2:11     ` Drew Fustini [this message]
2026-08-05  3:00 ` [PATCH v6 0/8] riscv: Add Ssqosid and initial CBQRI resctrl support patchwork-bot+linux-riscv
2026-08-05 19:00 ` patchwork-bot+linux-riscv

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=amqywoRHZO9xKD+V@x1 \
    --to=fustini@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox