diff options
author | Jeremy Kerr <jk@ozlabs.org> | 2017-06-06 16:08:51 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-06-09 11:52:08 +0200 |
commit | 66433b05a3b2b8f95be9e6269bc21e916febf482 (patch) | |
tree | 3ed705a672aac49dc8aeb67bf271ed2399c087ae /include | |
parent | da36cadf89a75a730302a4df114cb930b1becc39 (diff) | |
download | blackbird-obmc-linux-66433b05a3b2b8f95be9e6269bc21e916febf482.tar.gz blackbird-obmc-linux-66433b05a3b2b8f95be9e6269bc21e916febf482.zip |
drivers/fsi: Add tracepoints for low-level operations
Trace low level read and write FSI bus operations.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Christopher Bostic <cbostic@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/trace/events/fsi.h | 127 |
1 files changed, 127 insertions, 0 deletions
diff --git a/include/trace/events/fsi.h b/include/trace/events/fsi.h new file mode 100644 index 000000000000..697ee6678892 --- /dev/null +++ b/include/trace/events/fsi.h @@ -0,0 +1,127 @@ + +#undef TRACE_SYSTEM +#define TRACE_SYSTEM fsi + +#if !defined(_TRACE_FSI_H) || defined(TRACE_HEADER_MULTI_READ) +#define _TRACE_FSI_H + +#include <linux/tracepoint.h> + +TRACE_EVENT(fsi_master_read, + TP_PROTO(const struct fsi_master *master, int link, int id, + uint32_t addr, size_t size), + TP_ARGS(master, link, id, addr, size), + TP_STRUCT__entry( + __field(int, master_idx) + __field(int, link) + __field(int, id) + __field(__u32, addr) + __field(size_t, size) + ), + TP_fast_assign( + __entry->master_idx = master->idx; + __entry->link = link; + __entry->id = id; + __entry->addr = addr; + __entry->size = size; + ), + TP_printk("fsi%d:%02d:%02d %08x[%zd]", + __entry->master_idx, + __entry->link, + __entry->id, + __entry->addr, + __entry->size + ) +); + +TRACE_EVENT(fsi_master_write, + TP_PROTO(const struct fsi_master *master, int link, int id, + uint32_t addr, size_t size, const void *data), + TP_ARGS(master, link, id, addr, size, data), + TP_STRUCT__entry( + __field(int, master_idx) + __field(int, link) + __field(int, id) + __field(__u32, addr) + __field(size_t, size) + __field(__u32, data) + ), + TP_fast_assign( + __entry->master_idx = master->idx; + __entry->link = link; + __entry->id = id; + __entry->addr = addr; + __entry->size = size; + __entry->data = 0; + memcpy(&__entry->data, data, size); + ), + TP_printk("fsi%d:%02d:%02d %08x[%zd] <= {%*ph}", + __entry->master_idx, + __entry->link, + __entry->id, + __entry->addr, + __entry->size, + (int)__entry->size, &__entry->data + ) +); + +TRACE_EVENT(fsi_master_rw_result, + TP_PROTO(const struct fsi_master *master, int link, int id, + uint32_t addr, size_t size, + bool write, const void *data, int ret), + TP_ARGS(master, link, id, addr, size, write, data, ret), + TP_STRUCT__entry( + __field(int, master_idx) + __field(int, link) + __field(int, id) + __field(__u32, addr) + __field(size_t, size) + __field(bool, write) + __field(__u32, data) + __field(int, ret) + ), + TP_fast_assign( + __entry->master_idx = master->idx; + __entry->link = link; + __entry->id = id; + __entry->addr = addr; + __entry->size = size; + __entry->write = write; + __entry->data = 0; + __entry->ret = ret; + if (__entry->write || !__entry->ret) + memcpy(&__entry->data, data, size); + ), + TP_printk("fsi%d:%02d:%02d %08x[%zd] %s {%*ph} ret %d", + __entry->master_idx, + __entry->link, + __entry->id, + __entry->addr, + __entry->size, + __entry->write ? "<=" : "=>", + (int)__entry->size, &__entry->data, + __entry->ret + ) +); + +TRACE_EVENT(fsi_master_break, + TP_PROTO(const struct fsi_master *master, int link), + TP_ARGS(master, link), + TP_STRUCT__entry( + __field(int, master_idx) + __field(int, link) + ), + TP_fast_assign( + __entry->master_idx = master->idx; + __entry->link = link; + ), + TP_printk("fsi%d:%d", + __entry->master_idx, + __entry->link + ) +); + + +#endif /* _TRACE_FSI_H */ + +#include <trace/define_trace.h> |