From: Claude Code Review Bot <claude-review@example.com>
To: dri-devel-reviews@example.com
Subject: Claude review: accel/amdxdna: Add AIE4 power on and off support
Date: Tue, 31 Mar 2026 17:05:10 +1000 [thread overview]
Message-ID: <review-patch6-20260330163705.3153647-7-lizhi.hou@amd.com> (raw)
In-Reply-To: <20260330163705.3153647-7-lizhi.hou@amd.com>
Patch Review
Adds SMU init/fini to the AIE4 firmware load/unload path and NPU3 SMU register definitions.
**Issue 1 — `SMU_ARG_REG` and `SMU_OUT_REG` aliased:**
```c
DEFINE_BAR_OFFSET(SMU_ARG_REG, NPU3_SMU, MP1_C2PMSG_61_ALT_1),
...
DEFINE_BAR_OFFSET(SMU_OUT_REG, NPU3_SMU, MP1_C2PMSG_61_ALT_1),
```
Same register for input argument and output. This is the same aliasing pattern as PSP. Appears intentional for the NPU3 hardware protocol.
**Issue 2 — `SMU_INTR_REG` maps to bar base:**
```c
DEFINE_BAR_OFFSET(SMU_INTR_REG, NPU3_SMU, MMNPU_APERTURE4_BASE),
```
`DEFINE_BAR_OFFSET` computes `(reg_addr) - bar##_BAR_BASE`, and here `NPU3_SMU_BAR_BASE = MMNPU_APERTURE4_BASE`, so the offset is 0. The interrupt register is at offset 0 of the SMU BAR. This seems intentional.
**Issue 3 — No DPM reset before `aie_smu_fini` in AIE4:**
```c
static void aie4_fw_unload(struct amdxdna_dev_hdl *ndev)
{
aie_psp_stop(ndev->aie.psp_hdl);
aie_smu_fini(ndev->aie.smu_hdl);
}
```
No DPM level reset before power off. If this is intentional (AIE4 doesn't need it), it should be documented. If not, it's a bug.
**Overall the series is a reasonable first step.** The main concerns are: the duplicate struct name pattern, the PSP bisection issue between patches 3 and 4, the `readx_poll_timeout` pointer arithmetic bug in patch 2, and the UAPI device type gap. The register aliasing patterns should be documented for future maintainers.
---
Generated by Claude Code Patch Reviewer
next prev parent reply other threads:[~2026-03-31 7:05 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-30 16:36 [PATCH V1 0/6] accel/amdxdna: Initial support for AIE4 platform Lizhi Hou
2026-03-30 16:37 ` [PATCH V1 1/6] accel/amdxdna: Create shared functions for AIE2 and AIE4 Lizhi Hou
2026-03-31 7:05 ` Claude review: " Claude Code Review Bot
2026-03-30 16:37 ` [PATCH V1 2/6] accel/amdxdna: Add basic support for AIE4 devices Lizhi Hou
2026-03-31 7:05 ` Claude review: " Claude Code Review Bot
2026-03-30 16:37 ` [PATCH V1 3/6] accel/amdxdna: Create common PSP interfaces for AIE2 and AIE4 Lizhi Hou
2026-03-31 7:05 ` Claude review: " Claude Code Review Bot
2026-03-30 16:37 ` [PATCH V1 4/6] accel/amdxdna: Add AIE4 firmware loading Lizhi Hou
2026-03-30 20:17 ` Mario Limonciello
2026-03-30 20:30 ` yidong Zhang
2026-03-31 2:45 ` Mario Limonciello
2026-03-31 7:05 ` Claude review: " Claude Code Review Bot
2026-03-30 16:37 ` [PATCH V1 5/6] accel/amdxdna: Create common SMU interfaces for AIE2 and AIE4 Lizhi Hou
2026-03-31 7:05 ` Claude review: " Claude Code Review Bot
2026-03-30 16:37 ` [PATCH V1 6/6] accel/amdxdna: Add AIE4 power on and off support Lizhi Hou
2026-03-31 7:05 ` Claude Code Review Bot [this message]
2026-03-31 7:05 ` Claude review: accel/amdxdna: Initial support for AIE4 platform 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-patch6-20260330163705.3153647-7-lizhi.hou@amd.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