mirror of
https://github.com/lkl/linux.git
synced 2025-12-19 08:03:01 +09:00
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: Ohad Sharabi <osharabi@habana.ai> Reviewed-by: Oded Gabbay <ogabbay@kernel.org> Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
This commit is contained in:
committed by
Oded Gabbay
parent
200f3cf047
commit
d5077a5500
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user