aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJanne Grunau <j@jannau.net>2025-02-26 19:00:03 +0000
committerSven Peter <sven@svenpeter.dev>2025-02-28 21:36:45 +0000
commit3e46b6df8465e7a1c0d8e87a0966ecfb753ae84b (patch)
treec71aee3cec55bf3acdcc9132768ffc9d17b18158
parentsoc: apple: rtkit: Fix use-after-free in apple_rtkit_crashlog_rx() (diff)
downloadwireguard-linux-3e46b6df8465e7a1c0d8e87a0966ecfb753ae84b.tar.xz
wireguard-linux-3e46b6df8465e7a1c0d8e87a0966ecfb753ae84b.zip
soc: apple: rtkit: Add and use PWR_STATE_INIT instead of _ON
This state is needed to wake the dcp IOP after m1n1 shut it down and works for all other co-processors as well. Signed-off-by: Janne Grunau <j@jannau.net> Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Link: https://lore.kernel.org/r/20250226-apple-soc-misc-v2-1-c3ec37f9021b@svenpeter.dev Signed-off-by: Sven Peter <sven@svenpeter.dev>
-rw-r--r--drivers/soc/apple/rtkit.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/soc/apple/rtkit.c b/drivers/soc/apple/rtkit.c
index 2f5f878bf899..be0d08861168 100644
--- a/drivers/soc/apple/rtkit.c
+++ b/drivers/soc/apple/rtkit.c
@@ -12,6 +12,7 @@ enum {
APPLE_RTKIT_PWR_STATE_IDLE = 0x201, /* sleeping, retain state */
APPLE_RTKIT_PWR_STATE_QUIESCED = 0x10, /* running but no communication */
APPLE_RTKIT_PWR_STATE_ON = 0x20, /* normal operating state */
+ APPLE_RTKIT_PWR_STATE_INIT = 0x220, /* init after starting the coproc */
};
enum {
@@ -898,7 +899,7 @@ int apple_rtkit_wake(struct apple_rtkit *rtk)
* Use open-coded apple_rtkit_set_iop_power_state since apple_rtkit_boot
* will wait for the completion anyway.
*/
- msg = FIELD_PREP(APPLE_RTKIT_MGMT_PWR_STATE, APPLE_RTKIT_PWR_STATE_ON);
+ msg = FIELD_PREP(APPLE_RTKIT_MGMT_PWR_STATE, APPLE_RTKIT_PWR_STATE_INIT);
ret = apple_rtkit_management_send(rtk, APPLE_RTKIT_MGMT_SET_IOP_PWR_STATE,
msg);
if (ret)