From: sashiko-bot@kernel.org
To: "Yin Li" <yin.li@oss.qualcomm.com>
Cc: conor+dt@kernel.org, robh@kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v3 7/8] arm_mpam: Support MSC accessibility derivation from RIS nodes
Date: Thu, 08 Oct 2026 06:59:00 +0000 [thread overview]
Message-ID: <sashiko-outbox-163723@kernel.org> (raw)
In-Reply-To: <20261008-mpam-resctrl-dt-knp-support-v3-7-35196c2b43bf@oss.qualcomm.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] arm_mpam: Mismatch in RIS node iteration causes childless MSC nodes to fail probe
--
commit 6ccd46129e50bd63d07916d508a9533280b06972
Author: Yin Li <yin.li@oss.qualcomm.com>
arm_mpam: Support MSC accessibility derivation from RIS nodes
This commit adds a per-RIS fallback path for resolving an MSC's CPU affinity
when the parent node does not provide an affinity hint. It factors the
device tree specific logic into mpam_dt_update_msc_accessibility().
> diff --git a/drivers/resctrl/mpam_devices.c b/drivers/resctrl/mpam_devices.c
> index 048d32e69f55f..80157b819c3d1 100644
> --- a/drivers/resctrl/mpam_devices.c
> +++ b/drivers/resctrl/mpam_devices.c
[ ... ]
> +static void mpam_dt_update_msc_accessibility(struct mpam_msc *msc)
> +{
> + cpumask_t *affinity = &msc->accessibility;
> +
> + cpumask_clear(affinity);
> +
> + if (get_cpumask_from_parent(msc, affinity) == -ENODEV) {
> + for_each_available_child_of_node_scoped(msc->pdev->dev.of_node, ris) {
> + if (get_cpumask_from_ris(ris, affinity)) {
> + cpumask_clear(affinity);
> + break;
> + }
> + }
> + }
> +}
[Severity: High]
Does this code introduce a regression for MSC nodes without child RIS nodes?
In mpam_dt_parse_resources(), childless MSC nodes are supported by explicitly
using the MSC node itself as the RIS if no children are found.
However, in this new fallback path, if get_cpumask_from_parent() returns
-ENODEV and the MSC node has no children, the
for_each_available_child_of_node_scoped() loop will not execute. This leaves
the affinity mask empty and causes the driver to abort the probe since the MSC
is not accessible from any CPU.
Additionally, does this loop iterate all child nodes without verifying they are
actually RIS nodes?
By not checking for a reg property, any non-RIS child node could cause
get_cpumask_from_ris() to fail, which clears the affinity mask and spuriously
aborts the probe.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261008-mpam-resctrl-dt-knp-support-v3-0-35196c2b43bf@oss.qualcomm.com?part=7
next prev parent reply other threads:[~2026-10-08 6:59 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-08 6:41 [PATCH v3 0/8] arm-mpam: Add basic device tree support for resctrl Yin Li
2026-10-08 6:41 ` [PATCH v3 1/8] arm_mpam: Fix the RIS index range check in mpam_ris_create_locked Yin Li
2026-10-08 6:41 ` [PATCH v3 2/8] arm_mpam: Fix MSC MMIO window size off-by-one with resource_size() Yin Li
2026-10-08 6:41 ` [PATCH v3 3/8] dt-bindings: arm: Add MPAM MSC binding Yin Li
2026-10-08 21:27 ` Rob Herring
2026-10-08 6:41 ` [PATCH v3 4/8] cacheinfo: Expose the code to generate a cache-id from a device_node Yin Li
2026-10-08 6:55 ` sashiko-bot
2026-10-08 6:41 ` [PATCH v3 5/8] arm_mpam: Add device tree support for MSC probing Yin Li
2026-10-08 6:57 ` sashiko-bot
2026-10-08 6:41 ` [PATCH v3 6/8] arm_mpam: Add support for memory controller MSC on DT platforms Yin Li
2026-10-08 7:00 ` sashiko-bot
2026-10-08 21:29 ` Rob Herring
2026-10-08 6:41 ` [PATCH v3 7/8] arm_mpam: Support MSC accessibility derivation from RIS nodes Yin Li
2026-10-08 6:59 ` sashiko-bot [this message]
2026-10-08 6:41 ` [PATCH DNM v3 8/8] arm64: dts: qcom: kaanapali: Add MPAM MSC nodes for the L2 caches Yin Li
2026-10-08 6:55 ` sashiko-bot
2026-10-08 21:00 ` Rob Herring
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=sashiko-outbox-163723@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=yin.li@oss.qualcomm.com \
/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