Repository navigation
thermal: of: confirm a critical trip over consecutive samples (J616s CPU zones: 3) - #908
Merged
Merged
Conversation
A critical trip acts on the first reading at or above it. Some sensors read a hot spot that follows power within a second: the SMC die maxima of the Apple M4 Pro move by 9-10 C (one standard deviation) between 1 s samples under a mixed load, so one reading can shut the system down while the die is well within its limits. Add a critical-samples property for polled zones. With it, the core acts on a critical trip only once that many updates in a row have read at or above it, once per excursion; a reading below the trip starts the count again. A sustained excursion still shuts down, after about that many polling periods. Without the property, or with 1, nothing changes. A zone that is not polled cannot count updates and keeps acting on the first reading. The counting lives in a helper in thermal_core.h, which KUnit tests cover: first-sample behaviour, a confirmed run acting once, single excursions among lower readings never acting, re-arming after a drop and counter saturation. Assisted-by: LLM Signed-off-by: Ryan Murray <[email protected]>
The CPU zones' SMC sensors move by 9-10 C between 1 s samples under a mixed load. Their critical trip is now at the ADT per-sensor maximum of 125 C, but a single reading should still not shut the machine down. Set critical-samples = <3> on the 17 CPU zones: the critical trip acts after three consecutive readings at or above 125 C, about 3 s at the 1 s polling the zones already use; the PMP's fast loop and the hardware's sochot protection stay in front of it. Assisted-by: LLM Signed-off-by: Ryan Murray <[email protected]>
RyanTheTide
marked this pull request as ready for review
November 3, 2026 16:08
RyanTheTide
added a commit
that referenced
this pull request
Nov 3, 2026
Brings in #908 (thermal_of critical-samples property and the J616s DT) so the J616s run and the merge cover the final tree. Signed-off-by: Ryan Murray <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #907 (#907). Today a critical trip acts on the first reading at or above it, so one noisy sample can shut the machine down. The J616s SMC die maxima move by 9-10 C between 1 s samples under a mixed load.
Changes
critical-samplesfor polled zones.thermal_core.h, covered by KUnit (CONFIG_THERMAL_CRITICAL_SAMPLES_KUNIT_TEST, 5 cases).polling-delaywhen it's set.critical-samples = <3>on the 17 CPU zones, so critical (125 C) acts after about 3 s at or above it.Tested
thermal_critical_samples5/5 pass (kunit.py, arm64, qemu).critical-samplesproperties.7.3.0-aurora-thermcrit1(fleet15 tree + arm64: dts: apple: t604x-j614-j616: leave fast thermal control to the PMP, critical at the ADT limit #907 + this PR, fleet15 recipe and config) and Stage 2 ec7e1217 with this PR's DTB. For the sustained test only, that DTB also had a test-onlycritical-action = "reboot"on cpu-e0-thermal, which is not part of this PR./proc/device-tree/.../critical-samples= 3, and the zones read 75/115, hot 120, critical 125.[2067.232] thermal thermal_zone2: cpu-e0-thermal: critical temperature reached, thenHARDWARE PROTECTION reboot.stage program failed after RUN, error -110). The same stall shows on stock fleet15 boots, so I re-ran that boot.🤖 Generated with Claude Code