From: Claude Code Review Bot <claude-review@example.com>
To: dri-devel-reviews@example.com
Subject: Claude review: soc: qcom: rpmh-rsc: Skip TCS init when RSC is managed by firmware
Date: Mon, 25 May 2026 19:16:36 +1000 [thread overview]
Message-ID: <review-patch1-20260522060645.4399-2-graham.oconnor@gmail.com> (raw)
In-Reply-To: <20260522060645.4399-2-graham.oconnor@gmail.com>
Patch Review
**Concept**: When UEFI firmware leaves the RSC hardware solver active, skip TCS reinitialization to avoid a security violation.
**Issue 1 — Too much is skipped.** Looking at the normal probe path in `rpmh_rsc_probe()` (rpmh-rsc.c:1077-1131), the early return skips:
- `rpmh_probe_tcs_config()` (intended)
- Spinlock/waitqueue/bitmap initialization
- IRQ registration
- Active TCS interrupt enable
- Client cache list initialization
- **`devm_of_platform_populate()`** — child nodes (rpmh clients) will never probe
```c
+ if (readl_relaxed(drv->base + drv->regs[DRV_SOLVER_CONFIG]) &
+ (DRV_HW_SOLVER_MASK << DRV_HW_SOLVER_SHIFT)) {
+ dev_dbg(&pdev->dev, "RSC already managed by firmware, skipping TCS init\n");
+ platform_set_drvdata(pdev, drv);
+ return 0;
+ }
```
The `drv` set as driver data has uninitialized `lock`, `tcs_wait`, `tcs_in_use`, `client.cache`, and `client.batch_cache`. If any consumer obtains this `drv` pointer and attempts an rpmh operation, it will operate on uninitialized data.
**Issue 2 — No `devm_of_platform_populate()`.** The commit message says "allowing other drivers to find the controller," but child platform devices of the RSC node won't be created without this call. Is the intent that the entire RSC subsystem should be inert on this platform? If so, the commit message should explain that. If children should still probe, then at minimum `devm_of_platform_populate()` needs to be called in the early-return path.
**Issue 3 — dev_dbg vs dev_info.** Silently skipping the entire RSC init path is a significant behavioral change. Using `dev_info` or `dev_notice` would help debug boot issues.
**Suggestion**: If the firmware-managed case truly means the kernel should not interact with this RSC at all, consider whether probing should succeed at all, or whether the driver should explicitly populate children while leaving TCS alone. The current approach creates a half-initialized driver data structure.
---
---
Generated by Claude Code Patch Reviewer
next prev parent reply other threads:[~2026-05-25 9:16 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-22 6:06 [PATCH 0/6] arm64: qcom: Enable additional hardware on Radxa Dragon Q6A Graham O'Connor
2026-05-22 6:06 ` [PATCH 1/6] soc: qcom: rpmh-rsc: Skip TCS init when RSC is managed by firmware Graham O'Connor
2026-05-25 9:16 ` Claude Code Review Bot [this message]
2026-05-22 6:06 ` [PATCH 2/6] firmware: qcom: scm: Allow EFI variable access on Radxa Dragon Q6A Graham O'Connor
2026-05-24 16:33 ` Dmitry Baryshkov
2026-05-25 9:16 ` Claude review: " Claude Code Review Bot
2026-05-22 6:06 ` [PATCH 3/6] drm/msm/dp: Limit voltage swing level to 2 for RA620 bridge Graham O'Connor
2026-05-22 9:28 ` Konrad Dybcio
2026-05-25 9:16 ` Claude review: " Claude Code Review Bot
2026-05-22 6:06 ` [PATCH 4/6] arm64: dts: qcom: qcs6490-radxa-dragon-q6a: Add regulator supplies and disable EUD Graham O'Connor
2026-05-24 16:38 ` Dmitry Baryshkov
2026-05-25 9:16 ` Claude review: " Claude Code Review Bot
2026-05-22 6:06 ` [PATCH 5/6] arm64: dts: qcom: qcs6490-radxa-dragon-q6a: Enable GPU and display pipeline Graham O'Connor
2026-05-22 6:44 ` Neil Armstrong
2026-05-25 9:16 ` Claude review: " Claude Code Review Bot
2026-05-22 6:06 ` [PATCH 6/6] arm64: dts: qcom: qcs6490-radxa-dragon-q6a: Enable USB3 SuperSpeed Graham O'Connor
2026-05-22 6:44 ` Neil Armstrong
2026-05-25 9:16 ` Claude review: " Claude Code Review Bot
2026-05-22 10:13 ` [PATCH 0/6] arm64: qcom: Enable additional hardware on Radxa Dragon Q6A Graham O'Connor
2026-05-24 1:58 ` Xilin Wu
2026-05-25 9:16 ` Claude review: " Claude Code Review Bot
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=review-patch1-20260522060645.4399-2-graham.oconnor@gmail.com \
--to=claude-review@example.com \
--cc=dri-devel-reviews@example.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