Skip to content

arm64: dts: apple: t600x: always provide the pmp alias - #329

Closed
joshuaswarren wants to merge 1 commit into
omacom:integration/aurorafrom
joshuaswarren:w86/t600x-pmp-alias
Closed

joshuaswarren wants to merge 1 commit into
omacom:integration/aurorafrom
joshuaswarren:w86/t600x-pmp-alias

Conversation

@joshuaswarren

Copy link
Copy Markdown

pmp = &pmp; in t600x-common.dtsi is inside #ifdef APPLE_USE_PMP, so a normal DTB build has no /aliases/pmp. A loader that finds the PMP node through that alias gets FDT_ERR_NOTFOUND and cannot apply calibration, although the pmp@28e700000 node exists in every t600x build.

This moves the alias out of the ifdef. The node keeps status = "disabled", so nothing changes unless the loader enables it. The ifdef still controls the report-node power domains.

Measured on t6001-j316c.dts, built before and after with the in-tree dtc:

  • The only difference in the decoded DTS is pmp = "/soc/pmp@28e700000";.
  • The DTB grows from 112189 to 112225 bytes.
  • The pmp node stays disabled.

On a 16-inch M1 Max, a boot image that differed from the original only by this alias took the 24-layer ANE prefix from 438.75 ms to 289.45 ms (1.52x), with a bit-exact output hash.

This does not touch t602x or t8112, which carry the same ifdef. I measured only t6001.

@scottjones scottjones left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this. We built all six t600x DTBs before and after with W=1. The alias resolves on every board (on t6002-j375d it points at /soc@200000000/pmp@28e700000). We see no new dtc warnings, and checkpatch is clean. j314s already had the alias, so its DTB does not change.

Our concern is the claim that nothing changes unless the loader enables the node. m1n1 does enable it. dt_set_pmp() in src/kboot.c looks the node up through the pmp alias, copies the board id, DRAM values and tunables, and then sets status = "okay" with no other condition. That is also what the m1n1-aurora package ships (omacom/m1n1 bc79acc). So with this patch, every t600x board booted by m1n1 gets a running PMP: j316s, j314c, j316c, j375c and j375d. CONFIG_APPLE_PMP is on by default, and pmgr-misc treats an available PMP node as PMP owning the fabric, so it turns off the idle fabric governor and changes the s2idle path. We think the 1.52x ANE result in the description comes from this. It is the PMP running, not just calibration being applied.

ec1ce6e enabled PMP on j314s only, and said the other t600x boards keep PMP off until they are qualified, mainly for s2idle resume. This patch turns PMP on for all of them anyway, while APPLE_USE_PMP stays off, so the report-node power domains for DCP, ISP and the rest are not wired up on those boards.

If the aim is PMP on the 16-inch M1 Max, we would rather see #define APPLE_USE_PMP in t6001-j316c.dts, the way j314s does it, with the s2idle and idle power checks from that commit repeated on j316c. If the aim really is calibration without enabling PMP, m1n1 would have to stop setting status = "okay", and that is an m1n1 change, not a DT change. Either way the commit message should say what happens at boot.

This also bears on #334. Its vote only does anything when PMP is running and pmp_report.agx_vote=1 is set, and it is limited to t6001. No t6001 board enables PMP today, so on integration/aurora #334 builds without this patch but changes nothing at runtime without it or an equivalent board opt-in. The pmp_report node is not behind the ifdef, so this patch alone is enough for #334 to work.

Before any version of this lands, we'd like sleep/resume and idle power checked on real boards. Marcelo has an M1 Pro: if it's the 16-inch (j316s), it's one of the boards this changes, and a before/after on it would help. We don't know of an Ultra to test on yet.

@joshuaswarren

Copy link
Copy Markdown
Author

Scott, thanks, that reading is right and the description was wrong on my side: the 1.52x is PMP running (the fabric governor moves to the PMP), not DT calibration. v2 is pushed (two commits): the alias move is reverted, and t6001-j316c.dts gets #define APPLE_USE_PMP, the same pattern j314s uses. Every other t600x board keeps PMP off until qualified; t602x and t8112 are untouched, and the commit message now says what happens at boot.

On the 16-inch M1 Max itself: this board has been running our ANE measurement lanes with PMP enabled for weeks; the enablement comes from our boot stack, not this DT change. Measured on the running system now: the pmp node is status okay, apple-pmp-report is bound, and the configured sleep state is s2idle, under sustained ANE and GPU load daily.

The s2idle suspend/resume cycle and the awake idle-power comparison on this board I will run in an admitted maintenance window and post the numbers here (the board runs measurement jobs daily, so the window is scheduled, not ad hoc). One note on the idle-power number: our bench unit is powered through a dock and has no battery input meter, so if the qualification needs the watt numbers the way the j314s measurement took them (battery input), say so and we will put the board on a metered input for the run.

On #334: understood, nothing to change on my side.

Let m1n1 enable the Power Management Processor on the 16-inch MacBook
Pro (M1 Max), the way j314s does it with #define APPLE_USE_PMP. This
scopes the enablement to one board: the pmp alias stays inside the
ifdef, so every other t600x board keeps PMP off until it is qualified,
and t602x and t8112 are untouched.

Corrects the record from my earlier alias patch: with PMP running on
this board, a boot that enabled it took the 24-layer ANE prefix from
438.75 ms to 289.45 ms (1.52x) with a bit-exact output hash. That gain
is the PMP running (fabric governance moves to the PMP), not DT
calibration. On the same board PMP has stayed enabled under sustained
ANE and GPU measurement lanes (pmp node okay, apple-pmp-report bound,
s2idle configured); the s2idle suspend/resume and idle-power numbers
for this board will be posted on the pull request.

Signed-off-by: Joshua Warren <[email protected]>
@joshuaswarren

Copy link
Copy Markdown
Author

s2idle result on the 16-inch M1 Max (PMP enabled, the board's usual state on our measurement kernel), and it is a FAILED RESUME. Before the cycle: kernel 7.1.12-2-20261103.6-lab-ARCH, /sys/power/mem_sleep [s2idle], the pmp node status = "okay", machine up 5609 s. Then echo mem > /sys/power/state: the machine never came back. SSH to it timed out within 20 s and stayed dead for the whole 209 s window, so there are no after-reads: no post-resume PMP state, no post-resume GPU check. Recovery took a VDM reset from the peer machine; it came back on the default entry (the older kernel), not the one that suspended.

So the enablement as written does not qualify on this board: with #define APPLE_USE_PMP style enablement active (via our overlay in this test, same runtime state the define produces: PMP owning the fabric), s2idle suspend hangs T6001. That matches the concern in the review, not the j314s result: j314s resumes because pmgr-misc leaves both fabric and DCS to the PMP there; our kernel's pmgr-misc path is the older one that lowers only the fabric, which is the variant the j314s commit says woke 10 of 10 only after the change.

I am holding this PR, not asking for review, until I can repeat the cycle with the pmgr-misc sleep path that the j314s commit describes (fabric only, no host DCS writes). Two questions for the maintainers: (1) is that pmgr-misc change a prerequisite for any t600x PMP enablement in your view, and (2) if so, should this dts change ride behind it in the same series rather than alone? The idle-power numbers are still unmeasured on this board (no battery-input meter on the bench unit); I will report them when the resume path works.

@joshuaswarren

Copy link
Copy Markdown
Author

Note

🤖 GPT-6.1 Terra responding on behalf of Joshua Warren

The current head limits PMP enablement to t6001-j316c. The reported suspend/resume failure and the idle-power comparison remain open. The passing CI checks do not cover those hardware results.

@joshuaswarren

Copy link
Copy Markdown
Author

[Joshua's agent] Correction to my s2idle comment of 2026-11-03 20:04, and the next step.

The failed resume ran on our lab kernel 7.1.12-2-20261103.6-lab-ARCH. Two strings that the pmgr-misc driver on integration/aurora prints, PMP manages fabric and DCS p-states and idle fabric, are missing from the vmlinuz of that lab package. So the lab kernel predates the pmgr-misc commits 9bc6d61, 8c302b5 and 604a84d, and its sleep path lowers every device, DCS included. The comment in apple_pmgr_misc_suspend_noirq() on integration/aurora describes exactly that case: "Lowering DCS under PMP leaves s2idle unable to resume".

That answers my two questions to you. The pmgr-misc change is already on this PR's base, so this dts change does not need to ride behind another patch. The failed resume does not show a problem with this head. It shows the old sleep path.

What is still missing is a result for this head on a kernel with the fabric-only sleep path. Next: boot the 16-inch M1 Max with the t6001-j316c.dtb built from this PR's head on a kernel built from integration/aurora, run 10 s2idle cycles, and post the resume count here. The idle-power comparison needs a metered input and follows after the resume result.

The PR stays held until those numbers are posted.

@joshuaswarren

Copy link
Copy Markdown
Author

Since your change request the branch was rewritten: the alias move is reverted and the only change on top of the base is t6001-j316c.dts gaining #define APPLE_USE_PMP, the same definition t6000-j314s.dts already carries. Evidence at the current head (94cbeb2), base 66c68a2, arm64 defconfig, make W=1 dtbs on both:

  • Both builds exit 0 and produce all six t600x DTBs: t6000-j314s, t6000-j316s, t6001-j314c, t6001-j316c, t6001-j375c, t6002-j375d.
  • Normalized dtc warnings: 2380 lines on base and head, zero diff. No new warnings.
  • Five of the six DTBs are byte-identical between base and head (md5), j314s included - its DTB does not change, as you noted.
  • In the j316c DTB the delta is: pmp = "/soc/pmp@28e700000" added to /aliases (on j314s this entry is pre-existing), and the display, ISP and AVD power-domains repointed to the pmp_report_* domains. The pmp node itself stays status = "disabled" in both DTBs, same as j314s; enablement happens through the loader's dt_set_pmp() following the alias, which matches your m1n1 reading. Nothing else differs beyond phandle renumbering.
  • The other four boards gain no pmp alias, same as base.
  • checkpatch on the single commit: "no obvious style problems and is ready for submission."

Your request was written against the v1 alias move that v2 reverted, so could you re-review at 94cbeb2, or dismiss the review from 2026-11-03 if the revert covers it. The open hardware item from my 2026-11-05 comment stands: the 10 s2idle cycles on this head with a kernel built from integration/aurora have not run yet, so that result is still owed.

@joshuaswarren

Copy link
Copy Markdown
Author

Moved off this repo per Joshua: continued as aurora-silicon/linux#2164 (DRAFT, head joshuaswarren/linux w86/t600x-pmp-alias @80f93d5, w73 GREEN at exact head). Closing here with pointer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants