Commit 811c74ba authored by Ohad Sharabi's avatar Ohad Sharabi Committed by Oded Gabbay

habanalabs: define traces for COMMS protocol

As the COMMS protocol is being used more widely in our driver,
an available debug tool for the handshake will be handy.

This commit defines tracepoints to various key points of the COMMS
protocol.
Signed-off-by: default avatarOhad Sharabi <osharabi@habana.ai>
Reviewed-by: default avatarOded Gabbay <ogabbay@kernel.org>
Signed-off-by: default avatarOded Gabbay <ogabbay@kernel.org>
parent b219d209
...@@ -87,6 +87,42 @@ DEFINE_EVENT(habanalabs_dma_alloc_template, habanalabs_dma_free, ...@@ -87,6 +87,42 @@ DEFINE_EVENT(habanalabs_dma_alloc_template, habanalabs_dma_free,
TP_PROTO(struct device *dev, u64 cpu_addr, u64 dma_addr, size_t size, const char *caller), TP_PROTO(struct device *dev, u64 cpu_addr, u64 dma_addr, size_t size, const char *caller),
TP_ARGS(dev, cpu_addr, dma_addr, size, caller)); TP_ARGS(dev, cpu_addr, dma_addr, size, caller));
DECLARE_EVENT_CLASS(habanalabs_comms_template,
TP_PROTO(struct device *dev, char *op_str),
TP_ARGS(dev, op_str),
TP_STRUCT__entry(
__string(dname, dev_name(dev))
__field(char *, op_str)
),
TP_fast_assign(
__assign_str(dname, dev_name(dev));
__entry->op_str = op_str;
),
TP_printk("%s: cms: %s",
__get_str(dname),
__entry->op_str)
);
DEFINE_EVENT(habanalabs_comms_template, habanalabs_comms_protocol_cmd,
TP_PROTO(struct device *dev, char *op_str),
TP_ARGS(dev, op_str));
DEFINE_EVENT(habanalabs_comms_template, habanalabs_comms_send_cmd,
TP_PROTO(struct device *dev, char *op_str),
TP_ARGS(dev, op_str));
DEFINE_EVENT(habanalabs_comms_template, habanalabs_comms_wait_status,
TP_PROTO(struct device *dev, char *op_str),
TP_ARGS(dev, op_str));
DEFINE_EVENT(habanalabs_comms_template, habanalabs_comms_wait_status_done,
TP_PROTO(struct device *dev, char *op_str),
TP_ARGS(dev, op_str));
#endif /* if !defined(_TRACE_HABANALABS_H) || defined(TRACE_HEADER_MULTI_READ) */ #endif /* if !defined(_TRACE_HABANALABS_H) || defined(TRACE_HEADER_MULTI_READ) */
/* This part must be outside protection */ /* This part must be outside protection */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment