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=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT 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 937FFC2B9F7 for ; Mon, 24 May 2021 23:15:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6D4CD61415 for ; Mon, 24 May 2021 23:15:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229693AbhEXXRI (ORCPT ); Mon, 24 May 2021 19:17:08 -0400 Received: from foss.arm.com ([217.140.110.172]:49002 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229547AbhEXXRH (ORCPT ); Mon, 24 May 2021 19:17:07 -0400 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 DC6546D; Mon, 24 May 2021 16:15:38 -0700 (PDT) Received: from e120937-lin.home (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id C2B6E3F73D; Mon, 24 May 2021 16:15:36 -0700 (PDT) From: Cristian Marussi To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.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, cristian.marussi@arm.com Subject: [PATCH 0/4] Review/Extend SCMI Transport Core layer Date: Tue, 25 May 2021 00:14:59 +0100 Message-Id: <20210524231503.34924-1-cristian.marussi@arm.com> X-Mailer: git-send-email 2.17.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi all, this short series is meant to review and extend a couple of SCMI transport core layer mechanisms in order to ease the interaction with more complex SCMI transport driver like the upcoming virtio-scmi. The commits in this series have not and *should not* have any impact or require any change in the currently existing SCMI transports. The two main principal area of change are: - introduce monotonically increasing message tokens: change the policy used by the OSPM agent to select sequence number for outgoing messages in order to minimize the re-use of recently utilized tokens so as to mitigate the possible misbehaviors on reception of late arrival 'ghost' reply from the platform, currently hard to identify and discard. More details and ASCII art of the involved logics follows in the related commit :D - introduce optional support for delegated xfers: expose a few helpers from the SCMI core transport layer that can be used by the transports to actively query the core for existing in-flight transactions already associated with a received message header or to obtain a brand new xfer to accommodate a just received notification. The general idea is to optionally let the transports process early and more of their transport specific payloads filling the xfer already naturally associated with the received message header, so that the transport specific implementations can get rid early-on of their specific message envelope structures (before even calling into the core scmi_rx_callback()) and so avoiding upfront the need to keep track of the state of such transport specific message envelopes till the core has processed them till completion or timeout. (while not modifying the signature of scmi_rx_callback)....any feedback even on a more sensible naming for this optional feature would be highly appreciated :D This, as said, is intended to be preparatory work for the rework and simplification of the WIP virtio-scmi series. The series is based on sudeep/for-next [1] on top of commit: commit a3b884cef873 ("firmware: arm_scmi: Add clock management to the SCMI power domain") Any feedback welcome. Thanks, Cristian --- [1]:https://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux.git/log/?h=for-next/scmi Cristian Marussi (4): firmware: arm_scmi: reset_rx_to_maxsz during async commands firmware: arm_scmi: Add support for type handling in common functions firmware: arm_scmi: Introduce monotonically increasing tokens firmware: arm_scmi: Introduce delegated xfers support drivers/firmware/arm_scmi/common.h | 43 +++- drivers/firmware/arm_scmi/driver.c | 390 ++++++++++++++++++++++++++--- 2 files changed, 393 insertions(+), 40 deletions(-) -- 2.17.1 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=-17.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable 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 8039EC2B9F7 for ; Tue, 25 May 2021 02:51:49 +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 3F99760698 for ; Tue, 25 May 2021 02:51:49 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3F99760698 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:MIME-Version:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date:Subject:Cc:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=IY+7V0lOtWKNUK9Ni3N9RVy2JnMk+YJzWN8CxWk6zyI=; b=i26SupkwI0nWeF 1tkncuvAd/100d8qHyKkGpnC9STsmyH3L5ym90Vdz69nq9844GzLxZimfT9b5S9gFzddoKqr5Qagl v0pWzDIDHiAhFoiNamYxSn7b2Lzkg4RS5ViGnXQyjtQJ0lnEsnRCWYsBUatvDh1Syk4Pef5zORMp2 Vx4SumnxvUCkOyrXbIczz7+DT7cnsXkGrtRgMoJltyIQFaDZtdUapJJt4/ZMLe3b4/OuLGIvJ3hVE KGaoL90lweoDEGpwQjksa2gHp9AJv83AW15RE4ZYoxChLErpdPC6iVsPxQPl1P2210puSLEMh8cFu tPLXobZ37VekmlB3mKkA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1llN8u-002zzg-99; Tue, 25 May 2021 02:50:05 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1llJnS-002ItF-EG for linux-arm-kernel@lists.infradead.org; Mon, 24 May 2021 23:15:44 +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 DC6546D; Mon, 24 May 2021 16:15:38 -0700 (PDT) Received: from e120937-lin.home (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id C2B6E3F73D; Mon, 24 May 2021 16:15:36 -0700 (PDT) From: Cristian Marussi To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.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, cristian.marussi@arm.com Subject: [PATCH 0/4] Review/Extend SCMI Transport Core layer Date: Tue, 25 May 2021 00:14:59 +0100 Message-Id: <20210524231503.34924-1-cristian.marussi@arm.com> X-Mailer: git-send-email 2.17.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210524_161542_583651_930E50C4 X-CRM114-Status: GOOD ( 11.46 ) 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: , MIME-Version: 1.0 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 Hi all, this short series is meant to review and extend a couple of SCMI transport core layer mechanisms in order to ease the interaction with more complex SCMI transport driver like the upcoming virtio-scmi. The commits in this series have not and *should not* have any impact or require any change in the currently existing SCMI transports. The two main principal area of change are: - introduce monotonically increasing message tokens: change the policy used by the OSPM agent to select sequence number for outgoing messages in order to minimize the re-use of recently utilized tokens so as to mitigate the possible misbehaviors on reception of late arrival 'ghost' reply from the platform, currently hard to identify and discard. More details and ASCII art of the involved logics follows in the related commit :D - introduce optional support for delegated xfers: expose a few helpers from the SCMI core transport layer that can be used by the transports to actively query the core for existing in-flight transactions already associated with a received message header or to obtain a brand new xfer to accommodate a just received notification. The general idea is to optionally let the transports process early and more of their transport specific payloads filling the xfer already naturally associated with the received message header, so that the transport specific implementations can get rid early-on of their specific message envelope structures (before even calling into the core scmi_rx_callback()) and so avoiding upfront the need to keep track of the state of such transport specific message envelopes till the core has processed them till completion or timeout. (while not modifying the signature of scmi_rx_callback)....any feedback even on a more sensible naming for this optional feature would be highly appreciated :D This, as said, is intended to be preparatory work for the rework and simplification of the WIP virtio-scmi series. The series is based on sudeep/for-next [1] on top of commit: commit a3b884cef873 ("firmware: arm_scmi: Add clock management to the SCMI power domain") Any feedback welcome. Thanks, Cristian --- [1]:https://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux.git/log/?h=for-next/scmi Cristian Marussi (4): firmware: arm_scmi: reset_rx_to_maxsz during async commands firmware: arm_scmi: Add support for type handling in common functions firmware: arm_scmi: Introduce monotonically increasing tokens firmware: arm_scmi: Introduce delegated xfers support drivers/firmware/arm_scmi/common.h | 43 +++- drivers/firmware/arm_scmi/driver.c | 390 ++++++++++++++++++++++++++--- 2 files changed, 393 insertions(+), 40 deletions(-) -- 2.17.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel