From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2367739C010; Wed, 1 Apr 2026 09:54:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775037266; cv=none; b=tQCRsgI3C0VroEoozw9louCWmZ6QsMbZTsgxtO/A08T9IYq1LmKyveGSgXPRUiGnx15XQqgypIa6VJfioZkGNWaVEmd00RDIJFwSzaSS9dRk+o6j+HQK4pazzb478rzUBAefIRfz2PSp07p9IeqnbhIttmffMvF58VxHh5I0nn8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775037266; c=relaxed/simple; bh=Z86kOnnBm1gWixz6CzNzr8B06NC0kP36178gXNrwAZA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=m73PyEREVTt4H0jStnxY8s740HIObZHB2s2+q9F82ui/c/jDRrI8N8+IziWOTclRwwpBIgRdqtGT0kAN2WKHYZ4pwbseUiTTyZrjAFJvHf6tHr2rhH2p6zaqw+dQuQpXUPG9X9LnWU4vzw6mZ/lXEe78D/u1U8T5/FTZdACt4/U= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.b=lhIe1bDR; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.b="lhIe1bDR" 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 DE42E2E99; Wed, 1 Apr 2026 02:54:11 -0700 (PDT) Received: from donnerap.manchester.arm.com (donnerap.manchester.arm.com [10.33.8.81]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id B0E203F7D8; Wed, 1 Apr 2026 02:54:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=arm.com; s=foss; t=1775037257; bh=Z86kOnnBm1gWixz6CzNzr8B06NC0kP36178gXNrwAZA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lhIe1bDRbXku33FEGc7XCwVswbAOhStW/owtFNaSquYH8yg+aQO9C3SPzBtSjn3ML SHE1PJW3PijRF5SFrdHBW2tGjFatZLWBEByemrTVbcIz0mgaq3pQyILtJTRk3Otcda EY8nUscuTAt/IGvQXPI/fA6X28c0oW7/xEuuxlL8= From: Philip Radford To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, arm-scmi@vger.kernel.org, linux-pm@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, dan.carpenter@linaro.org, d-gole@ti.com, souvik.chakravarty@arm.com, Cristian Marussi , Philip Radford Subject: [PATCH v4 07/11] include: trace: Add new parameter to trace_scmi_fc_call Date: Wed, 1 Apr 2026 10:53:45 +0100 Message-ID: <20260401095349.2217840-8-philip.radford@arm.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260401095349.2217840-1-philip.radford@arm.com> References: <20260401095349.2217840-1-philip.radford@arm.com> Precedence: bulk X-Mailing-List: linux-pm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Cristian Marussi Since SCMIv4.0 some of the supported Fastchannels can be configured using an additional parameter like CPL_ID or Capability_ID. Add equivalent support in the SCMI fastchannel traces to printout also such parameter and fix all the existent call sites. When such parameter is not used, it will simply show up as zero. Signed-off-by: Cristian Marussi Signed-off-by: Philip Radford --- drivers/firmware/arm_scmi/perf.c | 8 ++++---- drivers/firmware/arm_scmi/powercap.c | 12 +++++++----- include/trace/events/scmi.h | 12 +++++++----- 3 files changed, 18 insertions(+), 14 deletions(-) diff --git a/drivers/firmware/arm_scmi/perf.c b/drivers/firmware/arm_scmi/perf.c index 7f283f457e02..88d614e3184b 100644 --- a/drivers/firmware/arm_scmi/perf.c +++ b/drivers/firmware/arm_scmi/perf.c @@ -552,7 +552,7 @@ static int __scmi_perf_limits_set(const struct scmi_protocol_handle *ph, struct scmi_fc_info *fci = &dom->fc_info[PERF_FC_LIMIT]; trace_scmi_fc_call(SCMI_PROTOCOL_PERF, PERF_LIMITS_SET, - dom->id, min_perf, max_perf); + dom->id, 0, 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); @@ -636,7 +636,7 @@ 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, - dom->id, *min_perf, *max_perf); + dom->id, 0, *min_perf, *max_perf); return 0; } @@ -706,7 +706,7 @@ static int __scmi_perf_level_set(const struct scmi_protocol_handle *ph, struct scmi_fc_info *fci = &dom->fc_info[PERF_FC_LEVEL]; trace_scmi_fc_call(SCMI_PROTOCOL_PERF, PERF_LEVEL_SET, - dom->id, level, 0); + dom->id, 0, level, 0); iowrite32(level, fci->set_addr); ph->hops->fastchannel_db_ring(fci->set_db); return 0; @@ -769,7 +769,7 @@ 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, - dom->id, *level, 0); + dom->id, 0, *level, 0); return 0; } diff --git a/drivers/firmware/arm_scmi/powercap.c b/drivers/firmware/arm_scmi/powercap.c index b9d50f4e8ae5..86262eb0f34a 100644 --- a/drivers/firmware/arm_scmi/powercap.c +++ b/drivers/firmware/arm_scmi/powercap.c @@ -597,7 +597,7 @@ static int __scmi_powercap_cap_get(const struct scmi_protocol_handle *ph, dom->cpli[cpl_id].fc_info[POWERCAP_FC_CAP].get_addr) { *power_cap = ioread32(dom->cpli[cpl_id].fc_info[POWERCAP_FC_CAP].get_addr); trace_scmi_fc_call(SCMI_PROTOCOL_POWERCAP, POWERCAP_CAP_GET, - dom->id, *power_cap, 0); + dom->id, cpl_id, *power_cap, 0); return 0; } @@ -730,7 +730,7 @@ 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); + domain_id, cpl_id, power_cap, 0); ret = 0; } else { ret = pi->xfer_cap_set(ph, pc, cpl_id, power_cap, ignore_dresp); @@ -835,7 +835,8 @@ static int scmi_powercap_avg_interval_get(const struct scmi_protocol_handle *ph, POWERCAP_PAI_GET : POWERCAP_CAI_GET; *val = ioread32(dom->cpli[cpl_id].fc_info[POWERCAP_FC_XAI].get_addr); - trace_scmi_fc_call(SCMI_PROTOCOL_POWERCAP, trace_cmd, domain_id, *val, 0); + trace_scmi_fc_call(SCMI_PROTOCOL_POWERCAP, trace_cmd, domain_id, + cpl_id, *val, 0); return 0; } @@ -908,7 +909,8 @@ static int scmi_powercap_avg_interval_set(const struct scmi_protocol_handle *ph, POWERCAP_PAI_SET : POWERCAP_CAI_SET; struct scmi_fc_info *fci = &pc->cpli[cpl_id].fc_info[POWERCAP_FC_XAI]; - trace_scmi_fc_call(SCMI_PROTOCOL_POWERCAP, trace_cmd, domain_id, ivl, 0); + trace_scmi_fc_call(SCMI_PROTOCOL_POWERCAP, trace_cmd, domain_id, + cpl_id, ivl, 0); iowrite32(ivl, fci->set_addr); ph->hops->fastchannel_db_ring(fci->set_db); return 0; @@ -961,7 +963,7 @@ static int scmi_powercap_measurements_get(const struct scmi_protocol_handle *ph, /* See SCMIv4.0 3.10.2 - Payload is 32bit ONLY avg_power */ *avg_ivl = 0; trace_scmi_fc_call(SCMI_PROTOCOL_POWERCAP, POWERCAP_MEASUREMENTS_GET, - pc->id, *avg_power, *avg_ivl); + pc->id, 0, *avg_power, *avg_ivl); return 0; } diff --git a/include/trace/events/scmi.h b/include/trace/events/scmi.h index 703b7bb68e44..b03da7323d04 100644 --- a/include/trace/events/scmi.h +++ b/include/trace/events/scmi.h @@ -10,13 +10,14 @@ #define TRACE_SCMI_MAX_TAG_LEN 6 TRACE_EVENT(scmi_fc_call, - TP_PROTO(u8 protocol_id, u8 msg_id, u32 res_id, u32 val1, u32 val2), - TP_ARGS(protocol_id, msg_id, res_id, val1, val2), + TP_PROTO(u8 protocol_id, u8 msg_id, u32 res_id, u32 sub_id, u32 val1, u32 val2), + TP_ARGS(protocol_id, msg_id, res_id, sub_id, val1, val2), TP_STRUCT__entry( __field(u8, protocol_id) __field(u8, msg_id) __field(u32, res_id) + __field(u32, sub_id) __field(u32, val1) __field(u32, val2) ), @@ -25,13 +26,14 @@ TRACE_EVENT(scmi_fc_call, __entry->protocol_id = protocol_id; __entry->msg_id = msg_id; __entry->res_id = res_id; + __entry->sub_id = sub_id; __entry->val1 = val1; __entry->val2 = val2; ), - TP_printk("pt=%02X msg_id=%02X res_id:%u vals=%u:%u", - __entry->protocol_id, __entry->msg_id, - __entry->res_id, __entry->val1, __entry->val2) + TP_printk("pt=%02X msg_id=%02X res_id:%u sub_id:%u vals=%u:%u", + __entry->protocol_id, __entry->msg_id, + __entry->res_id, __entry->sub_id, __entry->val1, __entry->val2) ); TRACE_EVENT(scmi_xfer_begin, -- 2.47.3