Repository navigation
accel/ane: serve H16 shared-memory requests only after their notification - #863
Merged
Merged
Conversation
Fresh SHAREDMALLOC slots and allocation requests both have a zero header. Polling their body without the matching channel notification can answer while firmware is still publishing the request. Snapshot the notified batch after the exact IRQ acknowledgment, before sending any answer, and retain a count across service calls. This preserves coalesced requests and prevents a later request from borrowing an old notification. Keep the existing absolute deadline and reply barriers. Add KUnit cases for delayed and unrelated notifications, batch wraparound, descriptor-selected IRQ bits and acknowledgment-before-read ordering. The boot simulator now publishes real notifications instead of relying on unconditional scanning.
…reads Document the MMIO accessor ordering contract and give the H17 backend the full barrier already used by H16. Include the notified batch count in H16 startup timeout evidence.
…g' into ane/h16-start-stall
The H16 host now serves the SHAREDMALLOC ring only after the firmware raises its notification bit, as macOS does. Count the polls that found a request body in the ring before that bit, and log the count with the number of allocations at the end of every startup. A nonzero count marks a start where the earlier host would have answered the request while the firmware was still posting it, which is the window behind the intermittent startup and resume stalls. Assisted-by: LLM Signed-off-by: Ryan Murray <[email protected]>
This was referenced Nov 2, 2026
notmysegv
pushed a commit
to notmysegv/linux
that referenced
this pull request
Nov 4, 2026
…nto integration/aurora Bring integration/aurora up to the aurora-wip tip 9ff2b9a. After this merge the two branches have the same tree. The range contains the fleet14o source c243830 (aurora-silicon#857, aurora-silicon#858, aurora-silicon#795, aurora-silicon#859), which was promoted on all four machines on 2026-11-02 and 03, and the merges after it: aurora-silicon#861 (apple-dcp selftest stubs for aurora-silicon#858), aurora-silicon#860 (SEP keybag in the shared xART window, the aurora-wip copy of aurora-silicon#856), aurora-silicon#724 (J616s boot NOR, both parts), aurora-silicon#779 (ALS colour temperature ABI), aurora-silicon#862 (J700 GD25UF16E boot NOR, the Neo bless fix), aurora-silicon#863 (J616s ANE H16 start stall), aurora-silicon#797 (T6000 DCS whole-word writes) and aurora-silicon#803 (G17 keeps innocent clients alive across another client's recovery). aurora-silicon#858 and aurora-silicon#860 make the same changes integration/aurora already had as aurora-silicon#855 and aurora-silicon#856, so they merge without conflicts. Assisted-by: LLM Signed-off-by: Ryan Murray <[email protected]>
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.
The H16 ANE on the M4 Pro sometimes stalled while it started, which put it in quarantine until the next reboot. It happened in about 1 in 7-9 cold restarts after s2idle and about 5 in 20 boots. A quarantined ANE then refused system sleep, so the J616s had to keep its sleep mask. The stall hit after a random SHAREDMALLOC reply (the 2nd, 3rd or 4th), or after the last one and before startup ack 4.
Cause: our polled host answered a SHAREDMALLOC request as soon as its body showed up in the ch5 ring. A request header is 0, the same as an empty slot, so a visible body doesn't mean the firmware has finished posting it. Answering inside that window loses the firmware's wakeup. macOS reads the pending IRQ word, acks exactly that value, issues a barrier, and only then drains the rings that word indicates. The window opened when the H16 waits moved to 20-50 us poll steps and a 30 us busy poll; the first stall in the saved logs is on fleet14l.
Changes:
Testing
Based on the t-4541 work in ane/h16-startup-ring.
🤖 Generated with Claude Code