Skip to content

cpuidle: apple: add T6050, so M5 suspend-to-idle freezes the tick - #826

Merged
RyanTheTide merged 2 commits into
integration/aurorafrom
j716c/cpuidle
Nov 6, 2026
Merged

RyanTheTide merged 2 commits into
integration/aurorafrom
j716c/cpuidle

Conversation

@erikwb

@erikwb erikwb commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

On T6050 (M5 Pro and M5 Max) no cpuidle driver binds, so suspend-to-idle never reaches cpuidle_enter_s2idle(). The tick is never frozen and timekeeping is never suspended, so the CPUs keep taking timer interrupts through the whole sleep. This registers cpuidle-apple on T6050.

What it changes

  • A T6050 guest can't write CYC_OVRD, so the CPU PD state isn't available. WFI already lets the hardware power-gate idle cores, so both entries use WFI, the same way T8140 and T6041 do.
  • Index 1 is kept because the generic s2idle selector skips index 0. With only one state, s2idle falls back to ordinary idle with the tick running.
  • Normal idle is unchanged: the cores were already idling in the same WFI through cpu_do_idle().

Testing (J716c, M5 Max)

This change was run on the J716c daily kernel (7.1.12 base). This branch is the same change on integration/aurora's version of the driver.

  • current_driver reads apple_idle with two WFI states, and both are used at the desktop.
  • Real suspend-to-idle for 483 s: every one of the 18 CPUs entered the s2idle state exactly once and stayed there until the key press. Timekeeping was suspended: the kernel log advanced 0.3 s over 145 s of sleep.
  • An earlier build with a single WFI state (index 0 only) showed 0 s2idle entries across all CPUs.
  • The other suspend-to-idle pieces on J716c (a sleep-retained ATC2_USB domain and an N1 Wi-Fi resume fix) are separate changes.

Not tested: M5 Pro.

Checks: checkpatch --strict is clean, and drivers/cpuidle/cpuidle-apple.o builds with W=1 and no warnings on this base.

Created with Claude Opus 5.5 in Claude Code.

erikwb and others added 2 commits November 1, 2026 20:48
T6050 (M5 Pro and M5 Max) has no cpuidle driver, so suspend-to-idle
never reaches cpuidle_enter_s2idle(): the tick is never frozen and
timekeeping is never suspended. Register the driver on T6050.

A T6050 guest cannot write CYC_OVRD, so CPU PD is not available, and
WFI already lets the hardware power-gate idle cores. Both entries
therefore use WFI, as on T8140 and T6041, and index 1 is kept because
the s2idle selector skips index 0.

Developed with Claude Code.

Signed-off-by: Erik Bourget <[email protected]>
Resolve the cpuidle-apple probe conflict: integration/aurora now
selects WFI-only SoCs by cpuidle compatible (T6041, T8132) besides the
T8140 machine check. Keep T6050 as a machine check next to T8140, as
no T6050 cpuidle node exists yet.

Signed-off-by: Ryan Murray <[email protected]>
Assisted-by: LLM
@RyanTheTide

Copy link
Copy Markdown
Contributor

Merged integration/aurora into the branch (baeb7d5) to resolve the conflict with the compatible-based WFI-only selection (T6041, T8132). T6050 stays a machine check beside T8140, since no T6050 cpuidle node exists on integration yet. The resolved tree builds clean with W=1 (arm64, LLVM, cpuidle-apple.o) and checkpatch --strict is clean on 4253ee0. Other SoCs are untouched: the change only adds the apple,t6050 machine check. Merging on erikwb's J716c hardware result.

🤖 Generated with Claude Code

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