Repository navigation
accel/ane: fail a DART fault that clears before it is handled - #383
joshuaswarren wants to merge 1 commit into
Conversation
|
Agent review of head 4696270. Verdict: clean, no blocking findings. Verified:
Repro (both run on the head):
Non-blocking notes (no failing behaviour shown):
Not covered: no hardware run. The aurora-silicon/linux#980 "same change" claim in the body was not checked. Perf: no regression. Same DART and engine reads per poll, two int assignments added. |
4696270 to
c28f63a
Compare
|
[Joshua's agent] @maralcbr @chriskearney @scottjones Could one of you review this? I rebased it on It fixes a request that reported success after a DART fault the engine never recovered from. If the fault latch cleared before the driver read it again, the poll returned the same value as a finished request. The poll now returns -EIO and the fault ends in the recovery path. Proven by a host test that builds the production poll and execute code against a simulated latch: the base fails 4 of 7 cases, and this change passes all 7. It is the same change as aurora-silicon/linux#980. |
The completion poll stops when the DART error latch is set, but it returned 1, the same value as a finished request. If the latch cleared before ane_tm_execute() read it again, no fault was recorded and the request went on to the completion check and returned success although the engine never completed. If a drained fault cleared the same way, the scratch pages were released without a recovery. Return -EIO from the poll step so the poll reports the fault itself. Carry the scratch cap and the drain failure into err as well, so a fault that clears after them ends in the recovery path and keeps the scratch mappings until a verified reset reclaims them. This is the poll and error propagation change of omarchy-ane AsahiLinux#359 (merge 20629c55), the same change as aurora-silicon/linux#980. The scratch lifetime part of AsahiLinux#359 is already present here in a different form: the scratch pages live in struct ane_device, the wedge path never releases them, and ane_reclaim_preserved() releases them after a verified power cycle. The host test builds the production poll and execute code against a simulated latch. The base revision fails four of seven cases: a fault that clears before the second read returns 0, a fault seen only by the last poll releases scratch without recovery, a failed drain loses its error, and a scratch cap followed by a clear latch releases the scratch without recovery. With this change all seven pass. Assisted-by: LLM Signed-off-by: Joshua Warren <816217+joshuaswarren@users.noreply.github.com>
|
[Joshua's agent] Rebased onto integration/aurora at bed544b. Head is now df1d434. No conflicts. The 1 commit(s) are unchanged (range-diff). CI re-runs on the new head. Review needed: one approval from @maralcbr, @scottjones or @chriskearney (CODEOWNERS). @maralcbr and @scottjones merged the last 6 PRs in this repo. |
c28f63a to
df1d434
Compare
|
Closing with a pointer: this landed upstream as aurora-silicon#980 (merged). The DART fault that clears before it is handled now fails the submission there; nothing left to track on this side. |
accel/ane: fail a DART fault that clears before it is handled
The completion poll stops when the DART error latch is set, but it
returned 1, the same value as a finished request. If the latch cleared
before ane_tm_execute() read it again, no fault was recorded and the
request went on to the completion check and returned success although
the engine never completed. If a drained fault cleared the same way,
the scratch pages were released without a recovery.
Return -EIO from the poll step so the poll reports the fault itself.
Carry the scratch cap and the drain failure into err as well, so a
fault that clears after them ends in the recovery path and keeps the
scratch mappings until a verified reset reclaims them.
This is the poll and error propagation change of omarchy-ane #359
(merge 20629c55), the same change as aurora-silicon/linux#980. The
scratch lifetime part of #359 is already present here in a different
form: the scratch pages live in struct ane_device, the wedge path never
releases them, and ane_reclaim_preserved() releases them after a
verified power cycle.
The host test builds the production poll and execute code against a
simulated latch. The base revision fails four of seven cases: a fault
that clears before the second read returns 0, a fault seen only by the
last poll releases scratch without recovery, a failed drain loses its
error, and a scratch cap followed by a clear latch releases the scratch
without recovery. With this change all seven pass.
Assisted-by: LLM
Signed-off-by: Joshua Warren 816217+joshuaswarren@users.noreply.github.com