Skip to content

thermal: apple-pmp: ride out long dark spans while the SoC is idle - #2730

Open
RyanTheTide wants to merge 12 commits into
djdev/t8132-pmp-272from
j713/pmp-idle-dark-hold-v2
Open

RyanTheTide wants to merge 12 commits into
djdev/t8132-pmp-272from
j713/pmp-idle-dark-hold-v2

Conversation

@RyanTheTide

@RyanTheTide RyanTheTide commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

This is the idle dark-span hold for the M4 Air (J713) on the macOS 27.2 firmware. It is three commits (the hold, plus two review follow-ups), stacked on #2533 (head d3a8923), which no longer carries it. It replaces #2720, whose base was rewritten.

With #2533 alone, an idle J713 stays on the minimum CPU caps. Its sensors go dark much longer than the 2 s hold, so every long span returns -61 and brings the caps back. The hardware row is in #2533 (comment): 462 -61 in 150 s, and cpu0 delivered 903 MHz.

The commit holds the last cool reading for up to 30 s, but only while the SMC's measured P+E+GPU rails, read within the last 1.5 s, total under 500 mW. The 2 s hold and every other limit stay as they were. The long hold applies only where #2533's rail budget is active (no SMC fan, i.e. the fanless Airs), and only from a reading under 84 C. That limit is derived from the 106 C cooling trip minus the largest rises we measured during a 30 s idle hold (3.25 C) and during a 2 s load step (18.75 C); see the third commit. Macs with a fan keep the 2 s hold alone.

The first two commits (identical diff) are in the J713's default kernel today: 0 -61, caps 4464000/2892000, and the clocks reach every OPP. It also passed fanless all-core soaks of 10 and 30 min and 75+ warm reboots.

Numbers and method

Assisted-by: LLM (Claude:Opus 5.5)

DjDeveloperr and others added 10 commits November 21, 2026 10:47
The T8132 thermal driver restricts the CPU clusters and the G16 GPU
through a shared budget on the measured CPU and GPU rails: 8 W sustained,
a 600 J burst, and a slow climb toward a die temperature target. That is
the fanless MacBook Airs' policy, and fan-cooled T8132 machines (Mac mini
J773g, MacBook Pro J604, iMac J623/J624) currently inherit it too.

On the M4 Mac mini (J773g), under gpubench render.heavy fill at 1080p,
macOS 27.2 (26B123) holds its GPU at the top state (1578 MHz) at 100%
active with 8.1-9.6 W of GPU power for the whole run. On Linux the
fanless budget switched the same load between S10 and S9 every one to two
seconds at a 58-61 C die, and earlier runs sat at S8.

Decide whether to apply the shared rail power budget from the device tree
rather than a board check: disable it when an available apple,smc-hwmon
node describes one or more available fan-* children, and keep it on
fanless machines. On fan-cooled Macs the rails are still read and
reported through hwmon, but restrict nothing; die protection (cooling
from 106 C), the thermal governor and critical shutdown are unchanged. A
missing or slow SMC rail reading no longer restricts anything on
fan-cooled boards either: the GPU's level is published before the read.

Signed-off-by: Diljit Singh <hey@djdev.me>
The T8132 PMP telemetry reads six die temperature records at fixed SRAM
offsets (0x68624..0x68958, stride 0xa4) observed on the 26.6.2 (25G83)
firmware. On 27.2 (26B123), runtime SRAM scans find the same six named
records 0x1140 bytes later (0x69764..0x69a98, same 0xa4 stride), while
the RTKit header word at 0x234 (matching ADT segment-ranges) moves from
0x3c000 to 0x3d000.

Each record starts with its NUL-terminated name. After registering, run
a freezable delayed worker that checks apple_pmp_telemetry_online()
(including the ASC run bit) before touching SRAM: try the 25G83 offsets
first, and otherwise scan from the offset read at header word 0x234 for
each record name. A candidate must have a validity word of 0 or 1; a
name found more than once is taken only in step with a unique first
record at the 0xa4 stride, or refused. Until the records are found, and
if they never are, reads behave as before. The firmware populates the
records after it starts, so the worker retries every second for a minute
and logs the offsets it settles on.

The host selftest covers moved records, implausible and duplicate copies,
ambiguity and range bounds.

Signed-off-by: Diljit Singh <hey@djdev.me>
Over a system sleep Linux keeps and restores the T8132 PMP's second
ADT segment in SRAM: 0x3c000..0xa4000 (0x68000 bytes) on 26.6.2 (25G83).
On 27.2 (26B123), ADT segment-ranges and the RTKit header word at 0x234
place that segment at 0x3d000..0xa5000 (still 0x68000 bytes). Keeping
the fixed 0x3c000 range would overwrite the preceding 4 KiB page on wake
and drop the final 4 KiB page of the segment.

Prefer the DT apple,sram-keep property (offset and size supplied by the
boot loader from ADT segment-ranges) whenever it is present. When
apple,sram-keep is absent on T8132, take the offset from header word
0x234 with the 0x68000 fallback size, refusing any offset that is not
4 KiB-aligned or falls outside SRAM.

Signed-off-by: Diljit Singh <hey@djdev.me>
…ing it

Some firmware reports in by itself once its CPU runs and then
acknowledges IOP power on by itself. The T8132 PMP image of macOS 27.2
does: on the M4 Mac mini (J773g), about 0.13 ms after it reports in.
After that it answers no IOP power request, so a wake, which clears the
acknowledgment and asks again, waits for nothing:

  apple_pmp 380500000.pmp: RTKit: IOP power acknowledgment failed: -62

macOS 27.2 sends that firmware no IOP power request at all: once it has
started the endpoints, the firmware acknowledges IOP power on, and macOS
sets the AP on. Other firmware waits to be asked.

Add apple_rtkit_boot_or_wake(). It gives the firmware a bounded time to
report in (its endpoint map, and CoreAnalytics where the ops need it)
and again to acknowledge IOP power on. If both happen, it finishes the
boot without a request, as apple_rtkit_boot() does. Otherwise it asks as
apple_rtkit_wake() does. A firmware that does not report in by itself
therefore gets the request no later than the given time after its CPU
starts. Add its Rust wrapper, RtKit::boot_or_wake().

Signed-off-by: Diljit Singh <hey@djdev.me>
…start

The PMP's start wakes the firmware: it asks for IOP power and waits for
the acknowledgment. The T8132 PMP image of macOS 27.2 acknowledges IOP
power on by itself once it has reported in, and answers no request
after that, so on the M4 Mac mini (J773g) on 27.2 the start fails:

  apple_pmp 380500000.pmp: RTKit: IOP power acknowledgment failed: -62

macOS sends that image no IOP power request. Start the PMP with
apple_rtkit_boot_or_wake(): take the firmware's own acknowledgment if it
comes, and ask as before if it doesn't. The choice follows what the
firmware does, not the OS firmware's version. On 27.2 the J773g's whole
RTKit start takes 1.3 ms from its CPU starting, so the firmware gets
20 ms for each step.

Signed-off-by: Diljit Singh <hey@djdev.me>
…d length

The PMP firmware sends UPDATE_IOREG (endpoint 0x20, type 0x36) for some
of the registry entries it registered, naming each by its own index,
and waits for CONFIRM_IOREG (0x37) before it publishes their reports.
The driver confirms with a zero value.

On the M4 Mac mini (J773g) on macOS 27.2, the PMP image updates four
entries at its start (indices 0x17c, 0x17f, 0x182 and 0x18a). macOS
answers each with CONFIRM_IOREG 8 (A2I 0x0037000000000008, hv22/hv23
traces). 8 is the length the firmware registered for those entries; the
index is word 0x48 of each entry's REGISTER_IOREG buffer.

Keep the firmware's index with each registered entry, and answer an
update with that entry's registered length. An index that names no
registered entry, which macOS never sees, keeps the old zero, with a
warning.

Signed-off-by: Diljit Singh <hey@djdev.me>
A system sleep keeps the T8132 PMP firmware's data segment, at the
offset the image's own RTKit header gives (word 0x234). The check that
the header names a page-aligned segment inside the SRAM ran only when a
sleep began, so a firmware image that doesn't describe itself that way
ran until its first sleep, which then failed.

Check it at probe, and refuse such an image there with a message. The
driver then runs only a T8132 image that describes its own layout, and
the M4 PMP pieces can rely on that instead of on the OS firmware's
version. An offset of 0 is refused too.

Signed-off-by: Diljit Singh <hey@djdev.me>
…tible

The M4 PMP session's pieces — its power-vote bridge, its telemetry and
thermal policy, and the PMP report's readiness — previously ran only on
the Airs and on macOS 26.6.2 firmware because apple_t8132_firmware_path()
compares the boot loader's os-fw-version with "26.6.2". On the M4 Mac
mini (J773g) on macOS 27.2 there is then no thermal zone, no telemetry,
and no vote bridge, so the G16 driver's apple_pmp_j713_gpu_prepare()
refuses the PMP session and the GPU cannot come up.

None of these pieces depends on the OS firmware's version or the root
SoC compatible any more. Each takes what it needs from the PMP firmware
itself:
- the data segment from the image's header, which the PMP driver now
  checks at probe;
- the temperature records by name;
- the IOP power handshake the firmware starts;
- each registry entry's length as the firmware registered it.
The vote bridge still checks its soc-device record in the firmware's
tunables.

Key each piece on the PMP node's own compatible ("apple,t8132-pmp-v2")
rather than the OS firmware version gate or a root SoC compatible check:
- pmp-report.c checks supplier->of_node directly (dropping the unused
  apple_t8132_firmware_path stubs from the t6030-pmp host test harnesses);
- apple-pmp-thermal.c checks sensors->dev->of_node;
- pmp-display.h and pmp-telemetry.c check for an available
  apple,t8132-pmp-v2 node.

apple_t8132_firmware_path() stays for the display, DART, and other paths
that this series does not touch.

Signed-off-by: Diljit Singh <hey@djdev.me>
…ode compatible

t8132_platform_handoff() previously returned early unless the boot
loader reported macOS 26.6.2 firmware or the Mac was an Air. On other
firmware, macOS 27.2 among them, it applied neither of its two parts:
- The PMGR ownership policy. Without it Linux owns every power domain in
  the board tree, with auto-PM written to each one at probe, including
  domains that stay firmware-owned (AIC, GPIO, display) or out of
  Linux's reach. On the M4 Mac mini (J773g) on 27.2 that ends in an
  SError when the PCIe controller probes.
- The memory nodes (MCC, PMC and CLPC) for a loader tree that lacks
  them. They depend on the PMP path, which now self-describes from the
  firmware image header.

Key the handoff on the presence of an "apple,t8132-pmp-v2" node rather
than the root SoC compatible or OS firmware version string, and reuse
that node reference when populating the missing platform nodes.

Signed-off-by: Diljit Singh <hey@djdev.me>
On the 27.2 firmware a cool, idle J713 keeps all six PMP sensors invalid
far longer than the 2 s hold sized from 26.6.2 (0.46 s worst case there):
sampled at the driver's own 100 ms, 86% of samples were all-dark and the
longest span was 13.3 s. Each span past 2 s latches the minimum CPU caps
again, and the recovery climbs back over seconds, so the machine spends
most of its time well below its clocks.

Keep going from the last cool reading for up to 30 s, but only while the
SMC's measured P, E and GPU rails, read within the last 1.5 s, add up to
under 500 mW. A dark cluster is powered down; the rail reading is the
independent proof that nothing is drawing power while the sensors are
dark. The 2 s hold and every other limit are unchanged.

Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Blockers: 2. (Same change as closed #2720, identical patch-id; review of that commit.)

  1. The hold's bounds are constants sized on one J713 (apple-pmp-thermal.c:53-55: 30 s, 500 mW, 1.5 s), and the idle test sums only
    the P, E and GPU rails. During the hold the governor, the QoS guard and the thermal zone get a value up to 30 s old as a fresh
    reading. Critical shutdown is not made worse, because the confirmation counter resets on either path. Please derive "the dark
    clusters are powered down" from a hardware state (cluster power state or the PMP's per-sensor status), or take the bounds from
    the device tree.
  2. The description says fan-cooled Macs record no rail reading and keep only the 2 s hold. In the code, power_work is scheduled
    regardless of power_budget (797-798) and idle_rail_mw/idle_rail_ns are written on every successful SMC read (239-242).
    apple_pmp_rails_idle() doesn't check power_budget either, so J773g, J604 and the iMacs get the 30 s hold whenever their rails read
    under 500 mW. Either gate the idle hold on power_budget, as described, or update the description and add a J773g baseline.
    On the rebase: d3a8923 changes only how the thermal driver is selected (the PMP node compatible instead of the SoC), not the
    hold. This branch conflicts with it in five files, so thermal: apple-pmp: ride out long dark spans while the SoC is idle #2730's cherry-pick is the way to carry it. Rows still needed: one on
    thermal: apple-pmp: ride out long dark spans while the SoC is idle #2730's head, a J773g idle-rail and dark-span row, and a J713 hot-idle edge row.

The idle hold rides out a dark span of up to 30 s while the SMC rails say
the SoC is idle. Those bounds were measured on a fanless M4 Air, but the
rails are read on every machine, so a Mac with a fan would take the long
hold too.

Only take it where the shared rail budget applies (no SMC fan), and only
from a reading under 70 C. A die drawing under 500 mW for 30 s cannot
climb from there to the 106 C cooling start, so the held value stays a
safe stand-in for the real one. Hotter readings and fan-cooled Macs keep
the 2 s hold alone.

Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Thanks for the review. Follow-up commit 44e3094 is pushed. It is a separate commit with no force push, and can be squashed on merge.

2 (fan-cooled Macs): You're right: the rails are read on every machine. The idle hold now also requires pmp_thermal.power_budget, which is set only when the SMC describes no fan. J773g, J604 and the iMacs keep the 2 s hold alone, unchanged from #2533, so they need no baseline row. I've corrected the description.

1 (bounds, and a stale reading treated as fresh): The long hold now also requires the last reading to be under 70 C (APPLE_PMP_GATED_IDLE_HOLD_MC), well below the 106 C cooling start. The 30 s / 500 mW / 1.5 s bounds were measured on the J713, and they now apply only to the fanless Macs that share its rail budget. At under 500 mW on P+E+GPU, a die cannot climb from 70 C to the cooling start in 30 s, so the held value stays a conservative stand-in, and the governor's slope sees a flat, cool input rather than a hot one. Critical shutdown is unchanged, as you noted. I haven't found a per-cluster power state that Linux can read on T8132; the PMP's per-sensor valid words are the dark state. If Dj prefers the bounds in the device tree, I can move them there.

J713 row on this head (#2533 d3a8923 + both commits): 0 -61 in 150 s at idle, and 0 through a load-to-idle edge. Separate from this PR, plain integration + #2533 keeps the T8132 CPUs at 2868/1476 MHz for the whole boot, with every apple-pmp-thermal level at 0. apple-soc-cpufreq logs PMP not running after 30 s (-95): fast die-temperature limit unavailable, because the T8132 fast-die reader is in #2646 (b2b9024). The J713 default carries #2646 and runs at full caps. So the J713 needs #2533 + this PR + #2646 for full clocks on the tip. The hot-idle edge row above 70 C needs #2646 too; it's next on a kernel that has it.

Numbers

Assisted-by: LLM (Claude:Opus 5.5)

…rises

The long idle dark-span hold started only below a chosen 70 C. Derive
that limit from the first cooling trip instead: the hold may last 30 s
with the rails under the idle cap, and a load step can ride it for at
most 2 s (the rails are re-read every 500 ms and go stale after 1.5 s).
Subtract the largest rise measured over each of those windows on a
fanless M4 (3.25 C over 30 s with the rails under 500 mW, 18.75 C over
2 s of all-core load) from APPLE_PMP_PASSIVE_MC. That gives 84 C, and a
static_assert keeps it at or under the 2 s hold's own 90 C ceiling.

State why 500 mW is a cap and not a tuning value (idle rail sum median
28 mW, 99% under 70 mW) and describe the selection by fan presence
rather than by the machine the numbers were measured on.

Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Follow-up a3a2e8e is pushed as a separate commit (no force push; it can be squashed on merge). It covers the review's two open points.

Hold start limit (was a chosen 70 C): the limit is now derived from the first cooling trip: APPLE_PMP_PASSIVE_MC - 3.25 C - 18.75 C = 84 C.

  • 3.25 C is the largest 30 s die rise measured with the P+E+GPU rails under 500 mW, over every such window of two 1 Hz all-core soaks on the J713.
  • 18.75 C is the largest 2 s rise under all-core load. A load step can ride the hold for at most 2 s, because the rails are re-read every 500 ms and go stale after 1.5 s.

A static_assert keeps the result at or under the 2 s hold's own 90 C ceiling. Note that 84 C is looser than the old 70 C; the extra margin had no measured basis.

500 mW: the code comment now says why it is a cap, not a tuning value. After a soak, the idle rail sum had a median of 28 mW and stayed under 70 mW in 99% of 466 samples (308 mW at most). A busy cluster draws 6-8 W. The comment also states that the selection is by fan presence (power_budget), not by the machine where the numbers were measured.

Testing: W=1 and checkpatch are clean. I ran a live module A/B on a 7.3.0-bj713t6+ boot (J713, 27.2, default cmdline): 240 s all-core load, then 150 s idle, for each head. a3a2e8e showed no regression against 44e3094.

Still to run: the window where the two heads differ (a last reading between 70 and 84 C followed by a dark span longer than 2 s) never happened in this row, because the sensors came back within about 1 s of the load stop. So the row does not exercise the new limit itself.

Row detail
  • A (44e3094): load to 89.5 C. At the stop the reading fell to 68 C within 1 s. Caps stayed full. There were 3 x -61 in cool idle (about 47 C).
  • B (a3a2e8e): load to 92.0 C. At the stop there were 10 x -61 and one 2 s cap dip. That comes from M4 PMP: fan-based rail budget and self-described 27.2 PMP path #2533's 90 C short-hold ceiling, which is the same for both heads. Idle had 0 x -61.
  • The derivation data comes from our own 1 Hz soak captures (not tainted). Traces are under traces/power/20261122-j713-pr2730-v3/ and traces/power/20261120-j713-pwr/thermal-soak/ on the lab store.

Assisted-by: LLM (Claude:Opus 5.5)

@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 at live head a3a2e8ea60b734c5221738226364298132fb034d against all 6 sections of pre-pr-checklist.md. Requesting changes for code bugs, §3 safety/derivation concerns on a3a2e8ea, and missing CI/HW verification on the live head.

Blockers

  1. Stale idle_rail_ns / idle_rail_mw not reset in probe() or cleanup() (drivers/thermal/apple-pmp-thermal.c:697-742, 862-886)
    pmp_thermal is a file-scope static struct. apple_pmp_thermal_probe() resets valid_ns, governor_ns, cached_error, power_error, etc., and apple_pmp_thermal_cleanup() is explicitly documented as /* Leaves every field reset, so a deferred setup can be attempted again. */, yet neither resets pmp_thermal.idle_rail_ns = 0 or pmp_thermal.idle_rail_mw = 0. A deferred-setup retry after power_work started (e.g. goto fail at line 836) or an unbind/rebind leaves stale pre-cleanup rail state in the static struct.

  2. Rail timestamp captured after blocking SMC I/O and not invalidated on SMC failure (drivers/thermal/apple-pmp-thermal.c:249-264)

    • apple_pmp_power_work() calls apple_pmp_power_read_rails(mw) (which acquires device_lock(dev) and runs 6 blocking SMC transactions) before taking pmp_thermal.lock and reading now = ktime_get_ns(). Stamping idle_rail_ns = now after the blocking read hides SMC/lock latency inside the 1.5 s staleness bound; capture the sample timestamp before apple_pmp_power_read_rails() (keeping now under the lock for cooling.last_ns).
    • When apple_pmp_power_read_rails() fails (ret != 0, including the !mw[0] && !mw[1] all-zero firmware-reset -ENODATA check at line 254), idle_rail_ns is left untouched. Although apple_pmp_power_fail() drops CPU/GPU power_level to 8 on fanless Macs, apple_pmp_rails_idle() still returns true for up to 1.5 s after a known SMC failure, continuing to feed a frozen temperature to apple_pmp_cooling_sample(), thermal_zone_device_update(), and hwmon instead of failing closed with -ENODATA. Clearing pmp_thermal.idle_rail_ns = 0 when ret != 0 avoids trusting a pre-fault rail sample.
  3. §3 Safety — unverified zero-margin 84 C derivation & hardcoded single-unit bounds (a3a2e8ea, apple-pmp-thermal.c:58-77)

    • Extending the fail-closed dark-sensor timeout 15x (2 s → 30 s) relies on hardcoded J713-measured constants (30 s, 500 mW, 1.5 s, 3.25 C, 18.75 C) applied to every fanless T8132 (power_budget) without machine-provided bounds.
    • Specifically, commit a3a2e8ea loosens the hold start ceiling from 70 C to 84 C by subtracting exact 1 Hz, CPU-only single-unit rises (3250 + 18750 mC) from APPLE_PMP_PASSIVE_MC (106000 mC) with zero safety margin. It does not account for combined CPU + GPU 20 W burst load steps (APPLE_PMP_BURST_MW), sub-second peak rises missed by 1 Hz sampling, SMC read latency (blocker #2), or non-PP0b/PPbb/PP1b SoC heat sources (pmp-power-policy.h:193-194 notes those rails exclude other SoC blocks).
    • As the PR's own Still to run notes, the 70–84 C window added by a3a2e8ea was never exercised on hardware. Please restore conservative headroom (e.g., keep a substantially lower ceiling or prove a bounded CPU+GPU 20 W burst step with explicit margin) and clarify whether these bounds can be moved to DT or derived from hardware state per §3.
  4. CI not run & base branch still unmerged

    • This PR targets djdev/t8132-pmp-272 (#2533, still open), so statusCheckRollup is empty (0 CI checks executed). Retarget to integration/aurora once #2533 merges so host-tests runs on the live head, and coordinate the apple_pmp_power_work() overlap with #2699.

Checked & clean

  • Concurrency / wrap / overflow: mw[0] + mw[1] + mw[2] is bounded by 3 * 50000 = 150000 (apple_pmp_power_decode()), so no unsigned int overflow; snapshot.finished_ns - pmp_thermal.valid_ns and apple_pmp_rails_idle() run under pmp_thermal.lock on monotonic ktime_get_ns() with now >= idle_rail_ns guarded; static_assert evaluates 84000 <= 90000.
  • §4 Attribution: All 3 commits (236cbce33242, 44e309469911, a3a2e8ea60b7) have human author/committer (Ryan Murray <ryan@aurorasilicon.org>) and human Signed-off-by: only (zero AI trailers); PR body includes Assisted-by:.
  • §6 Naming: Clean.

§5 Hardware rows needed once blockers are fixed

  • Live-head J713 boot exercising the idle hold at the revised ceiling (including a hot-to-idle transition and combined CPU+GPU burst edge) plus full §5 regression summary (0 SELinux denials, 0 failed units, 0 new kernel errors).

Assisted-by: LLM (Gemini 4 Neon)

@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.

Pre-PR checklist re-review at a3a2e8ea60b734c5221738226364298132fb034d (§1–§6). No new commits have been pushed to this PR since our prior review on a3a2e8ea, while its base branch djdev/t8132-pmp-272 (#2533) was rebased to f5610a14 after #2699 merged (96ea511e). Keeping REQUEST_CHANGES for the open blockers below plus the new merge conflict.

Blockers

  1. Merge conflict & stale base stack (CONFLICTING / DIRTY), 0 CI checks:
    • Base branch djdev/t8132-pmp-272 was force-pushed to f5610a14 (incorporating merged #2699). #2730 still sits on old #2533 d3a89232, so its diff now drags 9 stale pre-rebase #2533 commits (485f153e..d3a89232), conflicts with the base branch, and has 0 CI runs (statusCheckRollup empty).
    • Rebase the 3 #2730 commits onto #2533 (f5610a14) — or onto integration/aurora once #2533 merges — reconciling apple_pmp_power_work() with #2699's dark branch so CI runs cleanly on the live head.
  2. Stale idle_rail_ns / idle_rail_mw not reset in probe() or cleanup() (drivers/thermal/apple-pmp-thermal.c):
    • Still unaddressed on a3a2e8ea: neither apple_pmp_thermal_probe() nor apple_pmp_thermal_cleanup() resets pmp_thermal.idle_rail_ns = 0 and pmp_thermal.idle_rail_mw = 0, leaving stale pre-cleanup rail state across deferred-setup retries or unbind/rebind.
  3. Rail timestamp captured after blocking SMC I/O and not invalidated on SMC failure (drivers/thermal/apple-pmp-thermal.c):
    • Still unaddressed on a3a2e8ea: idle_rail_ns is stamped after blocking apple_pmp_power_read_rails(mw) (hiding SMC/lock latency inside the 1.5 s staleness bound) and is not cleared when apple_pmp_power_read_rails() fails (ret != 0, including the !mw[0] && !mw[1] all-zero check), letting apple_pmp_rails_idle() keep returning true for up to 1.5 s after a known SMC fault.
  4. §3 Safety — zero-margin 84 C derivation & hardcoded single-unit bounds (a3a2e8ea):
    • Still unaddressed on a3a2e8ea: the 84 C ceiling subtracts 1 Hz CPU-only single-unit rises (3.25 C + 18.75 C) from 106 C with zero safety margin, omits combined CPU+GPU 20 W burst load steps, sub-second spikes, SMC read latency, and non-PP0b/PPbb/PP1b heat sources, and the added 70–84 C window remains unexercised on hardware. Restore conservative headroom (or prove bounded CPU+GPU burst steps with explicit margin) and clarify whether bounds can come from DT or hardware state per §3.

Checklist & Live Status

  • §4 Clean-room & attribution: Pass — human commits and Signed-off-by: only, Assisted-by: in PR body.
  • §5 Evidence: Needs live-head J713 run after rebase/fixes (exercising the revised ceiling, hot-to-idle + CPU+GPU burst edge, and 0 SELinux denials / 0 failed units / 0 new kernel errors).
  • §6 Naming: Pass.
  • CI (at a3a2e8ea): Empty (0 checks; PR is CONFLICTING / DIRTY).

Assisted-by: LLM (Gemini 4 Neon)

@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Closing: the long hold relies on fixed temperature and power bounds measured on one machine; a replacement should tell an idle SoC from the hardware state instead.

@RyanTheTide RyanTheTide reopened this Nov 22, 2026
@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Reopened and kept as a draft; the comment above lists what it still needs before review. cc @niteria

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