firmware: arm_scmi: Add support for atomic transports
authorCristian Marussi <cristian.marussi@arm.com>
Mon, 20 Dec 2021 19:56:41 +0000 (19:56 +0000)
committerSudeep Holla <sudeep.holla@arm.com>
Tue, 21 Dec 2021 10:59:37 +0000 (10:59 +0000)
commit69255e746890274e887ba36a403019380cde0b48
tree5abc6897bcfcd248af38afbde355032e0b22f0b6
parentbf322084fec30b92423911db0169a3610008fc15
firmware: arm_scmi: Add support for atomic transports

An SCMI transport can be configured as .atomic_enabled in order to signal
to the SCMI core that all its TX path is executed in atomic context and
that, when requested, polling mode should be used while waiting for command
responses.

When a specific platform configuration had properly configured such a
transport as .atomic_enabled, the SCMI core will also take care not to
sleep in the corresponding RX path while waiting for a response if that
specific command transaction was requested as atomic using polling mode.

Asynchronous commands should not be used in an atomic context and so a
warning is emitted if polling was requested for an asynchronous command.

Add also a method to check, from the SCMI drivers, if the underlying SCMI
transport is currently configured to support atomic transactions: this will
be used by upper layers to determine if atomic requests can be supported at
all on this SCMI instance.

Link: https://lore.kernel.org/r/20211220195646.44498-7-cristian.marussi@arm.com
Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
drivers/firmware/arm_scmi/common.h
drivers/firmware/arm_scmi/driver.c
include/linux/scmi_protocol.h