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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 26310C433F5 for ; Tue, 14 Dec 2021 10:52:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233248AbhLNKwq (ORCPT ); Tue, 14 Dec 2021 05:52:46 -0500 Received: from foss.arm.com ([217.140.110.172]:51734 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233235AbhLNKwp (ORCPT ); Tue, 14 Dec 2021 05:52:45 -0500 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 7DE246D; Tue, 14 Dec 2021 02:52:44 -0800 (PST) Received: from e120937-lin (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id D97DA3F5A1; Tue, 14 Dec 2021 02:52:42 -0800 (PST) Date: Tue, 14 Dec 2021 10:52:40 +0000 From: Cristian Marussi To: Sudeep Holla Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, james.quinlan@broadcom.com, Jonathan.Cameron@Huawei.com, f.fainelli@gmail.com, etienne.carriere@linaro.org, vincent.guittot@linaro.org, souvik.chakravarty@arm.com Subject: Re: [PATCH v7 08/16] firmware: arm_scmi: Add sync_cmds_atomic_replies transport flag Message-ID: <20211214105240.GF6207@e120937-lin> References: <20211129191156.29322-1-cristian.marussi@arm.com> <20211129191156.29322-9-cristian.marussi@arm.com> <20211213115437.23ecitnqztx5yl7g@bogus> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211213115437.23ecitnqztx5yl7g@bogus> User-Agent: Mutt/1.9.4 (2018-02-28) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Dec 13, 2021 at 11:54:37AM +0000, Sudeep Holla wrote: > On Mon, Nov 29, 2021 at 07:11:48PM +0000, Cristian Marussi wrote: > > Add a flag to let the transport signal to the core if its handling of sync > > command implies that, after .send_message has returned successfully, the > > requested command can be assumed to be fully and completely executed on > > SCMI platform side so that any possible response value is already > > immediately available to be retrieved by a .fetch_response: in other words > > the polling phase can be skipped in such a case and the response values > > accessed straight away. > > > > Note that all of the above applies only when polling mode of operation was > > selected by the core: if instead a completion IRQ was found to be available > > the normal response processing path based on completions will still be > > followed. > > > > Signed-off-by: Cristian Marussi > > --- > > v5 --> v6 > > - added polling_capable helper flag > > v4 --> v5 > > - removed RFC tag > > - consider sync_cmds_atomic_replies flag when deciding if polling is to be > > supported and .poll_done() is not provided. > > - reviewed commit message > > --- > > drivers/firmware/arm_scmi/common.h | 8 ++++++ > > drivers/firmware/arm_scmi/driver.c | 43 +++++++++++++++++++++++------- > > 2 files changed, 41 insertions(+), 10 deletions(-) > > > > diff --git a/drivers/firmware/arm_scmi/common.h b/drivers/firmware/arm_scmi/common.h > > index 99b74f4d39b6..bf25f0e89c78 100644 > > --- a/drivers/firmware/arm_scmi/common.h > > +++ b/drivers/firmware/arm_scmi/common.h > > @@ -412,6 +412,13 @@ struct scmi_device *scmi_child_dev_find(struct device *parent, > > * @max_msg_size: Maximum size of data per message that can be handled. > > * @force_polling: Flag to force this whole transport to use SCMI core polling > > * mechanism instead of completion interrupts even if available. > > + * @sync_cmds_atomic_replies: Flag to indicate that the transport assures > > + * synchronous-command messages are atomically > > + * completed on .send_message: no need to poll > > + * actively waiting for a response. > > Not sure if atomic is right term to use. It is atomic w.r.t OSPM though. > Can we just say sync_cmd_complete_on_ret or something similar. > Yes, I really never liked the naming so I'll happily take you suggestion :D Thanks, Cristian 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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id DF083C433EF for ; Tue, 14 Dec 2021 10:54:31 +0000 (UTC) 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=2dgiN+Xc4RJu1AsWnaNZp13sfbmMFfZj60eatzgkCvs=; b=k51unkg3mLpQmC mpsD7YyDRtbiX6wu86JuX7hSR7Bh4JXvTeQfJViLPGAQaWgy0SQYZ9wP6LMIjkyYBAriYPbr++QPU 8T+MRFg08ZBWbCnb3sl3p/SK8T6zCs6a9VqajEULHJf8dJ57Vz5OrLDcGR+YgrhK7ua+wQIx13yij xGAVZLPupyio3ijWtag7vbtbN5GWgvBHIau9upZiK/RiswNqRmYkIDF9K/vu8ilEEdd1Cu3SVR+mY efvLX6J9/ud3Y8hNwKoNPbNdTTYlgpzDML6HRiv6dF1cMJ7BoQg71CEJ2GI4M+80pAJEG4GTq90Y1 gqRCZ5pabO1nSQ5lS/eQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mx5QP-00DYYi-MM; Tue, 14 Dec 2021 10:52:49 +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 1mx5QL-00DYXd-Pa for linux-arm-kernel@lists.infradead.org; Tue, 14 Dec 2021 10:52:47 +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 7DE246D; Tue, 14 Dec 2021 02:52:44 -0800 (PST) Received: from e120937-lin (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id D97DA3F5A1; Tue, 14 Dec 2021 02:52:42 -0800 (PST) Date: Tue, 14 Dec 2021 10:52:40 +0000 From: Cristian Marussi To: Sudeep Holla Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, james.quinlan@broadcom.com, Jonathan.Cameron@Huawei.com, f.fainelli@gmail.com, etienne.carriere@linaro.org, vincent.guittot@linaro.org, souvik.chakravarty@arm.com Subject: Re: [PATCH v7 08/16] firmware: arm_scmi: Add sync_cmds_atomic_replies transport flag Message-ID: <20211214105240.GF6207@e120937-lin> References: <20211129191156.29322-1-cristian.marussi@arm.com> <20211129191156.29322-9-cristian.marussi@arm.com> <20211213115437.23ecitnqztx5yl7g@bogus> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20211213115437.23ecitnqztx5yl7g@bogus> 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-20211214_025245_902098_24C1D07F X-CRM114-Status: GOOD ( 25.23 ) 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, Dec 13, 2021 at 11:54:37AM +0000, Sudeep Holla wrote: > On Mon, Nov 29, 2021 at 07:11:48PM +0000, Cristian Marussi wrote: > > Add a flag to let the transport signal to the core if its handling of sync > > command implies that, after .send_message has returned successfully, the > > requested command can be assumed to be fully and completely executed on > > SCMI platform side so that any possible response value is already > > immediately available to be retrieved by a .fetch_response: in other words > > the polling phase can be skipped in such a case and the response values > > accessed straight away. > > > > Note that all of the above applies only when polling mode of operation was > > selected by the core: if instead a completion IRQ was found to be available > > the normal response processing path based on completions will still be > > followed. > > > > Signed-off-by: Cristian Marussi > > --- > > v5 --> v6 > > - added polling_capable helper flag > > v4 --> v5 > > - removed RFC tag > > - consider sync_cmds_atomic_replies flag when deciding if polling is to be > > supported and .poll_done() is not provided. > > - reviewed commit message > > --- > > drivers/firmware/arm_scmi/common.h | 8 ++++++ > > drivers/firmware/arm_scmi/driver.c | 43 +++++++++++++++++++++++------- > > 2 files changed, 41 insertions(+), 10 deletions(-) > > > > diff --git a/drivers/firmware/arm_scmi/common.h b/drivers/firmware/arm_scmi/common.h > > index 99b74f4d39b6..bf25f0e89c78 100644 > > --- a/drivers/firmware/arm_scmi/common.h > > +++ b/drivers/firmware/arm_scmi/common.h > > @@ -412,6 +412,13 @@ struct scmi_device *scmi_child_dev_find(struct device *parent, > > * @max_msg_size: Maximum size of data per message that can be handled. > > * @force_polling: Flag to force this whole transport to use SCMI core polling > > * mechanism instead of completion interrupts even if available. > > + * @sync_cmds_atomic_replies: Flag to indicate that the transport assures > > + * synchronous-command messages are atomically > > + * completed on .send_message: no need to poll > > + * actively waiting for a response. > > Not sure if atomic is right term to use. It is atomic w.r.t OSPM though. > Can we just say sync_cmd_complete_on_ret or something similar. > Yes, I really never liked the naming so I'll happily take you suggestion :D Thanks, Cristian _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel