From e4f54bdbaafd15e8592ebdeb04a0d2f286d925ef Mon Sep 17 00:00:00 2001 From: Erik Bourget Date: Tue, 17 Nov 2026 16:55:14 -0500 Subject: [PATCH] soc: apple: sleep: read a T6050 power word through its region sleep_ps_full() read the power word at s->ps + offset. On T6050 the words are region-encoded (SLEEP_REGION(w)), and sleep_power_reg() is what turns one into its address; sleep_ps_on() and the other readers went through it with the T6050 support, which missed this one. Since the T8142 sleep support, the bound display-coprocessor check in apple_sleep_refuse() and the bound gate checks in apple_sleep_gate_failed() call sleep_asc_running(), and so sleep_ps_full(), during T6050's early-entry refusal checks, with interrupts off on the last CPU. There it read a wrong address, and the J716c reset during every deep sleep instead of sleeping. Read the word through sleep_power_reg(), which is s->ps + offset on the SoCs without regions, so nothing changes there. Developed with Claude Code. Fixes: 5ce3491f2836 ("soc: apple: sleep: T6050 (M5 Pro) suspend to RAM") Signed-off-by: Erik Bourget --- drivers/soc/apple/sleep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/soc/apple/sleep.c b/drivers/soc/apple/sleep.c index 465e30fef8236..ce1bcee755574 100644 --- a/drivers/soc/apple/sleep.c +++ b/drivers/soc/apple/sleep.c @@ -2643,7 +2643,7 @@ static bool sleep_ps_on(struct apple_sleep *s, u32 offset) /* Below full power the hardware has idled it, and its registers may not answer. */ static bool sleep_ps_full(struct apple_sleep *s, u32 offset) { - return FIELD_GET(PS_ACTUAL, readl(s->ps + offset)) == FIELD_MAX(PS_ACTUAL); + return FIELD_GET(PS_ACTUAL, readl(sleep_power_reg(s, offset))) == FIELD_MAX(PS_ACTUAL); } /*