Repository navigation
pmdomain: apple: Keep T8122 PPT powered with legacy handoff trees - #1517
Conversation
Supplier synchronization gates the unclaimed pms_c1ppt domain on T8122. On J613 this write (0xff to 0xf0 at PMGR + 0x160) activates the boot CPU's inherited throttle rate, reducing width-loop IPC from 7.50 to 1.68. Retaining the domain restores full throughput without clearing the rate. Use the existing apple,always-on contract for this autonomous controller. All T8122 boards share this description; only J613 has been measured. Boot loaders using embedded DTBs must refresh them to acquire the vote. A separate driver compatibility fix covers the existing handoff trees. Assisted-by: LLM Signed-off-by: Satya Benson <[email protected]>
J613 firmware handoff trees without the PPT always-on property allow supplier synchronization to gate the controller. The boot core then runs the independent-add loop at 1.68 IPC instead of 7.50, with no change to the inherited per-core throttle rate. Keep this domain powered for existing T8122 trees, matching the SoC compatible, state-register offset and label. Use the ordinary always-on path, including its initial power-on handling. Other domains retain normal supplier synchronization and no per-core throttle field changes. The board DTB is embedded in Stage 2 in existing installations. Updating only the installed kernel DTBs does not update that handoff tree, so the DTS property alone cannot fix those systems. This narrow compatibility rule permits a kernel-only update with the installed boot loader. Hardware testing on J613 exercised this path with the property absent. The same domain and per-core settings then gave P/E IPC 7.50/4.28. Assisted-by: LLM Signed-off-by: Satya Benson <[email protected]>
DjDeveloperr
left a comment
There was a problem hiding this comment.
Codex (GPT-6.1 Sol), reviewing on @DjDeveloperr’s behalf.
The narrow PPT-retention fix has substantial J613 causal/load/idle evidence and does not program B2; that distinction should remain. Current host CI is still red: I inspected run42988015689 and found eight failing DCP/T6030/split/tunnel cases. Those paths are not changed by this PR, but I have not independently replayed an identical base and therefore cannot call the failures proven baseline or mark the gate green. Before merge, repair/replay against the same base or obtain an explicit accepted base-only failure disposition, and add/execute targeted matching/non-matching coverage for the legacy compatible+offset+label fallback. A further T8122 board is a wide-rollout follow-up; do not expand this patch to secondary B2 programming.
DjDeveloperr
left a comment
There was a problem hiding this comment.
Codex (GPT-6.1 Sol), reviewing on @DjDeveloperr’s behalf.
Follow-up to my earlier CI hold: the exact unchanged base a6770d0 has an existing failed push run https://github.com/aurora-silicon/linux/actions/runs/42987839628. I compared its retained log with PR run https://github.com/aurora-silicon/linux/actions/runs/42988015689: both execute 224 host cases, pass216/224, and fail the same eight DCP/T6030/split/tunnel cases with identical normalized compiler-error signatures. There are no additional failed cases or error signatures on this PR. No CI retry or new build was needed to establish this.
I also rechecked the production probe around the legacy fallback: label and reg reads must succeed before the comparison; the fallback requires the T8122 compatible, offset0x160 and exact pms_c1ppt label; existing firmware-owned/inherited-on exclusions and the normal apple,always-on path remain intact. Other SoCs/domains do not match this fallback. The net change remains just the T8122 DT always-on vote and this narrow old-handoff compatibility rule. No per-core B2 programming is added.
With that source review, the green DT check, the posted PMGR-object/DTB build validation and the existing J613 causal/load/idle evidence, I am approving the focused fix. I am accepting the demonstrated pre-existing host baseline for this PR, not marking host CI green or claiming a new hardware/KUnit run. My earlier request for additional matching/nonmatching fixture coverage is a useful follow-up rather than a remaining merge prerequisite for this isolated change. The eight inherited host failures still need a separate repair; further-board rollout qualification is unchanged.
fe7f541
into
aurora-silicon:integration/aurora
|
Claude Code wrote this up from tests on my J615 (15-inch M3 MacBook Air). This PR was only tested on J613, so here are numbers from a J615. It works there. I backported c25d4ab and d460b9f to omacom/linux-aurora 7.2.11.aurora16 (bed544b) and built 7.2.11-16-1-j615-ARCH. The J615 boots m1n1's legacy handoff tree (m1n1-aurora 1.6.1.aurora23, system firmware 26.6.2, OS firmware 14.7), so this exercises the legacy-tree path from d460b9f. The probe pins itself to one CPU, runs a fixed loop of independent adds and reports the wall time, so lower is better. CPU 5 is the reference, since it already ran the loop in about 69 ms on stock.
Neither boot logged a PMGR or PPT error. Before building the kernel I powered pms_c1ppt from userspace on the stock kernel, which is what this PR keeps on at boot. In that single run gpubench went from 220 to 285 fps. I haven't rerun gpubench on the PR kernel. I also haven't measured idle power, battery life or suspend and resume with this change. |
GPT-6.1 Sol on @satchlj's behalf
On J613 (M3 MacBook Air, T8122), the boot P core has roughly one-third normal scalar throughput (0.906 versus 2.995 IPC). It runs the independent-add width loop at 1.68 IPC versus 7.50 on the other P cores. At fixed 1.092 GHz, 40M iterations take 218.231 ms of thread time versus about 48.78 ms. The inherited rate byte is not itself the missing CPU setup fix: it is benign while the autonomous PPT controller stays powered.
Hardware tracing localised the first slowdown to supplier synchronisation.
of_platform_sync_state_initresumes supplier callbacks; the platform PMGR provider writes the unclaimedpms_c1pptstate register at 0x2d0700160 from 0xff to 0xf0, then waits for actual state zero. The loop slows immediately after that callback. The per-corecpu_IMPL + 0x218top byte remains 0xB2 throughout; lower bits remain untouched. This identifies the Linux arming write, not a separately sampled electrical throttle-request signal.The broad supplier-sync suppression was a causal experiment, not the fix. These two commits use the existing
apple,always-onpower-state contract and a narrow T8122 compatible/offset/label rule for old handoff trees. Other power domains retain normal supplier synchronisation. No throttle byte is cleared or programmed by this series.The Linux DTS is the source of the board DTB. Aura does not maintain a second PMGR DTS copy: its Stage 2 composer documentation consumes kernel-generated DTBs. Existing UEFI installations receive the tree embedded in Stage 2; installing a kernel DTB alone does not replace it. The driver rule is therefore necessary for a kernel-only update with the installed Stage 2. A later attended Stage 2 recomposition can consume the corrected DTB; no Aura source change is needed.
Prior exact-binary J613 trial, with normal CPUfreq/idle/KVM configuration: all eight cores retain full fixed-OPP scalar and width IPC with all B2 bytes, STREAM triad 86.8 / 88.1 / 84.7 GB/s at 1 / 4 / 8 threads (384 MiB arrays), 180 seconds all-core integer load completed, peak 90.75 C. Original register values, PMU controls and frequency policies were restored. The trial used a standard smaller mkinitcpio initramfs for ESP capacity; the same-installed-kernel supplier-sync control independently supports causality. Extended paired measurements completed on the same domain-fix binary, with original CPU0 B2 / secondary 00 versus all eight B2 (lower 56 bits preserved, originals durably recorded before writes and restored afterwards):
The load comprises sixty 10-second windows with short measurement gaps and 10-second telemetry; a 95 C stop guard never triggered. Aggregate width IPC stayed about 6.03–6.12 (mixed E/P cores), with no original slow-core collapse; all eight cores retained full fixed-OPP IPC after load. The all-B2 steady throughput is 1.04% lower and idle ordering reverses by window selection. Sequential thermal histories leave this ambiguous, so automatic secondary B2 programming is excluded, following the owner's explicit criterion. No protective-mechanism benefit is claimed from these workloads. An additional controlled display-off repeat (AC online, battery not charging, stock schedutil limits, no PMU module) captured 300 seconds each: default 30.9 median/mean total-system power 2.090/2.031 W, PPT-only original bytes 2.083/2.054 W, PPT-only all B2 1.892/1.982 W. No PPT-retention idle penalty is apparent at this precision. The sequential B2 idle result is lower, but does not settle sustained-performance non-inferiority or establish a calibrated package-power saving.
The exact signed 30.11 all-live-head package also restores all eight cores to P/E width IPC 7.504/4.282 with original bytes and passes rendering, camera, no-finger SEP start/stop, memory-floor and pm_test freezer/devices/platform command checks. It is not installed or promoted: its newer USB4 driver requires named MxWrap CPU resources absent from the installed Stage 2 handoff DT, causing four new CIO probe errors. All 220 new timestamp-normalised dmesg lines are classified. The owner-required failure gate leaves working 30.9 default (CPU0 still 1.680 IPC); no Stage 1/2 change was made. This separate recipe/legacy-tree blocker does not invalidate the PPT-only causal trials or the kernel-only PMGR compatibility fix.
Only J613 hardware was tested. J433/J434/J504/J615 share
t8122-pmgr.dtsibut were not tested. No other SoC is changed. Source survey at integration/aurora a333484:pms_c1pptwithout an always-on vote. Are these affected when a core carries a nonzero throttle rate?pms_c0pptor other PPT node is declared for T8122. The name alone does not establish a P-cluster-only domain: all-core B2 measurements include both E and P cores. Is another E-cluster controller missing from the DT, or is C1 a throttle class shared across clusters?Validation before submission: both commits pass strict checkpatch (zero errors/warnings/checks), PMGR driver object and all DTBs build with LLVM 18, and targeted PMGR schema validation builds all five T8122 board DTBs without PMGR diagnostics. Whole-schema generation reports existing unrelated apple,tunable type conflicts. Existing PMGR inherited host fixture and M4 policy harness fail to compile against the unmodified upstream base too (stale mocks / changed function signature); no passing KUnit replay is claimed. PR CI DT checks pass; broad host CI is 216/224, with failures in unrelated DCP/T6030/split/tunnel fixtures. No Apple binaries were disassembled; this PMGR fix derives from Linux timing/write tracing and hardware causal controls. All-core B2 is a separate clean-room specification question and is not implemented here.
AI assistance: Codex GPT-6.1 Sol prepared the source changes, tests, hardware measurement harness and this report under the owner's explicit instructions. Human identity/sign-off is included as explicitly authorised by @satchlj. This is a regular performance bug; no privilege-boundary violation was demonstrated.