Repository navigation
kboot: pass the CLPC's Low Power mode power target - #580
Conversation
Where the CLPC node names the SMC power reading the OS holds in its low-power profile (apple,power-key-id), pass the ADT's Low Power mode package power target (pmgr/clpc pkg-lpm-power-target, watts in 8.24 fixed point, 255.0 meaning none) as apple,low-power-mw, in milliwatts, next to the CPU ceiling. Nodes without the key keep their own target, so no other machine changes. Signed-off-by: Nick <nekreshen@yandex.ru>
|
@sithglan @gig3m: the kernel side (aurora-silicon/linux#3646) is ready for testing too; the test steps are there. A J813 boot log line |
|
Merge readiness at
Areas: none matched in CODEOWNERS Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels. |
|
@RyanTheTide @DjDeveloperr check please |
There was a problem hiding this comment.
Verdict: HOLD at 15ecd34b
Blockers:
- Exact-head hardware row at
15ecd34b: Code and all27CI checks at head15ecd34bare clean, but the current J815 hardware row was recorded on combined tree1cf188d5(main+#363+ this change) rather than exact head15ecd34b. Please post an exact-head15ecd34bboot row on J815 or J813 (confirming clean boot andFDT: CLPC: Low Power mode power target ... mWwhen booted with anapple,power-key-idDTB, or unchanged boot without it); ready to approve immediately once recorded.
Checked:
src/kboot.c(dt_set_clpc_low_power()): reads/arm-io/pmgr/clpcpkg-lpm-power-target(u32, 8.24 fixed-point watts), skips0and sentinel>= 255.0(255U << 24), and converts overflow-safely via(u32)(((u64)target * 1000) >> 24)(5.0 W->5000 mW, max< 255,000 mW, skippingmw == 0).- Scoping: writes
apple,low-power-mwonly whenmw != 0and the CLPC node already carriesapple,power-key-id, leaving all other boards (including T6050 and boards withapple,smcbut noapple,power-key-id) completely unchanged. - Error handling:
fdt_setprop_u32()failure callsbail(...), consistent withapple,low-power-frequency-max-mhzimmediately above. - CI at
15ecd34b: all27checks passed (build,ESP stage 2 vital size,format-check,gcc,clang-macos,policy,selftest,pr-text,readiness,fedora,alarm,nix, and all 5Pytestmatrices).
Evidence
- Diff reviewed:
aura#580at15ecd34beb3268ce17502424005b8af395f397f2(+16/-0, 1 filesrc/kboot.c, 1 commit,MERGEABLEonmain). - Companion kernel PR:
aurora-silicon/linux#3646.
|
Note from J813 ( |
There was a problem hiding this comment.
Verdict: MERGE at 15ecd34beb32
Converts this App's earlier review at the same head to an approval under the 12-01 merge bar (better than before and doesn't break; block only on a shown failure). No code blocker was found in it. The merge gate (a row on one Mac at this head + fast CI) is tracked by pr-readiness, not held here.
Checked: - src/kboot.c (dt_set_clpc_low_power()): reads /arm-io/pmgr/clpc pkg-lpm-power-target (u32, 8.24 fixed-point watts), skips 0 and sentinel >= 255.0 (255U << 24), and converts overflow-safely via (u32)(((u64)target * 1000) >> 24) (5.0 W -> 5000 mW, max < 255,000 mW, skipping mw == 0).
- Scoping: writes
apple,low-power-mwonly whenmw != 0and the CLPC node already carriesapple,power-key-id, leaving all other boards (including T6050 and boards withapple,smcbut noapple,power-key-id) completely unchanged. - Error handling:
fdt_setprop_u32()failure callsbail(...), consistent withapple,low-power-frequency-max-mhzimmediately above. - CI at
15ecd34b: all27checks passed (build,ESP stage 2 vital size,format-check,gcc,clang-macos,policy,selftest,pr-text,readiness,fedora,alarm,nix, and all 5Pytestmatrices).
Follow-ups (not blocking): exact-head J815/J813 boot row
|
Merging at |
What: pass the ADT's Low Power mode package power target (
pmgr/clpcpkg-lpm-power-target) to the CLPC node asapple,low-power-mw, next to the CPU ceiling the loader already passes. It does so only where the board DT names the SMC reading the OS holds at it (apple,power-key-id), so the kernel's low-power limit gets its target from the machine and no other board changes.Tested: J815, aura 1cf188d5 (main f417b84 + #363 + this change): the loader logs
FDT: CLPC: Low Power mode power target 5000 mW, the CLPC node carriesapple,low-power-mw = 5000, and with aurora-silicon/linux#3646 Power Saver holds the reading at it (4.95 W all-core, 4.54 W GPU, 4.91 W mixed). Build clean at the head.Risk: two-way door. J813/J815 only (the only DT with
apple,power-key-id, from the linux PR below). Every other CLPC node is left as it is.Not yet: J813 (its ADT target is read the same way).
Details
0xff000000) means none and is skipped. The loader writes milliwatts ((v * 1000) >> 24).apple,power-key-idon the node nothing is written: boards whose DT already wiresapple,smcto the CLPC (T6050, T604x, T602x, T8112, T8140, T8152) keep their present behaviour, including T6050's own 15 W target in the driver.Evidence
J815 boot: