From patchwork Thu Jul 13 14:17:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 13312267 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 D4E2DC001DF for ; Thu, 13 Jul 2023 14:18:41 +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:MIME-Version: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=e0dS8UjOqr3x+UqFZZmRZPLR9xf3sdxbdTILyz5j5uM=; b=lYrBNI3UehOOsS zDjiu+7zNZzb29rzscUcAOF/WBb8jhoCEdwCKVR7CLBs59n9e9Zg1+KhiB19FCMj0nfMsSFY7+S56 6zwj5Et4NILED7Q4NzyJg/ck0UNmquipjrCM13qw6oWxEJnB8Rp6QhYX9BlJ8EuAlLPy270LqVsMl wu87OT1q2r7DUvCMTDmBh/ETfmJoHirIW4qk5Usma9+d2RBXdIcSgs3eGdTMohSH9LlCyRRnUNfhf UmpnvA/83nLQAdNgeAH4Fc5yR57gNH0FDugot1JakwTOFlnAMDkYpUAJFZ6/xMSvpxn++BODQ/rbo dUqv2JqQA7SuWP6zhgeg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qJx96-003XC4-0v; Thu, 13 Jul 2023 14:18:16 +0000 Received: from mail-lf1-x12c.google.com ([2a00:1450:4864:20::12c]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qJx92-003XAY-37 for linux-arm-kernel@lists.infradead.org; Thu, 13 Jul 2023 14:18:14 +0000 Received: by mail-lf1-x12c.google.com with SMTP id 2adb3069b0e04-4fba86f069bso1358693e87.3 for ; Thu, 13 Jul 2023 07:18:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1689257889; x=1691849889; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=ClKt2dqGr90pfJCDEIL5kBqRNqWrFunM9K2+lWl18hs=; b=NAj+jbiM9Tu8MCcU1PxC+4e3LRO6omJn8LCyx/dBLFTyE8OUFBYmRF50ww0iVxvayg fe1ZCuKEmCZEvhGiJ2mkjrfDfyaWlRiN5Zbncm73VFIEGrXvbwJPcUqLS7kpjE+BTf2s E/NfyAdJAQkJM9jVer6opth2ysJ1JJqWwG78PwsFs4TqCbf3agpNiGrjCbTJLWArl+e+ 7dwSvmpg89Y1qnZjsCZ5eNDuQFeLrq+0MccYzdfbOmKBvEiaxPtVYY70CJcRi+u7foIx 7+AHyjtgCQPqP15l5OHGXRre1KP3u7DYUWy/r7ZO+OS1GnyHiqJi35SEQhwtw5CWaEu9 aljg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689257889; x=1691849889; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ClKt2dqGr90pfJCDEIL5kBqRNqWrFunM9K2+lWl18hs=; b=GYAHq5F0ng0Nf5M9zwv5lPAiZpIw8RY26mmNBOWbCqLb6sQFmicgOnBcwBe/zxACmR WmWtYGwRWb5+/7JxmAShSGibk5ThKnCNTjIPlU8/iAJKKeQ5depPxsX5AIr9CTyk5tXn YeK4+qL4+ndkwT9VJv5Pi18uAJ6m1/ljUVJCMNXEB0LNdFqMBLnGt9VioBnQLVo2a5wz UiRAot8UlmVgTEzlHpTFOtQmEDxiDsZ9S7k3baijjwbRbi/n4C4Xk/xCJd4hSksfJFgx C0cpdn++/Ph/zym7JfFEpygcvHecVbZoSi2WGFZS79hrNXwbWlFoWoo/wWo2rTVOiOX5 d/gg== X-Gm-Message-State: ABy/qLanyLH3X6Rbih0KfWosOzKMXJ2vtj1+JfFNeN0RKBa63knWPy+E Cbw7pLJrWgA85n/GtNVFCWW3RA== X-Google-Smtp-Source: APBJJlENcUAaIeNwgSOtgl6xNx6O2vsFm/Y12z+f41X65o7DgK13iulXHR6f0m0EzwNjn8xuzHvfaQ== X-Received: by 2002:ac2:5984:0:b0:4fb:82d8:994d with SMTP id w4-20020ac25984000000b004fb82d8994dmr1223532lfn.42.1689257888710; Thu, 13 Jul 2023 07:18:08 -0700 (PDT) Received: from uffe-tuxpro14.. (h-94-254-63-18.NA.cust.bahnhof.se. [94.254.63.18]) by smtp.gmail.com with ESMTPSA id w28-20020ac2599c000000b004fb759964a9sm1132426lfn.168.2023.07.13.07.18.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Jul 2023 07:18:07 -0700 (PDT) From: Ulf Hansson To: Sudeep Holla , Cristian Marussi , Viresh Kumar , Nishanth Menon , Stephen Boyd Cc: Nikunj Kela , Prasad Sodagudi , Alexandre Torgue , Ulf Hansson , linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 00/11] arm_scmi/cpufreq: Add generic performance scaling support Date: Thu, 13 Jul 2023 16:17:27 +0200 Message-Id: <20230713141738.23970-1-ulf.hansson@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230713_071813_011133_EAA3F3F3 X-CRM114-Status: GOOD ( 15.02 ) 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 Changes in v2: - Split up the series, to get the basic support in place as the first step. The part that remains is the integration with the OPP library, to allow consumer drivers to change performance level using the OPP lib. - Re-based on top v6.5-rc1. - Other changes will be described for each patch. The current SCMI performance scaling support is limited to cpufreq. This series extends the support, so it can be used for all kind of devices and not only for CPUs. The changes are spread over a couple of different subsystems, although the changes that affects the other subsystems than the arm_scmi directory are mostly smaller. The series is based upon v6.5-rc1. Note that, I am runing this on the Qemu virt platform with Optee running an SCMI server. If you want some more details about my test setup, I am certainly open to share that with you! Looking forward to your feedback! Kind regards Ulf Hansson Ulf Hansson (11): firmware: arm_scmi: Extend perf protocol ops to get number of domains firmware: arm_scmi: Extend perf protocol ops to get information of a domain cpufreq: scmi: Prepare to move OF parsing of domain-id to cpufreq firmware: arm_scmi: Align perf ops to use domain-id as in-parameter firmware: arm_scmi: Drop redundant ->device_domain_id() from perf ops cpufreq: scmi: Avoid one OF parsing in scmi_get_sharing_cpus() PM: domains: Allow genpd providers to manage OPP tables directly by its FW dt-bindings: firmware: arm,scmi: Extend bindings for protocol@13 cpufreq: scmi: Add support to parse domain-id using #power-domain-cells firmware: arm_scmi: Add the SCMI performance domain cpufreq: scmi: Drop redundant ifdef in scmi_cpufreq_probe() .../bindings/firmware/arm,scmi.yaml | 11 +- drivers/base/power/domain.c | 11 +- drivers/cpufreq/scmi-cpufreq.c | 48 ++++-- drivers/firmware/arm_scmi/Kconfig | 12 ++ drivers/firmware/arm_scmi/Makefile | 1 + drivers/firmware/arm_scmi/perf.c | 60 ++++--- drivers/firmware/arm_scmi/scmi_perf_domain.c | 155 ++++++++++++++++++ include/linux/pm_domain.h | 5 + include/linux/scmi_protocol.h | 18 +- 9 files changed, 262 insertions(+), 59 deletions(-) create mode 100644 drivers/firmware/arm_scmi/scmi_perf_domain.c