From patchwork Mon Oct 21 17:07:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cristian Marussi X-Patchwork-Id: 13844471 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 95DBBD0E6C5 for ; Mon, 21 Oct 2024 17:18:39 +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=arY20lFPzE9mTpKVnOFDk1uG2RKilabyeJBF1+vol/c=; b=OHk9lkEOFgVK6yyHjHB8utFNT2 5vmTTAEmLmEIukTliSJm2i757u5qkabXNki2R9CSWmH0nleRe+EKZyNTXwkZ0sgUfIH9fWi7d2zmJ sovxtvzoT2yPlZ9B3EKAww5GDJLfxJyoQN60oi2ydueuzQs3hptHRPco0bA43IYL2hvSdY3YuNhXs JYLy01Tv4lFtcwrXi2rjPVPhpu4MlG5olWQp+IlWUy91cQ3Up2iRX/znOUqK9siXlplxLZH7DsXpW FsOMIZj/zKGT9nL8yMQY9EXsja728csLmHyai8tNRXl+6S0o2Wkps6rnzMu3nFsoj2KA+65FD6685 aenYT+bA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t2w35-0000000865W-0A93; Mon, 21 Oct 2024 17:18:31 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t2vsr-00000008495-0Njo for linux-arm-kernel@lists.infradead.org; Mon, 21 Oct 2024 17:07: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 A1DAFDA7; Mon, 21 Oct 2024 10:08:22 -0700 (PDT) Received: from pluto.fritz.box (usa-sjc-mx-foss1.foss.arm.com [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 9EC8E3F528; Mon, 21 Oct 2024 10:07:50 -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 , Conor Dooley Subject: [PATCH v2 0/5] Expose SCMI Transport properties Date: Mon, 21 Oct 2024 18:07:21 +0100 Message-ID: <20241021170726.2564329-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-20241021_100757_338277_06C482E6 X-CRM114-Status: GOOD ( 11.93 ) 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 --- v1 --> v2 - added arm, vendor prefix to new DT bindings props - clarified arm,max-msg bindings meaning - removed useless warning on advised minimum size on arm,max-msg-size - fixed maintainers CC list - removed CCed maintainers from commit log - using new prefixed arm, props 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 | 15 +++++++ 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, 71 insertions(+), 29 deletions(-)