summaryrefslogtreecommitdiff
path: root/include/trace
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2022-07-06 14:56:10 +0300
committerArnd Bergmann <arnd@arndb.de>2022-07-06 14:56:10 +0300
commit77abf47213c6065d878020707aa611ef02f2e4bf (patch)
treed1a9e4f3e791c531ded1eb4480ab8fb191790464 /include/trace
parent3ed9222ce728fd3f1c4e429293270f58f3a8256d (diff)
parentb27d04d5a51c28322cadb18d8d2ff5d0fb892fff (diff)
downloadlinux-77abf47213c6065d878020707aa611ef02f2e4bf.tar.xz
Merge tag 'scmi-updates-5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into arm/drivers
Arm SCMI updates for v5.20 The main additions this time around are: 1. The capability to trace full SCMI message headers and payloads. The recent unearthing of chain of old firmware issues motivated this effort so that it is easier to trace them and debug quicker than it took this time around in absence of such tracing. 2. SCMI System power control driver to handle platform's requests for a graceful shutdown. Though the system power control protocol has been around since the begining of SCMI, it lacked the timeout information that was added in SCMI v3.1 that enables kernel to take appropriate action within the timeout and doesn't have to rely on any other user inputs(which was blocking factor for addition of this driver earlier) 3. Support for SCMI Power Capping protocol that was introduced in SCMI v3.1 This protocol is intended for controlling and monitoring the power consumption of power capping domains. The firmware also provides the hierarchy of powercap domains by providing parent domain information. It also contains a bug fix in the old SCPI driver addressing possible user-after-free issues. * tag 'scmi-updates-5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux: firmware: arm_scmi: Use fast channel tracing include: trace: Add SCMI fast channel tracing firmware: arm_scmi: Add SCMI v3.1 powercap fast channels support firmware: arm_scmi: Generalize the fast channel support firmware: arm_scmi: Add SCMI v3.1 powercap protocol basic support dt-bindings: firmware: arm,scmi: Add support for powercap protocol firmware: arm_scmi: Add SCMI System Power Control driver firmware: arm_scmi: Add devm_protocol_acquire helper firmware: arm_scmi: Add SCMI v3.1 System Power extensions firmware: arm_scmi: Support only one single system power device firmware: arm_scmi: Use new SCMI full message tracing include: trace: Add SCMI full message tracing firmware: arm_scpi: Ensure scpi_info is not assigned if the probe fails firmware: arm_scmi: Remove usage of the deprecated ida_simple_xxx API firmware: arm_scmi: Fix response size warning for OPTEE transport firmware: arm_scmi: Relax CLOCK_DESCRIBE_RATES out-of-spec checks Link: https://lore.kernel.org/r/20220706115045.2272678-1-sudeep.holla@arm.com Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'include/trace')
-rw-r--r--include/trace/events/scmi.h56
1 files changed, 56 insertions, 0 deletions
diff --git a/include/trace/events/scmi.h b/include/trace/events/scmi.h
index cee4b2b64ae4..65016a767b7a 100644
--- a/include/trace/events/scmi.h
+++ b/include/trace/events/scmi.h
@@ -7,6 +7,31 @@
#include <linux/tracepoint.h>
+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_STRUCT__entry(
+ __field(u8, protocol_id)
+ __field(u8, msg_id)
+ __field(u32, res_id)
+ __field(u32, val1)
+ __field(u32, val2)
+ ),
+
+ TP_fast_assign(
+ __entry->protocol_id = protocol_id;
+ __entry->msg_id = msg_id;
+ __entry->res_id = res_id;
+ __entry->val1 = val1;
+ __entry->val2 = val2;
+ ),
+
+ TP_printk("[0x%02X]:[0x%02X]:[%08X]:%u:%u",
+ __entry->protocol_id, __entry->msg_id,
+ __entry->res_id, __entry->val1, __entry->val2)
+);
+
TRACE_EVENT(scmi_xfer_begin,
TP_PROTO(int transfer_id, u8 msg_id, u8 protocol_id, u16 seq,
bool poll),
@@ -112,6 +137,37 @@ TRACE_EVENT(scmi_rx_done,
__entry->transfer_id, __entry->msg_id, __entry->protocol_id,
__entry->seq, __entry->msg_type)
);
+
+TRACE_EVENT(scmi_msg_dump,
+ TP_PROTO(u8 protocol_id, u8 msg_id, unsigned char *tag, u16 seq,
+ int status, void *buf, size_t len),
+ TP_ARGS(protocol_id, msg_id, tag, seq, status, buf, len),
+
+ TP_STRUCT__entry(
+ __field(u8, protocol_id)
+ __field(u8, msg_id)
+ __array(char, tag, 5)
+ __field(u16, seq)
+ __field(int, status)
+ __field(size_t, len)
+ __dynamic_array(unsigned char, cmd, len)
+ ),
+
+ TP_fast_assign(
+ __entry->protocol_id = protocol_id;
+ __entry->msg_id = msg_id;
+ strscpy(__entry->tag, tag, 5);
+ __entry->seq = seq;
+ __entry->status = status;
+ __entry->len = len;
+ memcpy(__get_dynamic_array(cmd), buf, __entry->len);
+ ),
+
+ TP_printk("pt=%02X t=%s msg_id=%02X seq=%04X s=%d pyld=%s",
+ __entry->protocol_id, __entry->tag, __entry->msg_id,
+ __entry->seq, __entry->status,
+ __print_hex_str(__get_dynamic_array(cmd), __entry->len))
+);
#endif /* _TRACE_SCMI_H */
/* This part must be outside protection */