Repository navigation
hwmon: macsmc: offer the SoC die zone to a device tree thermal zone - #1908
Conversation
|
@DjDeveloperr out of draft, parent-first on #1532 (alias fix merged in). J815 soak: peak 99.4 °C, settles at about 99 °C with the P cluster held at 2508 MHz by the IPA governor; trips 60/100/115 °C. Please review. |
83a0fe3 to
8d5e6d5
Compare
|
Blockers: 3. The driver half is sound. When the node has
Nit: the binding text gives the sensor-1000 rule, but the driver comment calls the value "above any temperature channel index". A HW row: J815 with the trips taken from the machine: a 3-minute all-core soak with the die peak and the throttled P-cluster frequency reported, no critical trip, then 0 failed units, 0 SELinux denials and 0 new kernel errors on the default command line. Also boot J813 and J704 (same driver, no zone) with the tripless Assisted-by: LLM (Claude:Opus 5.5) |
8d5e6d5 to
8bb24d1
Compare
|
@RyanTheTide agreed on the trips.
On the nit: discovered channels have no build-time bound, so a The PR is now the binding + driver only. |
|
Re-review of 8bb24d1: Blockers: 1. Earlier points: 1 (commit trailers) resolved: both commits carry only the human Signed-off-by. 2 and 3 (the J815 zone's estimated trips, and the figures quoted in the DT comment and commit message) resolved: the DTS commit and its numbers are gone. The nit is resolved another way: since discovered channels have no build-time bound, probe now keeps the tripless zone with a warning when
HW row: J815, J813 and J704 on this head with the default command line: Assisted-by: LLM (Claude:Opus 5.5) |
8bb24d1 to
dfdafea
Compare
|
@RyanTheTide fixed in
I didn't take the helper route. It means a cross-module symbol from drm/asahi into macsmc-hwmon (or a Checks:
The rows (J815/J813/J704 with |
|
Re-review of dfdafea: no blockers. The earlier point is resolved. One thing to know: the DT-zone attempt also runs on nodes without Rows: J815, J813 and J704 on dfdafea (owed by the author), each with Assisted-by: LLM (Claude:Opus 5.5) |
There was a problem hiding this comment.
Formal §1–§6 pre-PR review at dfdafea293695de1715b45d92bf9335c48aee4d4 (against live integration/aurora 70a00e583b03): REQUEST_CHANGES.
Audit Summary (§1–§4, §6)
- Code, DT bindings & lifetimes: 0 blockers.
Documentation/devicetree/bindings/hwmon/apple,smc-hwmon.yamlcleanly documents sensor1000forapple,discover-temperaturesnodes in addition tomacsmc_soc_die.drivers/hwmon/macsmc-hwmon.c:1440-1465checkshwmon->temp.count >= MACSMC_SOC_DIE_SENSOR_ID(1000) before callingdevm_thermal_of_zone_register(), ignores-ENODEVsilently on#thermal-sensor-cellsboards without a sensor-1000 zone, and unconditionally keeps registering the named triplessmacsmc_soc_diezone sog17/thermal.rsandm3/m3_thermal.rsretain their hotspot lookup.
- §1–§4, §6 & CI: PASS — not superseded on
integration/aurora,mergeable: clean, live CI green (host-tests,dt-checks), guessed J815 trips/tuning figures removed, both commits (31d02f9c611d,dfdafea29369) carry human author/committer + humanSigned-off-by:only, PR body carriesAssisted-by:, naming clean.
Blockers (§5 Evidence)
- Missing exact-head (
dfdafea29369) hardware & regression evidence (explicitly noted as still owed in the PR body):- J815 / J813 / J704 (T8142) on
dfdafea29369(default command line): confirmmacsmc_soc_dieremains present in/sys/class/thermal/*/type, GPU governor hotspot read works, and full regression row (0 SELinux denials, 0 failed units, 0 new kernel errors). - At least one existing
#thermal-sensor-cellsboard without sensor 1000 (e.g. M2/M3/M4 Pro): confirm the-ENODEVpath leavesmacsmc_soc_dieand existing thermal zones unchanged with 0 new warnings/errors.
- J815 / J813 / J704 (T8142) on
A node with apple,discover-temperatures has no stable channel indices, so a thermal zone cannot name one of its temperature channels. Let such a node be a thermal sensor provider for one sensor, 1000: the hottest of its apple,soc-die-keys readings. A zone on it comes in addition to the driver's tripless macsmc_soc_die zone, which in-kernel users look up by name. Signed-off-by: Nick <[email protected]>
A board that discovers its SMC temperatures (apple,discover-temperatures, as the M5 Airs do) has no stable channel indices, so a device tree thermal zone cannot name one of its temperature channels, and the hottest-die zone is registered without trips. Such a board then has no thermal policy of its own. When the node is a thermal sensor provider, offer the hottest-die reading as sensor 1000, above any channel index the hwmon core registers. A zone on it gets the board's trips and cooling maps. The named macsmc_soc_die zone is still registered in every case: the asahi GPU drivers' governors (g17 and m3) read the SoC hotspot from that zone by name, and a device tree zone's name cannot be macsmc_soc_die (no '_' in a node name). Discovered channels are not bounded at build time, so a node with 1000 or more of them keeps only the named zone, with a warning. No board uses it yet: the J815 zone waits for limits the boot loader reads from the machine. Signed-off-by: Nick <[email protected]>
dfdafea to
1dfc0ff
Compare
|
Merge readiness at
Areas: Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels. |
|
@DjDeveloperr updated to J815 row at this head (in the body): Still owed: a |
DjDeveloperr
left a comment
There was a problem hiding this comment.
Code approved at 1dfc0ffa27a9. The J815 boot at this head kept the named die zone available to the GPU governor. Before merge, verify on a second generation that a thermal provider without sensor 1000 keeps its existing zones and reports no new errors.
Superseded by the review at 1dfc0ff
|
1dfc0ff J616s (T6040, M4 Pro, no sensor 1000) PASS: guarded one-shot combined batch (1c06fa69cde5 over main 8f99a85, 0 merge-tree diffs on 2 changed files, default cmdline, boot 1efdeb87-4c6d-44ed-9e5a-929ba5ed4c4f): 25 thermal zones registered with sane readings (0 errors; macsmc-battery 26.0 C, cpu-die-thermal 76.2 C, gpu0..6 41.2-44.8 C), hwmon3 macsmc_hwmon clean (0 macsmc-hwmon errors/warnings), 0 failed units, Enforcing, 0 new AVC, 0 GPU faults, 0 new kernel errors, Borealis VK api.smoke 8/8 pre/post 2/2 rtc1 s2idle, Wi-Fi 3/3 pre/post; stock 7.3.0-aurora-fleet89 restored. |
What: macsmc-hwmon can be the thermal sensor of a device tree zone on boards that discover their SMC temperatures. The hottest-die reading is sensor 1000, and the named tripless
macsmc_soc_diezone that the GPU governors read is kept in every case. No board gets a zone yet: J815 trips come later, from the machine.Tested: J815 (MacBook Air 15" M5) at
1dfc0ffa27a9:macsmc_soc_diepresent (thermal_zone0, 40 °C), GPU governor hotspot reads with 0 failures. Regression at boot: 0 SELinux denials (SELinux off), 0 failed units, 0 new kernel errors.Risk: two-way door. Thermal zone registration on macsmc boards with
#thermal-sensor-cells; a board without a zone on sensor 1000 takes the-ENODEVpath and is unchanged.Not yet: a
#thermal-sensor-cellsboard without sensor 1000 (M2/M3/M4 Pro) for the-ENODEVpath; J813/J704 rows at this head.Details
A node with
apple,discover-temperatures(the M5 Airs) has no stable channel indices, so a device tree zone can't name one of its channels.thermal.rs, m3m3_thermal.rs) find the SoC hotspot by that name, and a device tree zone can't take it (no_in a node name).No J815 zone in this PR. A guessed critical trip can shut down a healthy Mac or come too late; the PMP and SMC keep enforcing the hardware limits. A J815 zone follows once the boot loader publishes the package's limits from the machine.
Changed on this head: rebased onto
main;main's fan-assist trip on the named zone now sits next to the device tree zone. No AI attribution in the body or the commits.Evidence
J815, macOS 27.2 stub, this head merged with the other J815 PRs into one test kernel on
main2943fff. Command line: default pluspcie_aspm=offand three opt-ins that don't touch hwmon./sys/class/thermal/thermal_zone0/type=macsmc_soc_die, 40 °C at idle.