Repository navigation
soc: apple: t6050-aop: stop AOP2 before AOP, well before the commit, as macOS - #2606
Merged
Merged
Conversation
DjDeveloperr
force-pushed
the
djdev/m5-t6050-aop2-before-aop
branch
from
November 20, 2026 20:41
74b149f to
9f353d7
Compare
…as macOS On the J714s, macOS stops the two always-on processors in one order, in every sleep traced under the hypervisor (cp9d, cp10c, k6, k7, k8): - AOP2's ring elements and AP IDLE come first, ~185-215 ms before the commit; - AOP's endpoint stops follow 1-11 ms later, and AOP's AP IDLE 18-25 ms after AOP2's. Linux had the order the other way round. AOP is stopped at its late suspend. AOP2 was stopped last, in the commit's first coprocessor pass, with interrupts off. On the J714s the AOP firmware crashed in deep sleep twice (11-18, 11-20), each time 0.2-0.5 s after the commit and on the first sleep after a boot, about 1 in 35 such sleeps. Both crashes followed that commit-time AOP2 stop. AOP's own endpoint order already matches macOS's (the device tree's lists), so the AOP2/AOP order is the difference the traces show. AOP2 now becomes a consumer of AOP for the PM core through a stateless device link, so its late suspend runs before AOP's. That late suspend does the stop the commit pass did: the same elements and AP IDLE, polled. AOP2 stays registered and ready for the commit, whose pass then sends it nothing. Nothing waits a fixed time between the two stops. AOP's endpoint stops start once the PM core reaches AOP's late suspend, right after AOP2's (macOS: 1-11 ms after). AOP2's stop line is logged at its late suspend. A suspend that is undone after it restarts AOP2 in its resume, as before. Without an AOP device the link isn't made, and AOP2 is stopped at the commit, as before. With interrupts on, AOP2's mailbox interrupt can now take the polled exchange's messages; both paths hand them over under the mailbox's receive lock. The resume order follows the link: AOP restarts, then AOP2, where macOS sends AOP2's AP ON 1 ms before AOP's. The resume is left as it was: the crashes come in the sleep, before any wake, and AOP2's restart in its .resume is the tested path. Signed-off-by: Diljit Singh <hey@djdev.me> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
DjDeveloperr
force-pushed
the
djdev/m5-t6050-aop2-before-aop
branch
from
November 20, 2026 23:44
9f353d7 to
4afff64
Compare
Contributor
|
The ordering through a device link is a tidy way to get AOP2's stop ahead of AOP's. I checked the interrupts-on concern:
Assisted-by: LLM (Claude:Opus 5.5) |
Contributor
Author
|
Hardware gate (J714s, M5 Pro), pe1, 20:06-20:27: 6 of 6 clean, in the same slot as #2602.
🤖 Generated with Claude Code |
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.
A J714s (M5 Pro) deep-sleep change, copied from macOS 27 traced under the hypervisor on the same machine. On
integration/auroradf62a8c. It is separate from #2602.What macOS does. In every sleep traced (cp9d, cp10c, k6, k7, k8), macOS stops the two always-on processors in one order:
What Linux did.
apple_sleep_coproc_register_first), with interrupts off.Why. On the J714s the AOP firmware crashed in deep sleep twice, on 11-18 and 11-20, each time:
Both crashes followed that commit-time AOP2 stop. The AOP2/AOP order is the one difference the traces show. This is a literal copy, not a proven cause. A crash with this order in place means it's wrong.
The change (drivers/soc/apple/t6050-aop.c).
Testing.
m5-test/kitS3-20261120= the ship lane's gate tree + drm: apple: dcp: V27 sleep: take messages that come during the settle (J714s -16 refusal) #2602 + this.🤖 Generated with Claude Code