From patchwork Fri Oct 18 08:05:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cristian Marussi X-Patchwork-Id: 13841354 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 7C307D3C55E for ; Fri, 18 Oct 2024 08:08:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=LnNpNOA6Mr4VG99bL9ZI4AJnR9XB4VPk+W+y2BcNTRc=; b=liKQ5jR8AySS9yom8KaBgeM2M7 E5cdJy98ScC9HBfBlaPz8c/LpKWUmuh3zRBXHJSgXonOcFz6VPbS/9YONlDl96HS9I+y9EQ5cHOP/ NyLWta90Dodn+wCBHAjx6YqYseKRnHWDldb8HDZZu5ml30+GyJW1fKE+qLuBAjGxE9Leis0to43i7 qsrcy5IDtZK6fGt6vv6r2Dq/mi5tcPO/RW8N3Vc5Oy6stjQmnn/eHcvTmuxu3ydqz9zpjSU8pIymk B0RZSwNArvqHe7qwbqB/Y/EZ50pWS34tuDZI0rsP2VgxXNe3qmomilB4rz+G0ZbK3TuLKWery+ASK Zwd6hVAg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t1i2I-0000000HRpM-2TWq; Fri, 18 Oct 2024 08:08:38 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t1i0c-0000000HRHb-1zVt for linux-arm-kernel@lists.infradead.org; Fri, 18 Oct 2024 08:06:56 +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 B6D5FFEC; Fri, 18 Oct 2024 01:07:20 -0700 (PDT) Received: from pluto.. (usa-sjc-mx-foss1.foss.arm.com [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id BB4953F528; Fri, 18 Oct 2024 01:06:48 -0700 (PDT) From: Cristian Marussi To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, arm-scmi@vger.kernel.org Cc: sudeep.holla@arm.com, james.quinlan@broadcom.com, f.fainelli@gmail.com, vincent.guittot@linaro.org, etienne.carriere@st.com, peng.fan@oss.nxp.com, michal.simek@amd.com, quic_sibis@quicinc.com, quic_nkela@quicinc.com, dan.carpenter@linaro.org, Cristian Marussi , Rob Herring , Krzysztof Kozlowski Subject: [PATCH 0/5] Expose SCMI Transport properties Date: Fri, 18 Oct 2024 09:05:57 +0100 Message-ID: <20241018080602.3952869-1-cristian.marussi@arm.com> X-Mailer: git-send-email 2.46.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241018_010654_614716_C762E660 X-CRM114-Status: GOOD ( 10.84 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi, SCMI transports are characterized by a number of properties: the values assumed by some of them tightly depend on the choices taken at design time and on the overall archiecture of the specific platform: things like timeouts, maximum message size and number of in-flight messages are closely tied to the architecture of the platform like number of SCMI agents on the system, physical memory available to the SCMI server...so on and so forth. Moreover, since the SCMI specification does not delve into the details of specific transports, that are, indeed, outside the scope of the specification itself, such characteristics are NOT even discoverable at run-time on an SCMI platform. Currently such properties are simple default values defined at build time, but the increasing number and variety of platforms using SCMI with a wide range of designs has increased the need to have a way to describe such properties across all these platforms. This series, at first removes a few ambiguities in how some of the current built-in properties are interpreted, then lays out a way for the core to propagate back to the transports any possible setting gathered at runtime from devicetree and finally introduce a pair of new properties used to describe such per-platform transport characteristics. Based on v6.12-rc3. Any feedback welcome. Thanks, Cristian Cristian Marussi (5): firmware: arm_scmi: Account for SHMEM memory overhead firmware: arm_scmi: Calculate virtio PDU max size dynamically dt-bindings: firmware: arm,scmi: Introduce more transport properties firmware: arm_scmi: Use max_msg and max_msg_size devicetree properties firmware: arm_scmi: Relocate atomic_threshold to scmi_desc .../bindings/firmware/arm,scmi.yaml | 16 +++++++ drivers/firmware/arm_scmi/common.h | 11 ++++- drivers/firmware/arm_scmi/driver.c | 42 +++++++++++-------- drivers/firmware/arm_scmi/shmem.c | 7 ++++ .../firmware/arm_scmi/transports/mailbox.c | 4 +- drivers/firmware/arm_scmi/transports/optee.c | 2 +- drivers/firmware/arm_scmi/transports/smc.c | 4 +- drivers/firmware/arm_scmi/transports/virtio.c | 15 +++---- 8 files changed, 72 insertions(+), 29 deletions(-)