Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp2912257iog; Mon, 27 Jun 2022 05:37:27 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vZF0CZOQM+ikGoOM7+HH+CUHvabsoJ+csCnhZn1wbzhEVaf2nL/sMtT1uL+Gy1iFmn5yfg X-Received: by 2002:a05:6402:2392:b0:435:824e:b661 with SMTP id j18-20020a056402239200b00435824eb661mr16352081eda.13.1656333447757; Mon, 27 Jun 2022 05:37:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656333447; cv=none; d=google.com; s=arc-20160816; b=tWRcYLZMm1w+SQ8f2bCv59oQdexvHrjThprPmcD5DKzKW8XjLs45Vu7gUiF5TZDTed pc/N0RFORLMmmokP9BLkgGwRoAdl2GZDWG2OW81A11SF54KAQ4/oOt0Z2wdnlsw1Yxv6 JVsq4CBto0de1TQYydXWHrK7/SwinnMBGtDcI20s7MmJKOEaLHltdzAnZFDUF/knl8M4 s3vEBuOe57rr3ZJFx2e/yyMiNpSuY1gvZcvG0ZYgAMubXl1n16WLpQWV81NrV4eoV8/c S8SNFZhO6LMYnrSottpKCyOQboRFH20fLX6ogkkTTHg+K9SMuxekxcbi1fK78iOcRvH3 TLcg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=g3XO1PbTF7UyWN4GfQIOGswZAOAYIUPMSWDcRFxMVbs=; b=01MdU9PU2rWUahL6VssSywSAkjv4SzNGBlkI/v/D1ziCrPPLXiPMU6A+Sqi3bQ1Uy4 5wq1A4GjPP088qj1Q4DA6uGq1+rQf+jIqtkrYVEWvxmp8MmYTBw3JrQintb4OP0doogX 6cCjScEnxLROIdqwl2N3Ccmh5v9sXPso8D9LRfKeypxCMd/F4D9kY7tEsSmDkEoMwfqO c5gZMv90YwZ/4jHK8zdTZWYIF54n5VJbtS72k4fqc5ev25+BtwNMe81SNxHCA6kb0ZzJ tnRBpaYhI0+MBwweDwD3/vTWF5dt9JPj3zUaMyxWQlcjlY4E4vVraC+1xMNgwaygI/iE FZ3Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id nd26-20020a170907629a00b0072402ea9648si12917210ejc.748.2022.06.27.05.37.01; Mon, 27 Jun 2022 05:37:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235728AbiF0Mbb (ORCPT + 99 others); Mon, 27 Jun 2022 08:31:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34296 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236003AbiF0MbI (ORCPT ); Mon, 27 Jun 2022 08:31:08 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 219BB766F for ; Mon, 27 Jun 2022 05:31:08 -0700 (PDT) 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 15B69176C; Mon, 27 Jun 2022 05:31:08 -0700 (PDT) Received: from e120937-lin.home (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id EE2CB3F792; Mon, 27 Jun 2022 05:31:05 -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, daniel.lezcano@linaro.org, tarek.el-sherbiny@arm.com, adrian.slatineanu@arm.com, souvik.chakravarty@arm.com, wleavitt@marvell.com, wbartczak@marvell.com, Cristian Marussi Subject: [PATCH v3 7/9] firmware: arm_scmi: Use FastChannel tracing Date: Mon, 27 Jun 2022 13:30:36 +0100 Message-Id: <20220627123038.1427067-8-cristian.marussi@arm.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220627123038.1427067-1-cristian.marussi@arm.com> References: <20220627123038.1427067-1-cristian.marussi@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Make use of SCMI FastChannel event tracing. Signed-off-by: Cristian Marussi --- drivers/firmware/arm_scmi/perf.c | 10 ++++++++++ drivers/firmware/arm_scmi/powercap.c | 10 ++++++++++ 2 files changed, 20 insertions(+) diff --git a/drivers/firmware/arm_scmi/perf.c b/drivers/firmware/arm_scmi/perf.c index 521458fda355..64ea2d2f2875 100644 --- a/drivers/firmware/arm_scmi/perf.c +++ b/drivers/firmware/arm_scmi/perf.c @@ -16,6 +16,8 @@ #include #include +#include + #include "protocols.h" #include "notify.h" @@ -363,6 +365,8 @@ static int scmi_perf_limits_set(const struct scmi_protocol_handle *ph, if (dom->fc_info && dom->fc_info[PERF_FC_LIMIT].set_addr) { struct scmi_fc_info *fci = &dom->fc_info[PERF_FC_LIMIT]; + trace_scmi_fc_call(SCMI_PROTOCOL_PERF, PERF_LIMITS_SET, + domain, min_perf, max_perf); iowrite32(max_perf, fci->set_addr); iowrite32(min_perf, fci->set_addr + 4); ph->hops->fastchannel_db_ring(fci->set_db); @@ -409,6 +413,8 @@ static int scmi_perf_limits_get(const struct scmi_protocol_handle *ph, *max_perf = ioread32(fci->get_addr); *min_perf = ioread32(fci->get_addr + 4); + trace_scmi_fc_call(SCMI_PROTOCOL_PERF, PERF_LIMITS_GET, + domain, *min_perf, *max_perf); return 0; } @@ -446,6 +452,8 @@ static int scmi_perf_level_set(const struct scmi_protocol_handle *ph, if (dom->fc_info && dom->fc_info[PERF_FC_LEVEL].set_addr) { struct scmi_fc_info *fci = &dom->fc_info[PERF_FC_LEVEL]; + trace_scmi_fc_call(SCMI_PROTOCOL_PERF, PERF_LEVEL_SET, + domain, level, 0); iowrite32(level, fci->set_addr); ph->hops->fastchannel_db_ring(fci->set_db); return 0; @@ -484,6 +492,8 @@ static int scmi_perf_level_get(const struct scmi_protocol_handle *ph, if (dom->fc_info && dom->fc_info[PERF_FC_LEVEL].get_addr) { *level = ioread32(dom->fc_info[PERF_FC_LEVEL].get_addr); + trace_scmi_fc_call(SCMI_PROTOCOL_PERF, PERF_LEVEL_GET, + domain, *level, 0); return 0; } diff --git a/drivers/firmware/arm_scmi/powercap.c b/drivers/firmware/arm_scmi/powercap.c index ed61df6a68c4..7bd6fab35650 100644 --- a/drivers/firmware/arm_scmi/powercap.c +++ b/drivers/firmware/arm_scmi/powercap.c @@ -12,6 +12,8 @@ #include #include +#include + #include "protocols.h" #include "notify.h" @@ -323,6 +325,8 @@ static int scmi_powercap_cap_get(const struct scmi_protocol_handle *ph, dom = pi->powercaps + domain_id; if (dom->fc_info && dom->fc_info[POWERCAP_FC_CAP].get_addr) { *power_cap = ioread32(dom->fc_info[POWERCAP_FC_CAP].get_addr); + trace_scmi_fc_call(SCMI_PROTOCOL_POWERCAP, POWERCAP_CAP_GET, + domain_id, *power_cap, 0); return 0; } @@ -388,6 +392,8 @@ static int scmi_powercap_cap_set(const struct scmi_protocol_handle *ph, iowrite32(power_cap, fci->set_addr); ph->hops->fastchannel_db_ring(fci->set_db); + trace_scmi_fc_call(SCMI_PROTOCOL_POWERCAP, POWERCAP_CAP_SET, + domain_id, power_cap, 0); return 0; } @@ -427,6 +433,8 @@ static int scmi_powercap_pai_get(const struct scmi_protocol_handle *ph, dom = pi->powercaps + domain_id; if (dom->fc_info && dom->fc_info[POWERCAP_FC_PAI].get_addr) { *pai = ioread32(dom->fc_info[POWERCAP_FC_PAI].get_addr); + trace_scmi_fc_call(SCMI_PROTOCOL_POWERCAP, POWERCAP_PAI_GET, + domain_id, *pai, 0); return 0; } @@ -469,6 +477,8 @@ static int scmi_powercap_pai_set(const struct scmi_protocol_handle *ph, if (pc->fc_info && pc->fc_info[POWERCAP_FC_PAI].set_addr) { struct scmi_fc_info *fci = &pc->fc_info[POWERCAP_FC_PAI]; + trace_scmi_fc_call(SCMI_PROTOCOL_POWERCAP, POWERCAP_PAI_SET, + domain_id, pai, 0); iowrite32(pai, fci->set_addr); ph->hops->fastchannel_db_ring(fci->set_db); return 0; -- 2.32.0