From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_2 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 97A7EC2B9F4 for ; Mon, 14 Jun 2021 14:10:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 74AC061350 for ; Mon, 14 Jun 2021 14:10:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234479AbhFNOMs (ORCPT ); Mon, 14 Jun 2021 10:12:48 -0400 Received: from frasgout.his.huawei.com ([185.176.79.56]:3235 "EHLO frasgout.his.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234323AbhFNOMq (ORCPT ); Mon, 14 Jun 2021 10:12:46 -0400 Received: from fraeml737-chm.china.huawei.com (unknown [172.18.147.207]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4G3Y5H5SsYz6G8p9; Mon, 14 Jun 2021 22:01:07 +0800 (CST) Received: from lhreml710-chm.china.huawei.com (10.201.108.61) by fraeml737-chm.china.huawei.com (10.206.15.218) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Mon, 14 Jun 2021 16:10:42 +0200 Received: from localhost (10.52.124.209) by lhreml710-chm.china.huawei.com (10.201.108.61) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Mon, 14 Jun 2021 15:10:41 +0100 Date: Mon, 14 Jun 2021 15:10:36 +0100 From: Jonathan Cameron To: Cristian Marussi CC: , , , , , , , , , , , , , , , , , Subject: Re: [PATCH v4 12/16] firmware: arm_scmi: Add message passing abstractions for transports Message-ID: <20210614151036.00000409@Huawei.com> In-Reply-To: <20210611165937.701-13-cristian.marussi@arm.com> References: <20210611165937.701-1-cristian.marussi@arm.com> <20210611165937.701-13-cristian.marussi@arm.com> Organization: Huawei Technologies Research and Development (UK) Ltd. X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; i686-w64-mingw32) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.52.124.209] X-ClientProxiedBy: lhreml727-chm.china.huawei.com (10.201.108.78) To lhreml710-chm.china.huawei.com (10.201.108.61) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 11 Jun 2021 17:59:33 +0100 Cristian Marussi wrote: > From: Peter Hilber > > 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 > --- ... > 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))