Repository navigation
cpuidle: apple: add T8132 and enable it on J713 (s2idle groundwork) - #432
Conversation
The T8132 (M4) idles like the T6040 and T8140: iBoot locks CYC_OVRD, and a plain WFI already lets the hardware power-gate an idle core. Add "apple,t8132-cpuidle" to select the same driver behaviour. Signed-off-by: Erik Bourget <erik@ebourget.net>
The T8132 (M4) behaves like the T6040: iBoot locks CYC_OVRD, so the CPU PD state cannot run, and a plain WFI already powers an idle core down (the arm64 idle code saves the registers it loses). Run both entries through WFI when the device tree has an "apple,t8132-cpuidle" node, as for "apple,t6041-cpuidle". Without a cpuidle driver, suspend-to-idle never reaches cpuidle_enter_s2idle(), so the tick is never frozen and timekeeping is never suspended. Normal idle does not change: it is already WFI. Signed-off-by: Erik Bourget <erik@ebourget.net>
Describe the T8132 CPU idle controller, disabled by default as on T6040 and T8140, and enable it on the MacBook Air J713. Signed-off-by: Erik Bourget <erik@ebourget.net>
RyanTheTide
left a comment
There was a problem hiding this comment.
I checked the T8132 match, the WFI-only state replacement and the disabled-by-default SoC node with board enablement. Index 1 remains available for the generic s2idle selector, and the new path does not write CYC_OVRD. The binding and DT changes follow the existing T6040 shape. The attribution check found no additional Gravity-derived implementation.
The commits are checkpatch-clean. The combined tree passed the targeted bindings and J713/J616s DTB checks without diagnostics, apple-dcp 63/63 and Asahi KUnit 86/86. The first defconfig plus asahi.config WERROR build passed. The shipping and final fixup-tree builds are still running.
I have no J713 runtime or s2idle result of my own. This is not merge-ready while the universal build gates and the shared config dependency in #438 remain outstanding.
|
Final software gates now pass on the combined tree containing these heads and the proposed common config correction in #438. Both defconfig plus asahi.config and the Fedora-base recipe build Image, modules and DTBs with WERROR enabled. The Fedora recipe also covers KUNIT=m. Every requested asahi.config setting survives resolution. Asahi KUnit passes 86/86 and apple-dcp host tests pass 63/63. The targeted J713/J616s binding and DTB checks have no diagnostics. The T8132 code, bindings and final source-style checks pass. The remaining hold is the common-config review dependency in #438; I am not adding a J713 hardware requirement beyond the agreed scope. |
|
Final qualification for 3ef17de. The combined test source is 031f7dec92a1bef6b72509b08c5c597f50474adb, tree 36854d3a72e4efdf2c352166498ab436adaf3c48. Both defconfig plus asahi.config and the Fedora-base shipping recipe pass the full Image/modules/DTB build with WERROR enabled. Every requested fragment value survives olddefconfig. Asahi KUnit passes 86/86, apple-dcp host tests pass 63/63, and targeted J713/J616s binding/DTB checks have no diagnostics. Strict source-style checks pass; commit sign-offs are checked separately. The attribution audit found no new material Gravity implementation blocks. Existing GPL-2.0-only Cody Ho and Niklas Sheth credit is preserved. The T8132 WFI-only path preserves index 1 and avoids CYC_OVRD writes. Its M4-only runtime follows the agreed review/build-only scope. No code hold remains. Not merge-ready yet because #438 still needs the required common-config review. |
|
The T8132 match takes the WFI-only path, keeps state index 1 selectable for s2idle, and avoids CYC_OVRD writes. Its SoC node is disabled until the J713 board enables it. The reported J713 idle-state counts are useful evidence, and #449 now supplies the separate suspend result. The stacked kernel at No new code issue found. The shared cpuidle probe still needs the Neo regression boot in this train, checking idle entry and suspend/resume. Merge with the reviewed #394 recipe before #449. |
|
Merging as it is, no changes. This comment is from Claude Opus 5.5, working for Eryk, not from Eryk himself. It still merges cleanly, and Testing
🤖 Written by Claude Opus 5.5 (in Claude Code) for Eryk. |
This adds
apple,t8132-cpuidleand enables it on the J713 (MacBook Air 13" M4), the same way T6040 (#371) and T8140 already do it.What it changes, and what it doesn't
On T8132, as on T6040, iBoot locks CYC_OVRD, so the CPU PD state can't run. A plain WFI already lets the hardware power-gate an idle core. The kernel already saves the registers that WFI loses (
Apple: preserving registers across WFIat boot). Both entries therefore go through WFI, and normal idle power doesn't change: the cores were already idling in that same WFI.What it does add is the path for suspend-to-idle. Without a cpuidle driver, s2idle never reaches
cpuidle_enter_s2idle(), so the tick is never frozen and timekeeping is never suspended. It's groundwork for J713 sleep. Index 1 is kept selectable, with noCPUIDLE_FLAG_OFF, for the reason in Jonathan's a391e53.Commits
dt-bindings: cpu: apple,t8140-cpuidle: Add t8132 compatiblecpuidle: apple: Add T8132:apple,t8132-cpuidletakes the same WFI-only path asapple,t6041-cpuidle. It never touches CYC_OVRD, so it's safe whether or not iBoot locks it.arm64: dts: apple: t8132: Add the CPU idle node and enable it on J713: the node is disabled int8132.dtsi, as on T6040 and T8140, and enabled int8132-j713.dts.Hardware tested on: J713 (8-core GPU), integration/aurora 420a1c8 plus these three commits, plus #429 and the #389 hash:
cpuidlebinds:current_driverreadsapple_idlewith themenugovernor.Not tested: s2idle itself. J713 suspend is still refused, so the path this enables hasn't run yet.
Checks:
checkpatch --strictis clean on all three commits.