Repository navigation
soc: apple: rtkit: take OSLOG counter echo from the DT - #3742
Draft
RyanTheTide wants to merge 2 commits into
Draft
RyanTheTide wants to merge 2 commits into
RyanTheTide wants to merge 2 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>
This branch has not been deployed
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.
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.