Repository navigation
Conversation
|
The reorder looks right: it does what the second paragraph of 18b4933's message asked for, and outside the J714s Two small things:
A J716c run with a USB-C plug wake and the lid closed, showing the Assisted-by: LLM (Claude:Opus 5.5) |
cfeb58f to
4b663ff
Compare
|
Ryan, both taken at 4b663ff; the code is otherwise unchanged.
I have no J716c for the plug-wake run. |
DjDeveloperr
left a comment
There was a problem hiding this comment.
Pre-PR checklist review at 4b663fffcb1d (§1–§6). Commit attribution, clean-room, naming, and CI (host-tests) are clean, and reordering if (pm_dark_wake()) above the J714s wake_reasons check fixes the J716c path. Requesting changes because J813 is still not fixed by this patch (contrary to the title and commit message) and §5 hardware evidence is missing:
Blockers
-
Real code bug — J813 (and any
saved_enabledboard withoutsmc->sleep_policy) still leavesdark_wakes == 0(drivers/mfd/macsmc.c:1079-1091at PR head;1118-1131onintegration/aurora):
Both the PR title ("count a port's dark wake on every board") and commit message state that this fixes the other boards with the saved-context path: "the J716c, and the J813 if a port wakes it dark".
However,apple_smc_sleep_wake()only callsapple_smc_dark_wake(smc)insideif (smc->sleep_policy):if (apple_smc_port_reasons_only(smc, smc->wake_record)) apple_sleep_port_wake(apple_sleep_lid_closed_at_wake() > 0); if (smc->sleep_policy) { apple_smc_dark_wake(smc); return; }
In
drivers/soc/apple/sleep.c:9524,t8142_sleep_soc(J813) has.smc_policy == NULL(J813 usesapple_sleep_smc_defer_notice()/apple_smc_j813_saved_opswithsmc->saved_enabled = trueatmacsmc.c:656-657). Therefore on J813:apple_smc_dark_wake()is never reached at all;smc->dark_wakesstays0afterapple_sleep_port_wake()(and afterapple_sleep_lid_closed_wake()orapple_sleep_debug_link_cut_wake());- on re-entry,
apple_smc_prepare()->apple_smc_sleep_prepare()->apple_smc_prepare_guard()still runs withlimit = 0(single trylock).
To actually count dark wakes on every board with the saved-context path, also increment
smc->dark_wakeswhenpm_dark_wake()is set on the non-sleep_policypath ofapple_smc_sleep_wake()(afterapple_sleep_debug_link_cut_wake()), or drop J813 from the title/commit message if scoping this strictly tosleep_policyboards. -
Commit message wording on
.preparevs.suspend(drivers/mfd/macsmc.c:1559-1586):
On J716c (apple_sleep_smc_policy() != NULL),apple_smc_prepare()takesmutex_lock(&smc->mutex)directly; theapple_smc_prepare_guard()trylock-vs-wait path runs at.suspend(apple_smc_suspend()->apple_smc_sleep_prepare()). On J813 it runs at.prepare. -
§5 Evidence missing:
No hardware run on any affected board (J716c or J813) and no §5 regression run (0 SELinux denials, 0 failed units, 0 new kernel errors). As@RyanTheTidenoted, a J716c (and/or J813, once fixed there) closed-lid USB-C plug-wake run showingdark wake's re-entry: the SMC was busy for N ms(or clean re-entry without-EBUSY) plus a regression check is needed before merge.
Checklist summary (§1–§6)
- §1 No model gating: Incomplete — still gated on
smc->sleep_policy, missing J813 (saved_enabledwithoutsleep_policy). - §2 Production-ready: Blocked by item 1.
- §3 Safety: Pass.
- §4 Clean-room & attribution: Pass — human author/committer and
Signed-off-by, zero AI trailers. - §5 Evidence: Missing hardware verification and regression run.
- §6 Naming: Pass.
Assisted-by: LLM (Gemini 4 Neon)
|
Thanks, both points are taken at 4b663ff: the message names the J716c and J813, and the comment at macsmc.c:1492 says "a counted dark wake". The code is the same as before. I checked the J813 point from the review above and it holds at this head. Assisted-by: LLM (Claude:Opus 5.5) |
apple_smc_prepare_guard() waits for a command in flight only when dark_wakes is set, and apple_smc_dark_wake() returns for every board but the J714s before it counts a wake that apple_sleep_port_wake() already made dark. On the other boards with a sleep policy (the J716c) the guard at .suspend after a port's wake with the lid closed is then a single trylock: if a command of the wake is still running, .suspend returns -EBUSY and the dark wake ends in a full one. Count the wake first, then keep the J714s's own rule to the J714s. The comment on the wait no longer names the J714s. A board without a sleep policy (the J813) does not get here and is not changed. Fixes: 18b4933 ("mfd: macsmc: J714s: keep the port and radio dark wakes to the J714s") Signed-off-by: Jens Axboe <axboe@kernel.dk>
4b663ff to
af97a52
Compare
|
Ryan, DjDeveloperr, you are both right about the J813: it has no sleep policy, so it never reaches I did not add counting on the path without a policy. That would change the J813's re-entry, and I have no J813 to run it on. On the hardware row: I have no J716c either. The closest I have is the K116s with #2201 and this commit, which is not a J714s-table board and so takes the branch this commit moves: a closed-lid charger plug there was a dark wake ( |
#2231 replaced the mutex that #2445 took at
.preparewithapple_smc_prepare_guard(), which waits for a command in flight only whendark_wakesis set.apple_smc_dark_wake()returns for every board but the J714s before it counts a wake thatapple_sleep_port_wake()already made dark, so on the other boards with a sleep policy (the J716c)dark_wakesstays 0. A board without a sleep policy (the J813) never gets there and is not changed.There the guard at
.suspendafter a port's wake with the lid closed is a single trylock: if a command of the wake is still running,.suspendreturns -EBUSY and the dark wake ends in a full one. That is the refusal the third commit of #2445 fixed.One commit, on
integration/auroraf44bf7a: count the wake first, then keep the J714s's own rule to the J714s. Nothing changes on the J714s.Found by reading the code after the rebase; I have not reproduced the refusal on this base. checkpatch is clean.