Repository navigation
arm64: dts: apple: t6050-j716c: start the PMP - #3651
Conversation
A board DT can leave a PMP's apple,board-id and apple,dram-vendor-id to the boot loader, which fills them in from the running machine. Without them the PMP never starts, and the PMC and the PMP report should not wait for it. Add apple,pmp-voter to the PMC, the voter agent of the PMP it names in apple,pmp, so that the PMC can leave that agent out of its static voters when the PMP was not handed over. Let a PMP report name such a PMP in apple,pmp. Signed-off-by: Erik Bourget <[email protected]>
…over A board DT can leave the PMP's apple,board-id and apple,dram-vendor-id to the boot loader, which fills them in from the running machine. Under a boot loader that does not, the PMP driver fails its probe for good, and a PMC that names that PMP in apple,pmp defers forever: its CLPC child, and cpufreq with it, never probes. When the PMC also gives the PMP's voter agent (apple,pmp-voter), wait for the PMP only when it is available and has both values. When it does not, say so once, skip the device link and leave that agent out of the static voters, so the PMC and CLPC run as on a board without a PMP. A PMC without apple,pmp-voter waits for its PMP as before. Signed-off-by: Erik Bourget <[email protected]>
…d over A PMP report whose PMP is not running yet keeps the devices' requests to itself and polls until the PMP runs, every 100 ms at first and then once a second. A PMP whose board values (apple,board-id and apple,dram-vendor-id) the boot loader did not fill in never starts, so that poll never ends. When the report names an enabled PMP in apple,pmp and that PMP lacks the values, say so once and do not start the poll. The report still binds and keeps its requests, as it does while it waits. Reports that name no PMP, or a disabled one, wait as before. Signed-off-by: Erik Bourget <[email protected]>
Enable pmp0, its DART and mailbox, the PMP report and the PMP's power domains on J716c. Name the PMP in the PMC (apple,pmp, with its voter agent in apple,pmp-voter and among the static voters) and in the PMP report. Leave apple,board-id, apple,dram-vendor-id, apple,pmc, apple,pmc-pmgr and apple,tunable-* to the boot loader, which fills them in from the running machine, so no tunables are compiled in. This starts the PMP, hands it the PMP report's requests and lets it vote on the DCS and SoC rails through the PMC. Under a boot loader that does not fill in the PMP's values, the PMC and the report run without it. Signed-off-by: Erik Bourget <[email protected]>
|
Merge readiness at
Areas: Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels. |
There was a problem hiding this comment.
Verdict: HOLD at 2a439a39
Blockers:
- Stacked on unmerged
linux#3650(base=fix/apple-pmc-unhanded-pmp). FullDevice tree checks/ build / KUnit workflows have not executed againstmainyet; wait for#3650to merge, retarget ontomain, and verify CI passes green.
Checked:
- Diff (
arch/arm64/boot/dts/apple/t6050-j716c.dts,+44/-0),MERGEABLEagainstfix/apple-pmc-unhanded-pmp; carries no static PMP values (loader fills inapple,board-id/apple,dram-vendor-id/apple,pmc*/apple,tunable-*) and backed by J716c exact-head hardware testing at2a439a39eecc.
Evidence
- Strictly awaiting parent
#3650landing andDevice tree checks/ build CI onmain.
There was a problem hiding this comment.
Verdict: MERGE at 2a439a39eecc
Converts this App's earlier review at the same head to an approval under the 12-01 merge bar (better than before and doesn't break; block only on a shown failure). No code blocker was found in it. The merge gate (a row on one Mac at this head + fast CI) is tracked by pr-readiness, not held here.
Checked: - Diff (arch/arm64/boot/dts/apple/t6050-j716c.dts, +44/-0), MERGEABLE against fix/apple-pmc-unhanded-pmp; carries no static PMP values (loader fills in apple,board-id/apple,dram-vendor-id/apple,pmc*/apple,tunable-*) and backed by J716c exact-head hardware testing at 2a439a39eecc.
Follow-ups (not blocking): Merge parent #3650 first; follow-ups: retarget, DT/build CI on main
|
Merging at |
What: Start the PMP on the J716c: enable
pmp0, its DART and mailbox, the PMP report and their power domains, and name the PMP in the PMC (with its voter agent among the static voters) and in the report. The DT carries no PMP values: the boot loader fills inapple,board-id,apple,dram-vendor-id,apple,pmc,apple,pmc-pmgrandapple,tunable-*from the running machine (aura #506). On main the J716c PMP is off, so the devices' PMP requests and the PMP's DCS and SoC rail votes are missing. Stacked on #3650, which keeps the PMC, cpufreq and the report sane under a loader that does not hand the PMP over.Tested: J716c (16-inch M5 Max) at
2a439a39eecc(rows built at5b7c45fcd7fb, which differs only in a header's SPDX line and a DT comment), trial DTB withoutt6050-media.dtsi(main hangs the J716c at boot with it, #3618; nothing else differs). With the current loader: the PMP binds and starts, the report hands it its requests (PMP running (status 0x1), requests 0x1000047000), PMC static agents0xb(PMP, CLPC, AP) on the DCS and SoC rails, cpufreq on all three clusters. With a loader that does not fill in the PMP values: the PMP fails its probe as expected, the PMC and cpufreq run without it and the report does not poll. s2idle suspend and resume (18 min, key wake): the report still runs and the PMC agents are unchanged. Default command line; kernel errors are the default kernel's set plus, once the PMP runs, an occasional refused PMP endpoint-7 message that kernels starting the PMP already show (Evidence); failed units the same as the default kernel (no SELinux on this distribution).make CHECK_DTBS=y apple/t6050-j716c.dtb: the same 6 messages as main, none new.Risk: two-way door · J716c only (one DTB).
Not yet:
apple,sram-keep) now comes from the loader: kboot: T6050: hand the PMP's sleep SRAM range over from the ADT aura#582, which on this Mac hands over<0x56000 0x9b000>with this PR. A deep sleep itself currently resets the J716c a few seconds in, with the PMP on and with it off (main's DT, same kernel and loader), so the resume cannot be checked until that is fixed.Details
pmp0with its ADT node and fills every value from the live machine.voter-agent), added to the existing CLPC (1) and AP (3) static voters, and given asapple,pmp-voterso that the PMC runs without it when the PMP was not handed over (pmdomain: apple: run the PMC and PMP report without a PMP the boot loader did not hand over #3650).Evidence
J716c (16-inch M5 Max), system and OS firmware 27.2, kernel 7.3.0-ewb391+ = main
de965eb5b26b+ #3650 + this commit, built at5b7c45fcd7fb(the heads now,292954d133ceand2a439a39eecc, differ only inpmp-handoff.h's SPDX line and a DT comment). One-shot trial boots under a watchdog dead-man, default command line. Trial DTB:t6050-j716c.dtsat5b7c45fcd7fbwith#include "t6050-media.dtsi"left out (main hangs the J716c at boot with it, #3618); nothing else differs.PMP started0xb(PMP, CLPC, AP) on DCS and SoCPMP running (status 0x1), requests 0x1000047000apple-cpufreqproperty 'apple,dram-vendor-id' is missing, probe-220xa(CLPC, AP),... was not handed over; running without its votes... was not handed over; not waiting for it,running: 0apple-cpufreqKernel err-level messages on the hand-off boot: the same set as on the default kernel (
7.3.0-ewb342+): thesystemd-gpt-auto-generatorpair andaurora ... gpu: M5 bare-metal bootstrap failed at session: EPROBE_DEFER. The no-hand-off boot adds only the twoapple_pmpprobe lines above. Failed units on both:aurora-peripherals.service, which fails the same way on the default kernel. No SELinux on this distribution.drivers/pmdomain/apple/.kunitconfig.apple-pmp+CONFIG_APPLE_PMC_KUNIT_TEST): 31/31,apple-pmc17/17.make dt_binding_check DT_SCHEMA_FILES=power/apple,pmc.yamland=power/apple,t8140-pmp-report.yaml: 0 messages.systemctl suspend, 18 min asleep, woken by a key press (an RTC alarm did not wake the J716c from s2idle on main in our earlier runs). After the resume the report readsrunning: 1and the PMC agents are still0xb.make CHECK_DTBS=y apple/t6050-j716c.dtb: 6 messages (opp-table-gpu-afr,opp-table-gpu-csnames and opps,pcie@1c50000000andpcie@1c60000000port0), the same 6 as mainde965eb5b26b.apple_pmp ...: RTKit: refused auxiliary buffer request(rate-limited, err level): 1 at the s2idle resume here, and 6 to 14 per boot on the J716c kernels that already start the PMP (7.3.0-ewb342+and later). The PMP keeps running after them.