soc: apple: rtkit: Switch to atomic mailbox API
authorHector Martin <marcan@marcan.st>
Tue, 8 Feb 2022 07:58:53 +0000 (16:58 +0900)
committerJens Axboe <axboe@kernel.dk>
Tue, 1 Mar 2022 17:38:38 +0000 (10:38 -0700)
commit170f7b179d33ee29249d20356d92b1c85740fa7c
tree771e6e45531af58be5585eaddd635e1f3f6db2ac
parent09bc8295ea2b3c60ac17d69c7272a403897aa229
soc: apple: rtkit: Switch to atomic mailbox API

Turns off tx_block and use the tx_done callback to implement our own
completion handling. This makes our usage of the mailbox API
atomic-safe, and using a per-message completion is also more robust.

Then, implement apple_rtkit_send_message_atomic which polls for
transmission to be complete instead of using a completion. This is
required to send RTKit messages from atomic contexts, notably the
final system shutdown message to SMC.

Signed-off-by: Hector Martin <marcan@marcan.st>
drivers/soc/apple/rtkit.c
include/linux/soc/apple/rtkit.h