Repository navigation
accel/ane: H13 recovery without reboot (H13 part of #692, on aurora-wip) - #717
Merged
Merged
Conversation
Suspend the ANE consumer before its domain suppliers, verify the engine islands actually power off, and restore its runtime PM reference on every exit. Avoid the system-sleep force helpers and speculative retained task-error writes. Keep DMA backing and the exceptional module pin until recovery is verified. Use one deadline across H13 fault drains and H14 command ACK/finish waits. Add an explicit destructive H13 recovery test and a deterministic fixture generator using the licensed public compiler. Document the remaining H14 firmware ownership and stale-ID work; H14 reset remains quarantined. Assisted-by: LLM Signed-off-by: Ryan Murray <[email protected]>
Share the runtime-PM cycle independently of task-manager MMIO and test it against real runtime-PM supplier links. Cover repeated and single-domain cycles, consumer and supplier suspend errors, a missing off acknowledgment and resume failure, including restoration of the caller reference. Assisted-by: LLM Signed-off-by: Ryan Murray <[email protected]>
The packaged tools contain a static libane, so a ctypes test cannot rely on a system shared library. Use the documented ABI 1 buffer and submit ioctls directly. Keep both fds, GEM handles and mappings alive across all three resets, pin both public fixture hashes, and provide device-free container validation before the destructive run. Also depend on DRM_ACCEL for traversal of the PM KUnit test directory. Assisted-by: LLM Signed-off-by: Ryan Murray <[email protected]>
Exercise the malformed convolution with fp16 one inputs so the test requests MAC work rather than relying on an all-zero activation path. The input and weight bytes are deterministic; only the add fixture is used as a numerical oracle. Assisted-by: LLM Signed-off-by: Ryan Murray <[email protected]>
The SET window covers the engine islands but not their SYS_CPU parent. DART suppliers suspend asynchronously after the ANE consumer drops its references. Require every attached genpd, including SYS_CPU, to report off before resuming the consumer; otherwise that resume can race the DART idle work and keep the task-manager register file powered. Use only the genpd provider API and always-accessible PMGR reads. A shared domain that cannot turn off leaves recovery failed and preserves the DMA safety pin. Assisted-by: LLM Signed-off-by: Ryan Murray <[email protected]>
Change the add inputs for each call and poison its 64 logical output lanes before submitting. Zero the unused padding, which need not be written by the engine. Comparing the complete tile with the oracle now rejects a stale completion even when the previous call was correct. Assisted-by: LLM Signed-off-by: Ryan Murray <[email protected]>
Recovery refused to restart whenever TQ_EN bit 13 was set after the partition power cycle, reading it as "task manager still halted". On the M1 Pro that bit is set on every healthy runtime resume as well: TQ_EN reads 0x3000 and TM_ERROR1 0x22222222 each time the engine comes back from autosuspend. So the check failed every recovery and left the engine wedged until reboot. Drop it. The tm/tq register file on T600x also keeps its state through the acknowledged power-off, and through PMGR reset pulses on every ANE domain (ane_sys, sys_cpu, set0, base, set1-4), so a power cycle alone does not clear what a failed task latched. Bring back the retained-state drain for SoCs whose descriptor says the file is retained (T6000/T6001), based on omarchy-ane's ane_tm_drain_retained by Joshua Warren (MIT). Before it was removed, the drain recovered every "-5, finish lines=1" task error seen on the M1 Pro. A wedge the drain cannot clear still fails the idle check and stays wedged, with no reboot loop. Assisted-by: LLM Signed-off-by: Ryan Murray <[email protected]>
Contributor
Author
|
M1 Pro check of this PR together with #718, kernel 7.3.0-aurora-fleet12g-ane (aurora-wip aa07c00 + #717 + #718, fleet recipe, one-shot boot):
Earlier the same night lane A's boost-0 bisect produced a run of |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
H13 (M1, M1 Pro/Max) ANE recovery from a timed-out or failed task without a reboot, on top of aurora-wip.
This is the H13 part of #692, rebased onto aurora-wip after #684 landed, plus the fix that made it work on silicon. The H14 firmware restart (71fa8e9) stays on #692 because it conflicts with the H16 platform code that's in aurora-wip now, and it hasn't run on an M2 yet.
What it does: on a job timeout the driver suspends the engine through runtime PM, checks every attached power domain went off (SYS_CPU included), powers back up, drains the task-manager state that T600x keeps in retention, re-arms the TM and checks it's idle. The failed submit gets its error and the device keeps working. If any step fails it stays wedged as before, no loop.
Conflicts with #684 resolved by releasing the performance request (
ane_perf_suspend) before the power cycle, as aurora-wip's recovery did.Tested on the M1 Pro (T6000), 7.3.0-aurora-fleet12e-ane692 (fleet12e plus the same commits). The deterministic reproducer (a program that times out on its first submit,
-110, finish lines=0) gave -EIO, thentm recovered: idle, wedged 0, and a bit-exact smoke 20/20, five rounds in a row with no reboot. Details in #692 (comment).KUnit, x86_64 and arm64 (LLVM): ane-pm-recovery 6/6, apple-pmp-ane 4/4, ane-submit, ane-fw-platform and the rest pass. ane-h16-hwx fails 3 subtests (forms, tensor, snapshot), and it fails the same way on aurora-wip without this branch, so it's not from here.
Not tested: T8103 (M1). M1 Pro check of this exact branch on aurora-wip is next.
🤖 Generated with Claude Code