From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot To: dri-devel-reviews@example.com Subject: Claude review: accel/amdxdna: Support retrieving hardware context debug information Date: Sat, 14 Mar 2026 06:42:17 +1000 Message-ID: In-Reply-To: <20260313181413.1108841-1-lizhi.hou@amd.com> References: <20260313181413.1108841-1-lizhi.hou@amd.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 Overall Series Review Subject: accel/amdxdna: Support retrieving hardware context debug information Author: Lizhi Hou Patches: 3 Reviewed: 2026-03-14T06:42:17.931971 --- This is a single patch adding support for retrieving hardware context health/debug information from the AIE2 firmware in the amdxdna accelerator driver. When a command times out, the driver queries the firmware for diagnostic information (GET_APP_HEALTH) and makes it available both via kernel log messages and through the hardware context query IOCTL to userspace. The patch is generally well-structured and follows existing driver patterns. However, there are several issues that should be addressed, ranging from a potential stack overflow to a missing cache invalidation and some behavioral concerns. **Key concerns:** 1. Large stack allocation (~560 bytes) in an IOCTL callback path 2. Missing DMA sync/cache invalidation after device write 3. Firmware query in a per-context iteration loop could cause latency issues under `dev_lock` 4. Minor: passing non-zero size with potentially NULL data pointer --- Generated by Claude Code Patch Reviewer