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=-11.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 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 3C840C07E96 for ; Tue, 6 Jul 2021 14:20:54 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id F08DF610A6 for ; Tue, 6 Jul 2021 14:20:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F08DF610A6 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=h5uprXxzcWf2Q7b4Kbr/lTACU9Y6iVHRr7eyBkvqklE=; b=ke+uPGJwKlBZiC Byrvld+eNZ2OQjJORPbSq2Zt6X/EYoR6cywkn/3nJNqoIcuisUpeWrpJGRSQ0sJxWFK9LP5uSWmaF VXg2y7TGAV2//1w6QLtn+EUzkuwH6LvVWQ8hH+dWLpdUGreYhdJy12Bu3kj3gbm2vVSWdFVs/rwYF ZIM/BimeFu/UImH8QXck7pKC3ce6fiuShZE/xA+LqfNjV6iE8XF86kJttjUmYnTWCDiU2NcJB6lE4 EhnZ040Gatzmzh75hHf5fWZk3C3fz1IkifRzdiLCHifC3fawJVDfw+mdDcX5BWqqTs1S9P91+eDN2 MkpBtxvz2vmfRIjhu0sQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m0luf-00ByQb-IT; Tue, 06 Jul 2021 14:19:01 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m0lub-00ByQE-Dd for linux-arm-kernel@lists.infradead.org; Tue, 06 Jul 2021 14:18:58 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 49AE611D4; Tue, 6 Jul 2021 07:18:51 -0700 (PDT) Received: from e120937-lin (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 219E73F73B; Tue, 6 Jul 2021 07:18:48 -0700 (PDT) Date: Tue, 6 Jul 2021 15:18:41 +0100 From: Cristian Marussi To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, virtualization@lists.linux-foundation.org, virtio-dev@lists.oasis-open.org Cc: sudeep.holla@arm.com, james.quinlan@broadcom.com, Jonathan.Cameron@Huawei.com, f.fainelli@gmail.com, etienne.carriere@linaro.org, vincent.guittot@linaro.org, souvik.chakravarty@arm.com, igor.skalkin@opensynergy.com, peter.hilber@opensynergy.com, alex.bennee@linaro.org, jean-philippe@linaro.org, mikhail.golubev@opensynergy.com, anton.yakovlev@opensynergy.com, Vasyl.Vavrychuk@opensynergy.com, Andriy.Tryshnivskyy@opensynergy.com Subject: Re: [PATCH v5 08/15] firmware: arm_scmi: Introduce optional support for delegated xfers Message-ID: <20210706141841.GG17807@e120937-lin> References: <20210705144914.35094-1-cristian.marussi@arm.com> <20210705144914.35094-9-cristian.marussi@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210705144914.35094-9-cristian.marussi@arm.com> User-Agent: Mutt/1.9.4 (2018-02-28) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210706_071857_547933_38C47CFF X-CRM114-Status: GOOD ( 21.70 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Jul 05, 2021 at 03:49:07PM +0100, Cristian Marussi wrote: > Some SCMI transports allow for more parallelism while handling SCMI > messages and as a result may have more complex inner workings than shared > memory based transports and they could need to maintain additional > transport-specific state information and data about the ongoing transfers. > Using the current SCMI core transport layer interface, additional effort > would be needed to keep such states and data in sync with the SCMI core. > > Allow an SCMI transport to optionally declare to be using delegated xfers > so that it can use a few SCMI core helper functions to query the core early > on in the RX path for any valid existing in-flight transfers matching a > specific message header or, alternatively, to transparently obtain a brand > new dedicated xfer to handle a notification message. > > In both cases the obtained xfer can be uniquely mapped to a specific xfer, > assured to be valid, through the means of the message header sequence > number acting as key. > > In this way such a transport can save its own transport specific envelope > into a private reference associated with the xfer before calling into the > core scmi_rx_callback() in the usual way. > > The scmi_rx_callback() does not need to be modified to carry additional > transport-specific ancillary data related to such message envelopes since > an unique natural association is established between the xfer and the > related message header. > > Existing transports that do not need anything of the above will continue > to work as before without any change. > > Signed-off-by: Cristian Marussi > --- Hi, as an afterthough (sigh...) on this patch of mine, I think that now, after all the support introduced earlier within this same series into the SCMI core (monotonic tokens and concurrency/out-of-order handling of responses), the additional complexity of this patch could NOT be needed anymore and I am actually experimenting dropping this patch as a whole and further simplifying the virtio transport rx logic, with the only caveat of having to modify scmi_rx_callback() prototype to allow for a new priv parameter to be optionally provided by the transport, thing that I avoided till now but it does not seem worth anymore. I'll post a new V6 on 5.14-rc1 with this patch reworked once fully tested and ruled out any unexpected surprise. Sorry for the noise. Thanks, Cristian _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel