Repository navigation
Conversation
7ace568 to
2c4f04c
Compare
|
Heads-up: this stack (#1798, #1799, #1800) now conflicts with integration/aurora in Could you refresh #1797 onto the current integration/aurora and rebase the three on it? When resolving, please keep those two commits' interrupt-driven receive path as it is. We'll review the listed commits once the stack is mergeable again. |
2c4f04c to
f620497
Compare
|
Rebased onto the refreshed #1797 (ceade2e, on integration/aurora 292773f). The branch is now f620497 (was 2c4f04c) and merges cleanly again.
The testing lines in the description are updated: |
f620497 to
b15543e
Compare
|
Rebased onto the refreshed #1797 (d87e41e, on integration/aurora 514ae1f). The branch is now b15543e (was f620497) and merges cleanly again. With #1797 and the three J873g PRs, at 514ae1f: |
b15543e to
7f45db9
Compare
|
Rebased onto the refreshed #1797 (bbfdefa, on integration/aurora 0abc2f3). The branch is now 7f45db9 (was b15543e) and merges cleanly again. Booted on the M6 with the rebased stack: both policies come up with 20 and 7 states, and the 125 thermal zones register. Merged with #2178 into one tree, |
|
In apple_mbox_probe() (mailbox.c), a provider with rx_poll_required is refused unless the machine is apple,j873g and its reg equals the hard-coded hw->j873_window. The match data already says the provider is polled. Where the window sits is the device tree's job, so any other board with this mailbox fails to probe for no hardware reason. Keep the size check on the resource and drop the machine and fixed-address checks. Until then this should stay a draft. |
7f45db9 to
d9642e6
Compare
|
@RyanTheTide right. That check came from the stale aurora-wip base this branch was still on, not from this PR's three commits. #1797 already removed it ( I rebased the three commits onto #1797's head. The head is now Checks: |
|
I added a fourth commit, The J873g had no cpu-map. Without one, The rows are in the description. In short: Chromium Maps drag 50.6 → 52.7 fps, Firefox unchanged, no new CHECK_DTBS or W=1 warnings. The PR stays a draft on #1797. Assisted-by: LLM (Claude:Opus 5.5) |
|
Re-read at 0be2395.
Before this leaves draft: the branch carries bbfdefa, "Merge aurora-wip 210c8f6 into integration/aurora 0abc2f3 for the J873g". Against today's integration/aurora it brings in about 90 commits that aren't part of this PR (T8152 bring-up, J813 audio, aurora-wip sync merges). Many may already be in the tree as cherry-picks (the net diff is 28 files, +3907/-52), but merged as is they all enter integration/aurora's history, and whatever isn't already there lands with no review in this PR. Please rebase so the PR holds only its own commits, and split anything the J873g needs from aurora-wip into its own PR(s) so each can be reviewed. Assisted-by: LLM (Claude:Opus 5.5) |
0be2395 to
67242cc
Compare
|
@RyanTheTide rebased as you asked. The PR now holds only its own four commits, on integration/aurora
Checks on the new head:
A J873g boot of exactly this head is still to come. The M6 is in use right now. The description says which rows are from its desktop kernel, which has these same commits on #1797. Assisted-by: LLM (Claude:Opus 5.5) |
|
Thanks, 67242cc is what I asked for: four commits on the current tip, the aurora-wip merge gone. Two points on the commits themselves, both about thermal safety now that the series stands on its own:
Assisted-by: LLM (Claude:Opus 5.5) |
67242cc to
545caba
Compare
|
@RyanTheTide both points. 1. The ceiling now follows the tree. Head
2. There is a source in the machine, and I'll derive the trips from it. The J873g ADT's PMP node ( So the 75 C passive trip on every channel goes. Instead, as on the J614c:
That changes how the M6 runs under sustained load, so I'll measure it before I push: all-core load, fan at the SMC's own control, hottest die reading and clocks over time. The J873g is in use right now, so that row comes later. Until then the thermal commit stays as it is and the PR stays a draft. Assisted-by: LLM (Claude:Opus 5.5) |
|
Both answers are what I hoped for. 6545f87 keeps the cap and the thermal-policy requirement on every T8152 and lifts them only for a policy whose CPU node a thermal zone's cooling map names, so a tree without zones still refuses the higher states. Taking the trips from the ADT's PMP Assisted-by: LLM (Claude:Opus 5.5) |
a4baf34 to
527b924
Compare
|
@RyanTheTide the die-trip commit is up. The new head is Fifth commit: "take the CPU die trips from the ADT".
The sustained-load row I promised. All 12 CPUs ran
I've updated the description and marked the PR ready for review. Assisted-by: LLM (Claude:Opus 5.5) |
|
Thanks, 527b924 is what I asked for: zones only on the 30 CPU die channels, passive at the ADT target (110 °C) and critical at the ADT maximum (125 °C), the other channels left in hwmon without a made-up limit, and the 75 °C policy gone. The sustained-load table makes the case well: the dies settle around 90 °C under all-core load with the passive trip never engaging, and throughput goes up 42 % against the old policy. Holding the fan at its minimum costs work, not safety. Together with the tree-scoped cpufreq cap from 545caba, this is fine from our side. Assisted-by: LLM (Claude:Opus 5.5) |
527b924 to
2682fad
Compare
|
Rebased onto Resolution (in "SMC temperature sensors and CPU thermal zones"):
Checks:
Assisted-by: LLM (Claude:Opus 5.5) |
DjDeveloperr
left a comment
There was a problem hiding this comment.
Formal §1–§6 pre-PR checklist review at 2682fad382e8212081c24c8c03a6c6f84b1062ab.
Checklist Summary
- §1 No model gating: PASS — driver logic uses SoC match data (
soc_t8152_info) and DT topology rather than board/chip/firmware string checks. - §2 Production-ready, no hacks: BLOCKER — sustained-load thermal tests were run with
macsmc_hwmon fan_control=1+ manualfan1_targetrather than the default kernel command line (see Blocker 3). - §3 Safety: FAIL (blocking) —
apple_soc_cpufreq_zone_cooled()fails open on static DT presence instead of active runtime cooling ownership, and Commit 1 introduces hardcoded 75 °C non-ADT trips before Commit 5 removes them (see Blockers 1 & 2). - §4 Clean-room and attribution: PASS — all 5 commits (
c86577053a3b..2682fad382e8) carry human author/committer (Thomas Glanzmann) and humanSigned-off-by:only with zero AI commit trailers; PR body includesAssisted-by:. - §5 Evidence: FAIL (blocking) — CI (
dt-checks,host-tests) is green (2/2) and all 30smc-te*/smc-tp*sensor indices (66..74,95..115) int8152-j873-thermal.dtsimatch&m6_smc_hwmonchild order exactly, but the exact rebased head2682fad382e8has not been booted on J873g and no default-cmdline regression row is posted (see Blocker 3). - §6 Naming: PASS — no Honeykrisp/hk/Asahi/m1n1 regressions.
Actionable Blockers
-
§3 Safety —
apple_soc_cpufreq_zone_cooled()fails open on static DT text (drivers/cpufreq/apple-soc-cpufreq.c):- Unlike T8132 (
needs_thermal_owner, which holdsFREQ_QOS_MAXatmax_unmanaged_pstateuntil the thermal driver actually binds at runtime and callsapple_soc_cpufreq_set_thermal_owner(policy, true)) and T8140 (needs_thermal_policy, which holdsfd->fallbackuntil a live PMP sample confirms thermal control is active),apple_soc_cpufreq_zone_cooled()permanently lifts BOTHmax_unmanaged_pstateANDneeds_thermal_policysolely because a static/thermal-zones/*/cooling-maps/*DT node referencespolicy->cpu. - If
CONFIG_THERMALorCONFIG_CPU_THERMALis disabled, or ifmacsmc-hwmon(CONFIG_SENSORS_MACSMC) is not built, fails to probe, or is unloaded,apple-soc-cpufreqstill unlocks all 20 P-states up to 4788 MHz with zero active kernel thermal throttling. - Additionally,
apple_soc_cpufreq_cpu_cooled()only checks whethercooling-devicematchespolicy->cpu— it does not verifyIS_ENABLED(CONFIG_CPU_THERMAL), that the referenced trip is a passive trip, or that a live thermal zone and cooling device actually bound to the policy. - Please make T8152 fail closed until active thermal cooling is actually bound at runtime (for example, reusing the existing
needs_thermal_owner/apple_soc_cpufreq_set_thermal_owner()runtime handoff from the thermal/hwmon side, or verifying live bound passive cooling before releasingunmanaged_cap).
- Unlike T8132 (
-
§3 History hygiene — Squash Commit 5 (
2682fad382e8) into Commit 1 (c86577053a3b):- Commit 1 adds 125 thermal zones with hardcoded 75 °C passive trips explicitly described as a fixed bring-up policy rather than an ADT limit (§3 forbids hardcoded safety thresholds), and Commit 5 deletes 95 of those zones and replaces the remaining 30 with the ADT's 110 °C passive / 125 °C critical limits.
- Please squash Commit 5 into Commit 1 (before adding the higher OPPs and lifting the ceiling) so no commit in
integration/aurorahistory carries hardcoded 75 °C non-ADT safety trips.
-
§2 / §5 Evidence — Exact-head default-cmdline boot and regression row on J873g:
- Neither Commit 5's exact DTB (
smc-tp0g-2-thermal) nor the rebased head2682fad382e8has been booted on J873g yet (as noted in the PR body). - The sustained-load thermal table was collected with
macsmc_hwmon fan_control=1/ manualfan1_targetrather than the default kernel command line. - Please boot the final head SHA on the J873g on the default kernel command line (without
fan_control=1), confirm all 30 zones + cpufreq cooling devices bind and sustained load stays safe under automatic SMC fan behaviour, and include the §5 regression row (0 SELinux denials,0 failed units,0 new kernel errors).
- Neither Commit 5's exact DTB (
Non-blocking note
- The PR description repeats the same 3-bullet
cpu_capacity/ single-thread loops / Google Maps block twice underM6 rows.
Assisted-by: LLM (Gemini 4 Neon)
Describe the 125 SMC temperature channels that read back stable values on the J873g. The SMC hwmon node becomes an indexed thermal sensor provider instead of discovering its temperature keys, so that thermal zones can refer to the channels, and the CPU nodes become cooling devices. Give the SMC's CPU die channels a thermal zone each: Te* for the E cluster and Tp* for the P/M cluster, 30 in all. The J873g ADT's PMP temp-sensor table gives every CPU die sensor a 110 C target and a 125 C maximum, the same two values the M4 Max (J614c/J616c) die zone takes from its ADT. Each zone has a passive trip at the target, which throttles both clusters through cpufreq cooling, and a critical trip at the maximum. The other 95 channels stay reported through hwmon without a zone, since the ADT gives them no limit. The SMC's fan policy is no limit either: in its automatic mode it leaves the fan at its 1000 RPM minimum even at 93 C under sustained full load. The sensor list is that of Acelogic's J873 bring-up on linux-aurora j873. Signed-off-by: Thomas Glanzmann <thomas@glanzmann.de>
The J873g exposes only the two lowest performance states per cluster until its cooling is described. With the SMC thermal zones in place, add the rest: E up to 2940 MHz (voltage-states1-sram) and P/M up to 4788 MHz (voltage-states5-sram), as the ADT pmgr lists them. opp-level is the hardware P-state, the table index plus two (the ADT's cpu-perf-state0-index), as for the two existing states. Signed-off-by: Thomas Glanzmann <thomas@glanzmann.de>
T8152 keeps the ceiling at its two lowest P-states because no thermal policy had been provided for it, as commit 4c3405d ("cpufreq: apple: retain the unmanaged P-state ceiling on T8152") put it. Its needs_thermal_policy, without a PMP fast die-temperature loop (apple,fast-die-effort, not available on T8152), also holds each cluster at the fallback limit, a third of its top state: 1440 MHz on the P/M cluster even with only two states. The J873g DT now supplies a thermal policy: SMC thermal zones with passive trips that throttle both clusters through cpufreq cooling. Let a T8152 board DT qualify the higher states that way. With the new zone_cooling_qualifies, a cluster whose cpufreq cooling device (the node of policy->cpu) is named in a cooling map of a thermal zone is no longer held to max_unmanaged_pstate, and needs_thermal_policy no longer asks it for a fast die-temperature limit. Any other T8152 tree keeps both: a board runs the higher states only once its own DT throttles them. WFxT, which the transition polling would otherwise execute, is already treated as absent on T8152. Signed-off-by: Thomas Glanzmann <thomas@glanzmann.de>
The J873g's CPUs had no cpu-map and no capacity-dmips-mhz. The arch topology code parses capacity-dmips-mhz only while walking a cpu-map, so every CPU got capacity 1024 and cluster_id -1. The scheduler then treats the six E cores like the P and M cores: on the M6 desktop, the busiest threads of a browser dragging Google Maps run 65-77 % of their time on E cores. Describe the three clusters (E: cpu@0-5, P: cpu@10100-10101, M: cpu@40102-40105, as their MPIDR affinities group them) and give each core type its single-thread work per MHz relative to a P core. The values are the mean of three single-thread loops run at each cluster's top P-state with the performance governor (Python integer loop, zlib compression, sort/JSON). Relative to a P core at 4788 MHz, M cores manage 80 % at the same clock, and E cores 48 % at 2940 MHz, which is 78 % per MHz: E 800, P 1024, M 819 With these, cpu_capacity reads E 491, P 1024, M 819, and the clusters show as 0, 1 and 2. Signed-off-by: Thomas Glanzmann <thomas@glanzmann.de>
2682fad to
1d2c710
Compare
|
@DjDeveloperr thanks. One point is done here, one needs a decision, and one needs an M6 boot. 2. History: done. The ADT-trip commit is squashed into the first one; the head is
1. Fail closed until cooling is bound at runtime. Agreed that DT presence alone shouldn't release the higher states. Here is the shape I'd use:
@RyanTheTide this moves the lift out of what you reviewed in 545caba and 527b924, so a quick yes from you on the shape too, before I write it? 3. Exact-head row on the J873g, default command line, without Assisted-by: LLM (Claude:Opus 5.5) |
Four commits on integration/aurora
b10280c04c2d. This is no longer stacked on #1797: the J873g's DT and the T8152 cpufreq support it needs are in integration/aurora now.Upstream, the J873g (Mac mini M6, T8152) runs both clusters at their two lowest P-states: T8152 keeps the unmanaged ceiling "until cooling is qualified", in Ryan's words in 4c3405d. With
needs_thermal_policyand no PMP fast die-temperature loop, the P/M cluster also sits at the fallback limit of 1440 MHz. As a result, a CPU-bound shell loop takes 6.3 s on a P core here, against 1.9 s on the same machine with all states.This supplies the missing thermal policy the way T8140 got one, with thermal zones and cpufreq cooling:
temp-sensortable gives every CPU die sensor a 110 C target and a 125 C maximum: each zone has a passive trip at 110 C, which throttles both clusters, and a critical trip at 125 C. The other 95 channels stay in hwmon without a zone, since the ADT gives them no limit. (Before 11-24 this was a 75 C trip on all 125 channels, replaced by a fifth commit; the two are squashed now, so no commit carries the 75 C trips.)max_unmanaged_pstateandneeds_thermal_policy, and a new per-SoC flag (zone_cooling_qualifies) lets a board DT lift both: a cluster whose cpufreq cooling device (the node ofpolicy->cpu) is named in a thermal zone's cooling map runs every state in its table. Any other T8152 tree keeps the ceiling, so the safety net follows the tree instead of the SoC. WFxT is already treated as absent on T8152, so the transition polling is safe.Testing
1d2c710dc94c(11-24) squashes the ADT-trip commit into the first one; its tree is identical to the previous head2682fad382e8. The J873g DTB builds at the first commit alone with W=1 (the tip's 8 GPU reserved-memory unit-name warnings).On this head (integration/aurora
24dc422773c9plus these five commits):apple/t8152-j873g.dtbanddrivers/cpufreq/apple-soc-cpufreq.obuild with W=1 and no warnings (arm64, LLVM 22).scripts/dtc/apple-dt-check.sh 24dc422773c9 <head>(first four commits), and545caba57ce0 527b92465345for the ADT trips: 0 new and 0 removed CHECK_DTBS warnings over all 138 Apple DTBs. The DART power-domain check finds 0 new DARTs without one, and ADT coverage is unchanged.tools/asahi/run-host-tests.py: 458 of 459. The one failure, thepmp-floor-testsmutantclass-twice, fails the same way on the base and is untouched by this PR.Thermal policy (the zones of the first commit), M6 desktop kernel
All 12 CPUs ran
stress-ng --cpu 12 --cpu-method matrixprodfor 180 s, with the performance governor, sampled every 10 s from t = 10 s:M6 rows (macOS 27.2 stub, Linux at EL2; these commits plus #1797 are the M6's default kernel)
Both policies come up with schedutil over 20 (P/M) and 7 (E) states. P reaches 4788 MHz and E 2940 MHz. All 125 zones and both cpufreq cooling devices register. The shell loop takes 1.92 s on a P core.
2 minutes of load on all 12 CPUs, sampled every 20 s:
20 s after the load ends, the hottest sensor is back at 46 C. The fan was driven by the M6's userspace fan controller (fan1_target via
macsmc_hwmon fan_control=1); without it the passive trips throttle harder.At the 292773f base (2026-11-14, booted through aura's kboot): both policies again come up with 20 and 7 states, up to 4788 and 2940 MHz, and the SMC zones register with their cooling devices.
At the 0abc2f3 base (2026-11-18, booted from the ESP with the rebased stack): both policies come up with 20 and 7 states, and the 125 thermal zones register.
Clusters and capacities (fourth commit, the same properties added to the M6's boot DTB):
cpu_capacityreads E 491, P 1024, M 819, andcluster_id0/1/2. Before, every core read 1024 and -1.make CHECK_DTBS=y apple/t8152-j873g.dtb: the same 3 existing schema warnings as before (GPU and its mailboxes), none new. W=1 adds nothing.scripts/dtc/apple-dt-check.shagainst integration/aurora 0abc2f3, with Merge aurora-wip 210c8f6e into integration/aurora (J873g NVMe, 10GbE, power off, USB2, audio) #1797 and the stacked J873g PRs: 0 new CHECK_DTBS warnings (8 fewer), and all 21 changed bindings pass dt_binding_check.tools/asahi/run-host-tests.pypasses 427/427 (with Merge aurora-wip 210c8f6e into integration/aurora (J873g NVMe, 10GbE, power off, USB2, audio) #1797 and the stacked J873g PRs, on 0abc2f3). checkpatch--strictreports only false positives on the DT syntax.cc @Acelogic @RyanTheTide @DjDeveloperr @LiamRay10
Assisted-by: LLM (Claude:Opus 5.5)