Skip to content

t6050: map the PMP's fast-die effort on every board - #2355

Draft
RyanTheTide wants to merge 3 commits into
integration/aurorafrom
sweep/thermal-dt
Draft

RyanTheTide wants to merge 3 commits into
integration/aurorafrom
sweep/thermal-dt

Conversation

@RyanTheTide

Copy link
Copy Markdown
Contributor

Problem

The PMP's fast die-temperature effort is mapped to the T6050 CPU clusters in t6050-j714s.dts only (c0a5202, lines 468-486 before this change; t6050-base.dtsi said "Other boards are not qualified yet"). The lanes and their order (the ADT's fast-die-ctrl-ce-map: MACC0, MACC1, PACC_ANE) belong to the SoC, and on every T6050 the firmware leaves the throttling to the OS. The K116s runs the PMP but has no mapping, so its clusters stay at their top state while the effort sits at its maximum. Each further board would need its own copy.

The mapping could not simply move to a shared file: apple-soc-cpufreq holds a cluster at its fallback limit for good when its property points at a report that the board leaves disabled, and 8 of the 11 T6050 boards leave pmp0_report disabled.

Change

  • cpufreq: apple-soc: a disabled report node is treated like a missing property where the limit is optional (needs_thermal_policy unset, as on T6050): the board does not run the PMP, so there is no effort to follow. T8140 and T8152, which require the limit, still fail closed. An enabled report whose PMP never reports running still holds the fallback limit.
  • dt-bindings: the description says what a disabled report means.
  • t6050-peripherals.dtsi: the three apple,fast-die-effort properties, next to pmp0_report, for every T6050 board. Removed from t6050-j714s.dts. Die 1's clusters on the J775D have no lane in pmp0's three-lane range and stay unmapped.

The selector is now the report's status (whether the board runs the PMP), not a board list. This also covers the K116s change proposed in #2211 and supersedes #2211; its K116s measurements confirm the same lanes on that board.

Testing

  • DT before/after on all 18 T6040/T6041/T6050 boards (cpp + dtc, decompiled with -s, phandle numbers ignored):
    • J714s: identical.
    • The other 10 T6050 boards: exactly 3 added lines, apple,fast-die-effort = <&pmp0_report N> on cpufreq_mc0/mc1/pc.
    • T6040/T6041 boards: not touched by this PR.
  • Where the limit becomes active (both pmp0 and pmp0_report are okay): J714s (unchanged), J714c, K116s. The other 8 (J716c, J716s, J775c, J775D, J873s, K114c, K114s, K116c) leave the report disabled, so the driver applies no limit, as before.
  • drivers/cpufreq/apple-soc-cpufreq.o builds with W=1 and adds no warnings (release config, LLVM).

Still to run

  • J714s, J714c, K116s: hardware rows pending (no T6050 in the lab). On a K116s, the expected result is what arm64: dts: apple: t6050-k116s: enforce the PMP's fast die-temperature effort #2211 measured: lane 2 effort drops from 248-255 to about 45-66 under openssl speed -multi 18. On a J714s nothing should change.
  • T6040 (J616s), T8140 (J700), T6000, T8112: no DT change. The driver change does not affect them: their reports are enabled, or the SoC has no mapping. Hardware rows pending: dmesg | grep -i fast-die should be empty, as before.
Why every T6050 board is safe
  • The limit only lowers scaling_max_freq (a FREQ_QOS_MAX request). It never raises a clock.
  • Boards with the report enabled get what the J714s has had since c0a5202: the fallback limit until the PMP reports running, then the effort.
  • Boards with the report disabled return from apple_fast_die_init() before allocating anything, exactly as when the property is absent. The CPU hotplug state is registered whenever any node has the property. Its callbacks do nothing for a cluster without a limit.
Other SoCs checked for the same gap
  • T6041 (J575c, J614c, J616c) and T6040: already mapped once in t604x.dtsi.
  • T8140: already mapped once in t8140.dtsi.
  • T8132: pmp-report has no fast-die offset ("No qualified fast-die effort on this generation"). There is nothing to map without the ADT's ptd-range for that entry.
  • T8142 and T8152: the PMP runs a fast-die loop (J813 fast-die-ctrl-* tunables), but there is no pmp-report support for these SoCs. Mapping needs the report entry first.

Credit: the mapping, the lane order and the J714s measurement are Diljit Singh's (c0a5202). The K116s measurements are from #2211.

Assisted-by: LLM (Claude:Opus 5.5)

…report

apple,fast-die-effort names a lane of the PMP report. Say what a report
node that the board leaves disabled means: the board does not run the
PMP, and where the limit is optional for the SoC no limit applies. This
lets a SoC's dtsi describe the lanes once for every board.

Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
apple,fast-die-effort points a cluster at a lane of the PMP report. On
SoCs where the limit is optional (no needs_thermal_policy, e.g. T6050),
a cluster without the property runs without the limit, but a cluster
whose property points at a report that the board leaves disabled is
held at the fallback limit for good: the report never probes, so no
sample ever finds the PMP running.

That forced the lanes into each board file that runs the PMP, although
the lanes are the SoC's. Treat a disabled report like a missing
property where the limit is optional: the board does not run the PMP,
so there is no effort to follow. The SoC's dtsi can then describe the
lanes once. SoCs that require the limit (T8140, T8152) still fail
closed, and an enabled report that never reports running still holds
the fallback limit.

Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
The PMP's FAST-DIE-CE range and the order of its lanes (the ADT's
fast-die-ctrl-ce-map: MACC0, MACC1, PACC_ANE) belong to the T6050, not
to a board, and the firmware leaves the throttling to the OS on every
T6050. The mapping was in t6050-j714s.dts only, so the K116s, which
also runs the PMP, kept its clusters at their top state while the
effort sat at its maximum, and every other board would need its own
copy once it runs the PMP.

Move the three apple,fast-die-effort properties next to pmp0_report in
t6050-peripherals.dtsi, which every T6050 board includes. The limit
follows the report: J714s, J714c and K116s enable it and get the limit;
the boards that leave it disabled get none, as before (previous
commit). Die 1's clusters on the J775D have no lane in pmp0's range and
stay unmapped.

This also covers the K116s change proposed in #2211, which measured the
same lanes on a K116s.

Fixes: c0a5202 ("arm64: dts: apple: t6050-j714s: Enforce the PMP's fast-die effort")
Suggested-by: Diljit Singh <hey@djdev.me>
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
@axboe

axboe commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

Ryan, this covers what #2211 does for the K116s, and in the better place. Once this is out of draft I will close #2211 in its favor.

The K116s numbers from #2211, for the record here. The mapping is the same three lanes, so they should carry over. Firmware 27.2, four minutes of openssl speed -multi 18 -evp aes-256-gcm:

No mapping Mapped
Effort, lane 2 (0 to 255) 248 to 255 45 to 66
TCMb 110 °C 108 °C
Throughput, sustained 81 to 85 GB/s 111 to 115 GB/s

Lanes 0 and 1 read 0 in both runs.

Two notes:

@axboe

axboe commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

Tested on the K116s (firmware 27.2): this PR's three commits (head 39c504a) on integration/aurora 0abc2f3 plus my K116s series, in place of #2211's commit. Same load as above, balanced profile, one run:

This PR #2211
Effort, lane 2 (0 to 255) 54, then 65 to 66 45 to 66
TCMb 108 °C 108 °C
Throughput, sustained 107.5 to 114 GB/s 111 to 115 GB/s
Fans 3900 rpm 3900 rpm

The P cluster's scaling_max_freq moves between 3180 and 3432 MHz with the effort, so the limit is applied from t6050-peripherals.dtsi. The boot has no new warning. I take the throughput as the same within run-to-run variation.

The K116s enables pmp0_report, so the disabled-report path in apple-soc-cpufreq did not run here.

@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Looks good; approve once the J714c and disabled-report rows have run.

The selector is now a property of the machine: the report node's status. That replaces a per-board copy, and I checked it:

  • drivers/cpufreq/apple-soc-cpufreq.c:1187-1192 reads args.np only when parsed == 0, and drops the reference. SoCs with needs_thermal_policy still fall through to the fail-closed path (:1243-1248).
  • An available report that never shows the PMP running still holds fd->fallback.
  • Only J714s, J714c and K116s enable pmp0_report, and each also enables pmp0, pmp0_mbox and pmp0_dart. No board has the report on with the PMP off, which would leave the clusters at the fallback for good.
  • The K116s row above (54 then 65-66 effort, scaling_max_freq 3180-3432 MHz, no new warning) is on this head.
  • The three commits carry only a human Signed-off-by.

Two boards change behaviour and neither has run:

  1. arch/arm64/boot/dts/apple/t6050-j714c.dts:286-298: the J714c gets the limit for the first time, and its PMP description is "as read on a J716c" (:287, :290). If that PMP does not come up, apple_fast_die_init() holds all three clusters at fd->fallback, a third of top-state power (:1235), until reboot. Nothing warns, because the "PMP running" sample never arrives. Before this PR the J714c ran without the limit.
  2. The disabled-report return at :1187 has run on no board. The K116s enables the report, as the row says. Because every T6050 now has the property, of_find_node_with_property() (:1651) also registers the CPU hotplug state on the 8 disabled-report boards.

HW row: on this head, both with 0 AVC, 0 failed units and no new kernel errors.

  • J714c: scaling_max_freq on all three clusters leaves the fallback and reaches the top state at idle within the first minute after boot (this is what shows the PMP running), and under openssl speed -multi 18 lane 2's effort and the P cluster's limit move as on the K116s.
  • One disabled-report board (J716c, K114c or K116c): scaling_max_freq is the top state on every cluster at boot, it stays there through openssl speed -multi 18, and there is no invalid apple,fast-die-effort line. CPU offline/online of one core per cluster, with no new warning.

Assisted-by: LLM (Claude:Opus 5.5)

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