Repository navigation
soc: apple: rtkit: take OSLOG counter echo from the DT - #3742
RyanTheTide wants to merge 4 commits into
Conversation
The OSLOG counter echo (and the matching no-ACK policy once a driver turns the echo off) was keyed on the machine compatibles apple,t8140 and apple,t8142. Read a per-coprocessor boolean apple,oslog-echo instead: the firmware counts its log writes and holds the next counter until the last one is echoed. Add the property to every RTKit coprocessor node of the T8140 (J700) and T8142 (J704, J813, J815) device trees: PMP, SMC, MTP, ANS, GPU, DCP, DCPEXT, AOP, SIO and the J813 USB4 ACIOs. Update the OSLOG host tests to model the property instead of the machine name. For every in-tree DTB each RTKit device's initial echo and no-ACK policy are the same as before. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
The RTKit library reads apple,oslog-echo from the coprocessor's own node. Document it in each binding of a node that carries it (SIO, AGX, MTP helper, ANS, PMP, SMC, AOP, USB4 ACIO, DCP). Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
apple,t8152-aop.yaml: keep main's accel, gyro and devmotion6 services next to apple,oslog-echo. t8142-j813-usb4.dtsi: main moved the J813 routers into t8142-usb4.dtsi; take main's file, the property follows in the next commit. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
…SB4 routers Main added the T8142 SIO coprocessor and moved the J813 USB4 routers into t8142-usb4.dtsi after this series listed every T8140/T8142 RTKit node. Without the property they would lose the OSLog counter echo they get today from the machine check. With these two, every RTKit node (mboxes) in the J700, J704, J813 and J815 DTBs carries it; the SEP is not an RTKit client. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
|
Updated to 798c2cd, merged with main f02bd68. In apple,t8152-aop.yaml, main's accel/gyro/devmotion6 services sit next to apple,oslog-echo. Main moved the J813 routers into t8142-usb4.dtsi and added the T8142 SIO, so a follow-up commit puts apple,oslog-echo on those three nodes; without it they would have lost the echo they get today from the machine check. Check: in the J700, J704, J813 and J815 DTBs every node with |
|
Merge readiness at
Areas: Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels. |
|
Hardware row at exact head
How: one combined test kernel for eight PRs, not this PR alone. Kernel |
There was a problem hiding this comment.
Verdict: FINISH at 798c2cd
Failure: drivers/soc/apple/rtkit.c now initializes the counted OSLog path solely from apple,oslog-echo. Older deployed Stage 2 devicetrees can omit that property while running a firmware that expects the echo. In a GCC and Clang replay of the exact initialization and receive path, a counter before the OS has a log buffer is echoed on the parent policy and dropped on this head with the property absent. The same candidate echoes it once the property is included. The existing MTP sleep failure described in the PR makes that a compatibility regression. Publish the property through the loader before removing the kernel's existing fallback for deployed trees, then verify this transition with both devicetrees.
Checked: 859 exact host counter, channel and session controls passed. The later Neo trial used a devicetree carrying the property, so it covers the updated-tree arm of this comparison.
What: RTKit no longer checks the machine compatibles
apple,t8140/apple,t8142(rtkit.capple_rtkit_oslog_unanswered()and theoslog_echoinit). A per-coprocessor booleanapple,oslog-echonow says that the firmware counts its OSLog writes and waits for each counter's echo. It sets the initial echo and the no-ACK policy once a driver turns the echo off (the G17 GPU). The property is added to all 26 RTKit coprocessor node definitions of T8140 J700 and T8142 J704/J813/J815 (PMP, SMC, MTP, ANS, GPU, DCP, DCPEXT, AOP, SIO, J813 USB4 ACIOs) and documented in the 10 bindings of those nodes. The rtkit-oslog and apple-dcp host tests now model the property instead of the machine name. Audit gate: #2445, section 3 MED.Tested: at 3c4e97f: the
W=1build of rtkit.o is clean. Host tests rtkit-oslog (base plus 5 mutations, 6/6) and the apple-dcp selftest pass. CI'sscripts/dtc/apple-dt-check.sh(base aurora/main vs head) finds 0 new CHECK_DTBS warnings, and the 10 bindings pass dt_binding_check. The DT check below finds 0 differences across 997 mailbox-client nodes in 141 DTBs.Risk: one-way door until the Stage 2 DTBs carry the property. The live DT on the Neo is its Stage 2 DTB, and a read-only check on 12-01 found no
apple,oslog-echoon any coprocessor node (smc, mtp, pmp, gpu, aop, nvme). With this kernel on the current Stage 2, the Neo and the M5 Airs would stop echoing OSLog counters. That is the old behaviour where the MTP and SMC wedge after a few sleeps and the J815 MTP asserts. Affected: T8140 J700 (Neo), T8142 J704/J813/J815.Not yet: no Neo row. It needs this kernel plus a Neo Stage 2 DTB trial with the property. The Neo is the J713's recovery host, and a failed Neo Stage 2 trial can strand it without someone at the power button, so I did not run it. T8142 rows are owed by their owners. Please hold the merge until the Neo and M5 Stage 2 DTBs carry
apple,oslog-echo.DT equivalence proof (fdt per compiled dtb)
Script
proof_rtkit.py(pylibfdt), old dtbs = aurora/main b2cd21f, new = head. RTKit devices = nodes withmboxes/apple,secure-mbox(apple_rtkit_init*() takes the mailbox from the device's own node), minusapple,sep(sep.rs does not use RTKit). Old bit = root compatible has apple,t8140 or apple,t8142. New bit = the node hasapple,oslog-echo. Any node with the property and no mailbox counts as a difference.All other mailbox-client nodes in the remaining 137 DTBs are old=False new=False.