Repository navigation
hwmon: (macsmc) & t6030: guard never-valid die sensors and verify J514S SoC die keys - #3799
Conversation
|
Merge readiness at
Areas: Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels. |
There was a problem hiding this comment.
🔵 Needs a closer look
Runtime validation remains pending on J514S and J516S, leaving J516S sensor identities and read stability unconfirmed when a single failing sensor can invalidate the aggregate used for GPU throttling.
No open issues 🎉
What changed in this PR
Updates the shared T6030 SoC die-temperature sensor list using measurements from a 12-core J514S, improving the inputs used by hwmon and thermal monitoring.
Changes:
- Replaces the placeholder list with 18 keys covering efficiency cores, performance cores, and GPU/fabric sensors.
- Removes keys absent on the tested hardware and documents sensor selection, spike exclusions, and probe-time skipping of absent keys.
- Leaves thermal trips and the pressure key unchanged. J516S inherits the updated list, but hardware verification remains pending.
| File | Description |
|---|---|
arch/arm64/boot/dts/apple/t6030.dtsi |
Updates apple,soc-die-keys and documents the J514S hardware measurements supporting the selection. |
Review effort: Balanced
macsmc_hwmon_die_hottest() intentionally fails the entire macsmc_soc_die thermal zone if any registered die sensor returns a read error or falls outside [-40, 150] degrees Celsius, so runtime consumers never act on a partial or implausible view. On binned SKUs sharing a SoC-level apple,soc-die-keys list (such as 11-core / 14-core-GPU vs 12-core / 18-core-GPU T6030), SMC firmware can still register a key for a fused-off core whose read returns -EIO, NaN/Inf (-ENODATA), or an out-of-range sentinel, which would break every macsmc_soc_die read. Permanently dropping sensors at probe time is unsafe because a transient boot-time glitch (such as -ETIMEDOUT, -EAGAIN, or a brief NaN) would exclude a live sensor until reprobe or disable a single-key board's zone. Track a monotonic per-sensor die_seen latch serialized under a new per-device hwmon->die_lock mutex (covering both the OF and named macsmc_soc_die zones): - Keep probe-time admission unchanged (every present key joins the zone). - In macsmc_hwmon_die_hottest(), latch sensor->die_seen = true on the first valid in-range reading. - If a sensor that has already latched live later fails or reads outside [-40, 150] C, fail the zone read immediately as before. - If a sensor has never produced a valid reading since boot, log once and skip it while other die sensors are live (joining automatically if it later becomes valid). If no die sensor is valid, return the first error (or -ENODATA) so single-key and all-failed zones remain fail-closed. Add KUnit coverage for never-valid skipping (-EIO, -ETIMEDOUT, NaN, out-of-range), automatic recovery upon first valid read, strict failure once latched live, and single-key behavior. Signed-off-by: Marcelo Alcantara <maralc@gmail.com>
…J514S The placeholder apple,soc-die-keys list on t6030.dtsi was never checked on hardware: 8 of the 14 listed Tf keys (Tf04, Tf09, Tf0A, Tf0B, Tf0D, Tf0E, Tf2A, Tf2B) do not exist in J514S SMC firmware, and no CPU die sensors were included. Replace the placeholder list with keys empirically verified on a 12-core 14" M3 Pro (J514S, 2,422-key SMC dump plus per-core 5 s thermal sweep): - E-cluster (cpu1..6): Te05, Te0H, Te0P (+8.1 to +8.9 C) - P-cores 0..5 (middle key of each SMC triplet, +7.3 C above the first key, matching t8122/t8132): - cpu0 (0x10100): Tp0V (+28.4 C, 46.6 -> 75.0 C) - cpu7 (0x10101): Tp0b (+27.3 C, 47.6 -> 74.9 C) - cpu8 (0x10102): Tp1J (+24.3 C, 47.7 -> 72.1 C) - cpu9 (0x10103): Tp1R (+23.7 C, 47.3 -> 71.0 C) - cpu10 (0x10104): Tp0h (+26.4 C, 48.4 -> 74.8 C) - cpu11 (0x10105): Tp0n (+26.3 C, 48.7 -> 74.9 C) - Verified present GPU/fabric Tf keys: Tf14, Tf18, Tf19, Tf1A, Tf24, Tf25, Tf28, Tf29, Tf2E (excluding absent Tf0x/Tf2A/Tf2B and transient Tf1D/Tf2D keys that spiked >135 C during a 5 s single-core CPU load). On binned 11-core / 14-core-GPU SKUs, absent keys are skipped at probe, and the preceding macsmc-hwmon die_seen latch safely skips any fused-off core key that firmware still registers with -EIO, NaN, or out-of-range readings while keeping live sensors fail-closed. Signed-off-by: Marcelo Alcantara <maralc@gmail.com>
22020d4 to
8ad53c8
Compare
|
Hardware verification update on 14-inch M3 Pro (
|
DjDeveloperr
left a comment
There was a problem hiding this comment.
Looks right. The guard only relaxes a sensor that has never read valid since boot. Once a sensor has read valid, errors and out-of-range values still fail the zone. A single-key board still fails closed. The lock covers die_seen/die_warned across both zone users. With CPU keys in the T6030 list, the guard matters: a binned SKU whose SMC still lists a fused-off core's key would otherwise fail the whole zone, and m3_thermal caps the GPU without a fresh reading. The KUnit case covers the transitions.
Three hardware gates are left before merge:
- J514s at this exact head (
8ad53c83). Your 02:31 run says main plus this PR, but the kernel name doesn't show the head. Please post the head SHA withmacsmc_soc_diereadings at idle and under load and no warnings. - J516s. It shares
t6030.dtsi, so it gets the same key list. I've queued our J516s for the same check. - A second-generation row for the shared
macsmc-hwmonchange: our J773g, whose G16 thermal path readsmacsmc_soc_die. The zone should still read and the GPU thermal path should behave as on main. Queued.
|
J516s (M3 Pro,
|
|
J773g (T8132 / M4 mini) exact-head
|
Replace the unverified
Tf*placeholderapple,soc-die-keyslist ont6030.dtsiwith the 18 hardware-verified 12-core J514S CPU/fabric die sensors, preceded by a runtimemacsmc-hwmonguard protecting binned 11-core / 14-core-GPU SKUs.Commits
hwmon: (macsmc) skip never-valid SoC die sensors until first valid read(6da2a8f08011):hwmon->die_lockmutex serializingmacsmc_hwmon_die_hottest()across both OF and namedmacsmc_soc_diethermal zones.sensor->die_seen = trueon a sensor's first valid in-range (-40..150 °C) reading.TCMb, hotspot fan assist, andCONFIG_THERMAL=nsysfs channels are untouched).-EIO,NaN/Inf, or an out-of-range sentinel, or a brief boot-time glitch), logs once and skips it while other die sensors are live, joining automatically if it later reads validly.macsmc_soc_dieimmediately as before; when no die sensor is valid, returns the first error (or-ENODATA).macsmc_hwmon_test_die_never_valid_and_recovery()covering-EIO/-ETIMEDOUT/NaN/-127 °Cskipping, automatic recovery + latching, post-latch strict failure, and single-key fail-closed recovery.arm64: dts: apple: t6030: verify SoC die temperature keys on 12-core J514S(8ad53c838ca2):Tf*list (8 of 14 absent on J514S, no CPU sensors) with the 18 empirically verified J514S keys: E-clusterTe05,Te0H,Te0P; 6 P-core hotspotsTp0V,Tp0b,Tp1J,Tp1R,Tp0h,Tp0n; and 9 valid GPU/fabric keysTf14,Tf18,Tf19,Tf1A,Tf24,Tf25,Tf28,Tf29,Tf2E(excluding transient >135 °CTf1D/Tf2D).Tested: MacBook Pro 14-inch (12-core M3 Pro, j514s) at b1202-001035-53b6 (job j1202-001502-d4b3): 2,422-key SMC dump + per-core 5 s pinned thermal sweep verified all 18 keys; ARM64 Clang compile of
macsmc-hwmon.owith KUnit +CONFIG_WERROR=yclean for bothTHERMAL=yandTHERMAL=n, 26 host-replayed KUnit assertions + concurrent two-zone replay passed, andt6030-j514s.dtb/t6030-j516s.dtbDT schema checks clean with zero new diagnostics.Risk: two-way · drivers/hwmon/macsmc-hwmon die-zone aggregation and arm64 t6030
apple,soc-die-keys