Messages in this thread Patch in this message |  | | From | lukasz.luba@arm ... | Subject | [PATCH 1/2] include: trace: Add SCMI header with trace events | Date | Mon, 16 Dec 2019 16:16:49 +0000 |
| |
From: Lukasz Luba <lukasz.luba@arm.com>
Adding trace events would help to measure the speed of the communication channel. It can be also potentially used helpful during investigation of some issues platforms which use different transport layer.
Update also MAINTAINERS file with information that the new trace events are maintained.
Signed-off-by: Lukasz Luba <lukasz.luba@arm.com> --- MAINTAINERS | 1 + include/trace/events/scmi.h | 56 +++++++++++++++++++++++++++++++++++++ 2 files changed, 57 insertions(+) create mode 100644 include/trace/events/scmi.h
diff --git a/MAINTAINERS b/MAINTAINERS index cc0a4a8ae06a..0182315226fc 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -15966,6 +15966,7 @@ F: drivers/firmware/arm_scpi.c F: drivers/firmware/arm_scmi/ F: drivers/reset/reset-scmi.c F: include/linux/sc[mp]i_protocol.h +F: include/trace/events/scmi.h SYSTEM RESET/SHUTDOWN DRIVERS M: Sebastian Reichel <sre@kernel.org> diff --git a/include/trace/events/scmi.h b/include/trace/events/scmi.h new file mode 100644 index 000000000000..a84016b02ffd --- /dev/null +++ b/include/trace/events/scmi.h @@ -0,0 +1,56 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#undef TRACE_SYSTEM +#define TRACE_SYSTEM scmi + +#if !defined(_TRACE_SCMI_H) || defined(TRACE_HEADER_MULTI_READ) +#define _TRACE_SCMI_H + +#include <linux/tracepoint.h> + +TRACE_EVENT(scmi_xfer_begin, + TP_PROTO(u8 id, u8 protocol_id, u16 seq, bool poll), + TP_ARGS(id, protocol_id, seq, poll), + + TP_STRUCT__entry( + __field(u8, id) + __field(u8, protocol_id) + __field(u16, seq) + __field(bool, poll) + ), + + TP_fast_assign( + __entry->id = id; + __entry->protocol_id = protocol_id; + __entry->seq = seq; + __entry->poll = poll; + ), + + TP_printk("id=%u protocol_id=%u seq=%u poll=%u", __entry->id, + __entry->protocol_id, __entry->seq, __entry->poll) +); + +TRACE_EVENT(scmi_xfer_end, + TP_PROTO(u8 id, u8 protocol_id, u16 seq, u32 status), + TP_ARGS(id, protocol_id, seq, status), + + TP_STRUCT__entry( + __field(u8, id) + __field(u8, protocol_id) + __field(u16, seq) + __field(u32, status) + ), + + TP_fast_assign( + __entry->id = id; + __entry->protocol_id = protocol_id; + __entry->seq = seq; + __entry->status = status; + ), + + TP_printk("id=%u protocol_id=%u seq=%u status=%u", __entry->id, + __entry->protocol_id, __entry->seq, __entry->status) +); +#endif /* _TRACE_SCMI_H */ + +/* This part must be outside protection */ +#include <trace/define_trace.h> -- 2.17.1
|  |