Skip to content

thermal: apple-pmp: fix J773g thermal zone registration - #1865

Merged
DjDeveloperr merged 1 commit into
aurora-silicon:integration/aurorafrom
techmore:techmore/j773g-pmp-thermal-topology-20261113-v3
Nov 14, 2026
Merged

DjDeveloperr merged 1 commit into
aurora-silicon:integration/aurorafrom
techmore:techmore/j773g-pmp-thermal-topology-20261113-v3

Conversation

@techmore

Copy link
Copy Markdown
Contributor

Summary

The T8132 PMP thermal policy uses J713's logical CPU masks for every T8132 machine. J773g has the same four-P/six-E cluster sizes with different logical numbering, so the exact related_cpus check in apple_pmp_add_cluster() returns -EINVAL and no thermal zone is registered. Without the zone, cpufreq keeps its bootstrap frequency cap.

This commit selects P CPUs 0,3,4,5 and E CPUs 1,2,6,7,8,9 when the machine is apple,j773g. Other T8132 machines keep the existing masks.

The masks are the live J773g cpufreq policies: policy0 related_cpus is 0 3 4 5 and policy1 is 1 2 6 7 8 9.

Fixes: names 7953e28, which enabled this thermal path on J773g.

Testing

Hardware: M4 Mac mini (J773g), macOS firmware 26.6.2.

Without the fix With the fix
P-core maximum 1.800 GHz 4.104 GHz
E-core maximum 1.860 GHz 2.892 GHz
7-Zip 26.04, one P core 4,342 MIPS 8,460 MIPS
Thermal zone none apple-pmp-die

Five minutes at all-core load: both clusters held 4.104/2.892 GHz, the die temperature rose from 52.5 °C to a sampled peak of 79.25 °C, and the journal had no thermal, GPU, watchdog, panic or oops messages.

Tested tree: integration/aurora at 6882c13 plus our J773g branches and #1718, with a patch byte-identical to this commit. That is a combined tree, so the table is an end-to-end result, not a one-variable benchmark. What this patch itself changes was observed directly: the -EINVAL is gone and the zone registers.

Not tested: this exact head on current integration/aurora has not been booted. J713 was not tested; its masks are unchanged.

Dependencies

None. One commit, drivers/thermal/apple-pmp-thermal.c only. Independent of #1191 and #1718.

The T8132 thermal policy currently describes J713's four P-core and six
E-core policies unconditionally. J773g exposes the same cluster sizes with
different logical CPU numbers: P cores 0,3,4,5 and E cores 1,2,6,7,8,9.
The exact related_cpus check therefore rejects J773g with -EINVAL before
registering its thermal zone.

Select the J773g masks from the machine compatible while retaining the
existing J713 masks for other T8132 systems.

The live J773g cpufreq policies report related_cpus as "0 3 4 5" and
"1 2 6 7 8 9". Before the fix, setup returned -EINVAL, no thermal zone
registered, and the policies remained at 1.800/1.860 GHz. With the fix,
apple-pmp-die and power telemetry registered, P/E reached 4.104/2.892 GHz,
pinned 7-Zip 26.04 measured 8,460 MIPS, and a five-minute all-core load
peaked at 79.25 degrees C without kernel errors.

Fixes: 7953e28 ("soc: apple: t8132: take the PMP bridge and thermal path on the qualified boards")
Signed-off-by: Sean Dolbec <sdolbec1@gmail.com>
@techmore
techmore force-pushed the techmore/j773g-pmp-thermal-topology-20261113-v3 branch from d86050a to 9c71c29 Compare November 14, 2026 01:09
@techmore

Copy link
Copy Markdown
Contributor Author

Hardware test, Mac mini M4 (J773g), 2026-11-14: PASS at this PR's head 9c71c29fbf70.

Kernel: aurora-silicon/linux integration/aurora 5d112b1d5493 plus the exact heads of #1192 36383187, #1718 5fbbff26, #1191 (first five commits) 3fa83613, #1865 9c71c29f, #1702 0430675d, #1703 9b0ca002 and #1872 2eb84498, merged without conflicts (release 7.3.0-prheads+, native arm64 build with GCC 15.2.0, 0 warnings). One boot on a Mac mini M4 (J773g, T8132) with a Fedora 44 userspace. The device tree came from the boot chain, not from this tree, so DT-only changes were not exercised.

Check Result Evidence
CPUs online PASS nproc = 10
Max frequency at boot PASS scaling_max_freq policy0 4104000 kHz, policy1 2892000 kHz (same as cpuinfo_max_freq)
Thermal zone and cooling devices PASS thermal_zone0 type apple-pmp-die, policy step_wise; cpufreq-cpu0 (max state 19), cpufreq-cpu1 (7), aurora-g16g (8)
Kernel errors PASS 0 BUG, Oops, WARNING, SError or call-trace lines

Observed behaviour under 60 s of load (one busy loop pinned to each of the 10 CPUs, sampled every 5 s):

  • die temperature 55.75 °C idle, 86.25 °C at 5 s, peak 99.25 °C at 50 s;
  • policy0 4.104 GHz at 5 s, capped to 3.624 GHz from 10 s (one 3.300 GHz sample at 35 s), 2.352 GHz at 55 s, 1.512 GHz at 60 s;
  • policy1 stayed at 2.892 GHz except one 2.496 GHz sample at 50 s;
  • the governor acted at the 106 °C policy point (apple-pmp-thermal: decision … mc=106000 … reason=governor, also reason=prediction); highest governor-channel reading 106.5 °C; no hard-limit decision during the load and no reading at or above 120 °C;
  • 5 s after the load: policy0 max back to 3.624 GHz, die 75.5 °C.

At probe the driver logged 10 apple-pmp-thermal: sensor error -5; CPU minimum caps retained lines (0.457 to 0.502 s) and one power telemetry error -11 at 0.95 s; valid readings followed.

Not covered: load longer than 60 s, and GPU-only load against the aurora-g16g cooling device.

@DjDeveloperr DjDeveloperr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Reviewed. The masks match the J773g's cpufreq policies (P 0,3-5; E 1-2,6-9). The CPU arguments to apple_pmp_add_cluster() (0 for P, 1 for E) still name a CPU of the right cluster there. Every other T8132 machine keeps J713's masks, and apart from that only the log text changes. The 5-minute all-core run peaked well below the 106 °C cooling trip.

host-tests is green on this head. Base drift doesn't touch apple-pmp-thermal.c. Approving and merging.

@DjDeveloperr
DjDeveloperr merged commit 2015108 into aurora-silicon:integration/aurora Nov 14, 2026
1 check passed
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