soc: apple: rtkit: Switch to atomic mailbox API
authorHector Martin <marcan@marcan.st>
Tue, 8 Feb 2022 07:58:53 +0000 (16:58 +0900)
committerHector Martin <marcan@marcan.st>
Sat, 19 Feb 2022 07:56:36 +0000 (16:56 +0900)
commitaee0bc1199b4a83dbec420661fddf31c3a80d968
tree70ebbaebe54af0eb7d6841b28a0869b9d3b7ee37
parentb480a2d52a91b03428f1dc734e7a71ddd7b5a37f
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