Repository navigation
soc: apple: aop: explain the AFK init resend after a full mailbox - #2351
Conversation
The single resend of an AFK init request whose send found the mailbox full for the whole send timeout said the firmware "can still be busy finishing its own boot". That is not what the code waits for: the send already waits on the mailbox's send-empty interrupt, start_afk() runs only after the RTKit power handshake, and the firmware sends no other event when it reads its inbound FIFO again. Say so, point at the J616s report the resend came from, and at the issue that tracks why the FIFO stays full. No functional change. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
|
No blockers. Checked the new comment against the code at the head.
CI: host-tests failed in HW row: none needed for a comment-only change. The combined-kernel row (0 "AFK init not sent" on all four Macs) is enough. This can leave draft. Assisted-by: LLM (Claude:Opus 5.5) |
|
Adversarial pass at e5c3b15: no blockers; comment-only, the resend logic is unchanged.
Assisted-by: LLM (Claude:Opus 5.5) |
There was a problem hiding this comment.
Formal §1–§6 review at e5c3b1515d42bc58d222f58f6ee034278d7ce1c2:
Changes requested before approval:
- §6 Live CI is red (
UNSTABLE):host-testsfailed ate5c3b1515d42(job135603109369, failed duringPin the host toolchainsbefore tests ran) and has not been rerun or re-verified green on this head. All live CI checks must be green before approval. - Comment accuracy (
drivers/soc/apple/aop.rs:1570-1575):- The new comment states
"The send already waits on the mailbox's send-empty interrupt", which is only accurate for the IRQ path indrivers/soc/apple/mailbox.c.apple_mbox_send()sleep-polls on poll-only v8 mailboxes (mailbox.c:738-754) and G17 (:755-769), and busy-polls viareadl_poll_timeout_atomicwhenatomic || mbox->irq_send_empty < 0(:770-783). Please clarify that the send already waits (via send-empty interrupt or polling) for the full send timeout. - Avoid bare GitHub issue numbers
(#547)and(#2344)in kernel source comments (aop.rs:1573-1575), since they carry no context outside this repository; describe the symptom in the source comment (or use full repo-qualified links if needed) and keep issue references in the commit message.
- The new comment states
Other checks verified clean:
- §1–§4: Comment-only change (no functional/locking/lifetime change, not superseded on
integration/aurora70a00e583b03); commit carries human author/committer and humanSigned-off-by:only; PR body carriesAssisted-by:. - §5:
source,rust-build,kunit, and all threeDWC3/ATCjobs passed one5c3b1515d42, and the 4-Mac combined-kernel run reported 0"AFK init not sent"lines.
|
Merge readiness at
Areas: Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels. |
|
Reran the flaky |
DjDeveloperr
left a comment
There was a problem hiding this comment.
Verdict: MERGE at e5c3b1515d42
Blockers: none.
Checked: no Apple material. The diff only changes comments in drivers/soc/apple/aop.rs (no code lines), so there's no runtime change and no row is needed. All 8 CI checks are green after the toolchain-pinning flake was re-run. This replaces my earlier review.
Evidence
Follow-up for the wording (not blocking): "the send already waits on the mailbox's send-empty interrupt" is true on the IRQ path. Poll-only v8 and G17 mailboxes sleep-poll, and the atomic path busy-polls (mailbox.c:738-783). "waits for the mailbox to drain (by interrupt or by polling)" would cover all three.
Superseded by the review at e5c3b15
Problem
AopData::start_afk()(drivers/soc/apple/aop.rs:1566-1576 at 0abc2f3, from a3fab20 / #547) sends an AFK init request a second time when the first send found the mailbox full for the whole 500 ms send timeout. The comment says the firmware "can still be busy finishing its own boot". That does not match the code:start_afk()only runs afterwake()has waited for endpoint discovery and the IOP power-state acknowledgment, so the firmware has finished its boot handshake.Change
The comment now states what the code actually knows:
apple_mbox_send()), so there is no other completion to wait on;No functional change. The resend is still bounded to one and logged on every use.
Testing
make O=... drivers/soc/apple/aop.o(arm64, LLVM, release config): no warnings.Still to run
Nothing for this change. The capture that would settle the cause is described in #2344: a J616s warm boot with
apple_mbox/rtkitdyndbg, timing the IOP power ack against each endpoint start and AFK init.Hardware rows (combined test kernel, 2026-11-20)
This change was booted in a combined test kernel: integration/aurora 0abc2f3 plus the open gate-sweep drafts plus this and the related drafts (7.3.0-aurora-hk2/pwr1/hk3). It ran once on each lab Mac (M1 Pro J316s, M2 J413, J616s, Neo J700) and was compared against the production kernel on the same Mac, using the same silent row script:
M1 Pro, M2 and J616s matched production on every row, apart from the new counters and lines the drafts add. The Neo row found the old-DTB display regression that #2358's follow-up commit fixes.
This PR: Comment only. "AFK init not sent" count: 0 on all four Macs.