Re: [PATCH v4 12/16] firmware: arm_scmi: Add message passing abstractions for transports

Jonathan Cameron
2021-06-14T14:10:46Z

On Fri, 11 Jun 2021 17:59:33 +0100
Cristian Marussi <cristian.marussi@arm.com> wrote:

> From: Peter Hilber <peter.hilber@opensynergy.com>
>
> Add abstractions for future transports using message passing, such as
> virtio. Derive the abstractions from the shared memory abstractions.
>
> Abstract the transport SDU through the opaque struct scmi_msg_payld.
> Also enable the transport to determine all other required information
> about the transport SDU.
>
> Signed-off-by: Peter Hilber <peter.hilber@opensynergy.com>
> ---
...
> diff --git a/drivers/firmware/arm_scmi/common.h b/drivers/firmware/arm_scmi/common.h
> index b783ae058c8a..fa4075336580 100644
> --- a/drivers/firmware/arm_scmi/common.h
> +++ b/drivers/firmware/arm_scmi/common.h
> @@ -410,6 +410,21 @@ void shmem_clear_channel(struct scmi_shared_mem __iomem *shmem);
> bool shmem_poll_done(struct scmi_shared_mem __iomem *shmem,
> struct scmi_xfer *xfer);
>
> +/* declarations for message passing transports */
> +struct scmi_msg_payld;
> +
> +/** Maximum overhead of message w.r.t. struct scmi_desc.max_msg_size */

Doesn't look to be kernel-doc..

> +#define SCMI_MSG_MAX_PROT_OVERHEAD (2 * sizeof(__le32))