Repository navigation
accel/ane: h17: retry a failed resume after power cycling ANE_SYS - #1303
RyanTheTide wants to merge 1 commit into
Conversation
Since #1283, a latched ANE_SYS power-on during system sleep is left failed: the PS reset recovery cannot run from the noirq resume, where it hung the Neo. genpd treats the domain as on, the boot at PM_POST_SUSPEND fails, and the engine stays quarantined until the next boot. That happens on about one boot in four to eight. The resume at PM_POST_SUSPEND runs in process context after the thaw, where the PMGR can run the recovery. When the boot after sleep fails, put the engine down, power cycle ANE_SYS with apple_pmgr_ps_cycle() (a power-on that latches again is cleared there), and boot once more. The engine is quarantined only if that fails too. Signed-off-by: Ryan Murray <81541646+RyanTheTide@users.noreply.github.com> Assisted-by: LLM
|
Part 2 (Neo, 21:23-22:17, ane4n2 = this PR on 6ff31cb, same loop): the one-shot FLEET suite shows no hard regressions (ane 16/16, ane_resume 15/0, CTXR 1696/0, 0 AVC, 0 failed).
Each hang has the NEOHANG signature: the journal ends at Status: no natural latch in 14 boots of this PR, so the recovery is still unproven on hardware. Kept as DRAFT. Next: an injected-failure build (ane4n3: a test param fails every Nth resume after the boot) to drive the retry path end to end, once the Neo is stable again. |
|
J700 suspend A/B, 6ff31cb with and without this change (same loop: 6 systemd + 6 direct
The hung boot stops in the device suspend phases (the last line out is the freezer completing). The retry path added here did not run in any boot, hung or clean. Its only effect on the normal path is the binary layout of the ane module, and builds from different source paths also differ in kmalloc partition assignment (typed alloc tokens), so a control build of 6ff31cb from the same path is next before reading this as a code effect. Keeping this as a draft until then. |
|
J700 run on the production fleet64 kernel. Only the ane modules were rebuilt: fleet64 + this change + a test-only parameter that fails every Nth resume after the boot. The built-in kernel is unchanged.
|
Summary
Since #1283, an ANE_SYS power-on that latches during system sleep (
PS ane_sys: Failed to reach power state 0xf (requested 0x200f, now: 0x2b4f)) is left failed. The PMGR's PS-reset recovery cannot run in the noirq resume, where it hung the Neo. genpd carries on as if the domain were on, the H17 boot at PM_POST_SUSPEND fails, and the ANE is quarantined until the next boot ("reboot required").That resume runs in process context after the thaw, where the PMGR may run the recovery. When the boot after sleep fails,
ane_fw_resume_retry():apple_pmgr_ps_cycle(), where a power-on that latches again is cleared by the PS reset (-EINVAL means genpd already turned the domain off, so the next power-on is a fresh one);The engine is quarantined only if that also fails. Nothing changes on a resume that succeeds.
Test (Neo J700, one-shot boots, NEOHANG's sleep loop)
Each boot runs 2 rounds of 6 systemd + 6 direct pm_test=platform suspends + 3 rtcwake s2idle (rtcwake armed), from a fresh boot. Silent, os_uuid pin on every entry.
H17 ANE: recovered after a failed resumeand a working ANE afterwards. The next Neo slot runs more boots of the same loop.Raw: traces/power/20261109-ane4-neo-latch (README; runs/summary.txt, ane-.txt per boot).
checkpatch --strict 0/0/0. KUnit: drivers/accel/ane boot 224/224, transport 224/224 (x86_64).
🤖 Generated with Claude Code