Skip to content

soc: apple: rtkit: give AP IDLE the saved scope's bound again - #2677

Merged
DjDeveloperr merged 1 commit into
integration/aurorafrom
djdev/m5-j714s-rtkit-ap-idle-bound-restore
Nov 21, 2026
Merged

DjDeveloperr merged 1 commit into
integration/aurorafrom
djdev/m5-j714s-rtkit-ap-idle-bound-restore

Conversation

@DjDeveloperr

@DjDeveloperr DjDeveloperr commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Puts the saved scope's AP IDLE post and ack back on APPLE_RTKIT_M5_LOOPS, the 500 ms bound every other saved-scope message has, as before #2599 (36d2d18). The per-call bound parameter, which only AP IDLE used, goes too. A post or an ack slower than 5 ms (nominal) is still logged with its count.

Why: the 10 s from #2599 was margin on top of ac2079f ("soc: apple: rtkit: echo log words on the saved lane", #2445). That commit fixed why the J714s SMC held AP IDLE back after a Type-C event: a saved-lane log word that went unechoed. With the fix in, the margin would only hide an SMC that answers late.

Evidence (J714s): 43 sleeps, each a Type-C replug followed by a ~30 s RTC-alarm deep sleep, on kernels with ac2079f and the slow post/ack log. Result: 0 hangs, and no "acked late" or slow "posted" line. Every AP IDLE post and ack finished in under 5 ms, against this bound's 500 ms.

Also affected: the J813 late notice uses the same call, so it goes back to the 500 ms bound it had before #2599. That path was not re-run here.

Testing: checkpatch is clean. The change touches only drivers/soc/apple/rtkit.c: no DT and no new parameters. This head has not been booted on its own.

Assisted-by: LLM (Claude:Opus 5.5)

@RyanTheTide

Copy link
Copy Markdown
Contributor

The cause is well found: with #2445 echoing the saved-lane log words, the 43 replug sleeps never needed more than 5 ms. But I'd keep the long bound, and here is why.

The comment this PR removes records what the 500 ms bound does when it does fire: -ETIMEDOUT, then the notice's panic, then a silent halt with the consoles suspended until the sleep watchdog's reset 120 s later. #2599's 10 s bound turned that into a slow sleep. Going back means any other reason the SMC takes AP IDLE late (a case #2445 doesn't cover, a firmware update, a different board) gives a hard reset with nothing on the console again, instead of a sleep that took a few seconds.

The visibility argument is already covered by the 5 ms slow-post/slow-ack log line this keeps, so the long bound hides nothing: a late SMC shows in the log either way. I'd keep APPLE_RTKIT_M5_AP_IDLE_LOOPS, maybe make the slow line a dev_warn, and keep the "acked late" message as the signal. If the bound has to go, then the timeout path should refuse the sleep and resume cleanly rather than reach the notice's panic.

Assisted-by: LLM (Claude:Opus 5.5)

Commit 36d2d18 ("soc: apple: rtkit: give the saved scope's AP IDLE
up to 10 s") let the post and the ack of AP IDLE in the saved scope take
up to 10 s, against the 500 ms bound of every other saved-scope message,
as margin on top of commit ac2079f ("soc: apple: rtkit: echo log
words on the saved lane"). That commit fixed why the J714s SMC held AP
IDLE back after a Type-C event: a saved-lane log word that went
unechoed.

With ac2079f, 43 J714s sleeps, each a Type-C replug followed by a
30 s RTC-alarm deep sleep, logged no AP IDLE post or ack slower than
5 ms. The margin would only hide an SMC that answers late, so give AP
IDLE the APPLE_RTKIT_M5_LOOPS bound again, as before 36d2d18, and
drop the per-call bound that only it used. A post or an ack slower than
5 ms is still logged with its count. The J813 late notice also goes back
to the 500 ms bound it had before 36d2d18.

Signed-off-by: Diljit Singh <hey@djdev.me>
@DjDeveloperr
DjDeveloperr force-pushed the djdev/m5-j714s-rtkit-ap-idle-bound-restore branch from d93fbad to db376c2 Compare November 21, 2026 06:44
@DjDeveloperr
DjDeveloperr merged commit 4b24e49 into integration/aurora Nov 21, 2026
7 checks passed
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