Commit d5077a55 authored by Ohad Sharabi's avatar Ohad Sharabi Committed by Oded Gabbay

habanalabs: define events to trace PCI LBW access

There are cases where it may be useful to dump the whole LBW configs.
Yet, doing so while spamming the kernel log will probably shade other
important messages since the LBW access is done in sheer volume.
To answer this we add trace events for those too.
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 200f3cf0
......@@ -123,6 +123,45 @@ DEFINE_EVENT(habanalabs_comms_template, habanalabs_comms_wait_status_done,
TP_PROTO(struct device *dev, char *op_str),
TP_ARGS(dev, op_str));
DECLARE_EVENT_CLASS(habanalabs_reg_access_template,
TP_PROTO(struct device *dev, u32 addr, u32 val),
TP_ARGS(dev, addr, val),
TP_STRUCT__entry(
__string(dname, dev_name(dev))
__field(u32, addr)
__field(u32, val)
),
TP_fast_assign(
__assign_str(dname, dev_name(dev));
__entry->addr = addr;
__entry->val = val;
),
TP_printk("%s: addr: %#x, val: %#x",
__get_str(dname),
__entry->addr,
__entry->val)
);
DEFINE_EVENT(habanalabs_reg_access_template, habanalabs_rreg32,
TP_PROTO(struct device *dev, u32 addr, u32 val),
TP_ARGS(dev, addr, val));
DEFINE_EVENT(habanalabs_reg_access_template, habanalabs_wreg32,
TP_PROTO(struct device *dev, u32 addr, u32 val),
TP_ARGS(dev, addr, val));
DEFINE_EVENT(habanalabs_reg_access_template, habanalabs_elbi_read,
TP_PROTO(struct device *dev, u32 addr, u32 val),
TP_ARGS(dev, addr, val));
DEFINE_EVENT(habanalabs_reg_access_template, habanalabs_elbi_write,
TP_PROTO(struct device *dev, u32 addr, u32 val),
TP_ARGS(dev, addr, val));
#endif /* if !defined(_TRACE_HABANALABS_H) || defined(TRACE_HEADER_MULTI_READ) */
/* 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