Lina Iyer | 884981e | 2017-03-21 13:43:05 -0600 | [diff] [blame] | 1 | /* Copyright (c) 2016-2017, The Linux Foundation. All rights reserved. |
Lina Iyer | ea92144 | 2016-05-26 15:07:48 -0600 | [diff] [blame] | 2 | * |
| 3 | * This program is free software; you can redistribute it and/or modify |
| 4 | * it under the terms of the GNU General Public License version 2 and |
| 5 | * only version 2 as published by the Free Software Foundation. |
| 6 | * |
| 7 | * This program is distributed in the hope that it will be useful, |
| 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 10 | * GNU General Public License for more details. |
| 11 | */ |
| 12 | |
| 13 | #undef TRACE_SYSTEM |
| 14 | #define TRACE_SYSTEM rpmh |
| 15 | |
| 16 | #if !defined(_TRACE_RPMH_H) || defined(TRACE_HEADER_MULTI_READ) |
| 17 | #define _TRACE_RPMH_H |
| 18 | |
| 19 | #include <linux/tracepoint.h> |
| 20 | |
| 21 | DECLARE_EVENT_CLASS(rpmh_ack_recvd, |
| 22 | |
Lina Iyer | 884981e | 2017-03-21 13:43:05 -0600 | [diff] [blame] | 23 | TP_PROTO(const char *s, int m, u32 addr, int errno), |
Lina Iyer | ea92144 | 2016-05-26 15:07:48 -0600 | [diff] [blame] | 24 | |
Lina Iyer | 884981e | 2017-03-21 13:43:05 -0600 | [diff] [blame] | 25 | TP_ARGS(s, m, addr, errno), |
Lina Iyer | ea92144 | 2016-05-26 15:07:48 -0600 | [diff] [blame] | 26 | |
| 27 | TP_STRUCT__entry( |
Lina Iyer | 884981e | 2017-03-21 13:43:05 -0600 | [diff] [blame] | 28 | __field(const char *, name) |
Lina Iyer | ea92144 | 2016-05-26 15:07:48 -0600 | [diff] [blame] | 29 | __field(int, m) |
| 30 | __field(u32, addr) |
| 31 | __field(int, errno) |
| 32 | ), |
| 33 | |
| 34 | TP_fast_assign( |
Lina Iyer | 884981e | 2017-03-21 13:43:05 -0600 | [diff] [blame] | 35 | __entry->name = s; |
Lina Iyer | ea92144 | 2016-05-26 15:07:48 -0600 | [diff] [blame] | 36 | __entry->m = m; |
| 37 | __entry->addr = addr; |
| 38 | __entry->errno = errno; |
| 39 | ), |
| 40 | |
Lina Iyer | 884981e | 2017-03-21 13:43:05 -0600 | [diff] [blame] | 41 | TP_printk("%s: ack: tcs-m:%d addr: 0x%08x errno: %d", |
| 42 | __entry->name, __entry->m, __entry->addr, __entry->errno) |
Lina Iyer | ea92144 | 2016-05-26 15:07:48 -0600 | [diff] [blame] | 43 | ); |
| 44 | |
| 45 | DEFINE_EVENT(rpmh_ack_recvd, rpmh_notify_irq, |
Lina Iyer | 884981e | 2017-03-21 13:43:05 -0600 | [diff] [blame] | 46 | TP_PROTO(const char *s, int m, u32 addr, int err), |
| 47 | TP_ARGS(s, m, addr, err) |
Lina Iyer | ea92144 | 2016-05-26 15:07:48 -0600 | [diff] [blame] | 48 | ); |
| 49 | |
| 50 | DEFINE_EVENT(rpmh_ack_recvd, rpmh_notify, |
Lina Iyer | 884981e | 2017-03-21 13:43:05 -0600 | [diff] [blame] | 51 | TP_PROTO(const char *s, int m, u32 addr, int err), |
| 52 | TP_ARGS(s, m, addr, err) |
Lina Iyer | ea92144 | 2016-05-26 15:07:48 -0600 | [diff] [blame] | 53 | ); |
| 54 | |
| 55 | TRACE_EVENT(rpmh_send_msg, |
| 56 | |
Lina Iyer | 884981e | 2017-03-21 13:43:05 -0600 | [diff] [blame] | 57 | TP_PROTO(const char *s, int m, int n, u32 h, u32 a, u32 v, bool c, bool t), |
Lina Iyer | ea92144 | 2016-05-26 15:07:48 -0600 | [diff] [blame] | 58 | |
Lina Iyer | 884981e | 2017-03-21 13:43:05 -0600 | [diff] [blame] | 59 | TP_ARGS(s, m, n, h, a, v, c, t), |
Lina Iyer | ea92144 | 2016-05-26 15:07:48 -0600 | [diff] [blame] | 60 | |
| 61 | TP_STRUCT__entry( |
Lina Iyer | 884981e | 2017-03-21 13:43:05 -0600 | [diff] [blame] | 62 | __field(const char*, name) |
Lina Iyer | ea92144 | 2016-05-26 15:07:48 -0600 | [diff] [blame] | 63 | __field(int, m) |
| 64 | __field(int, n) |
| 65 | __field(u32, hdr) |
| 66 | __field(u32, addr) |
| 67 | __field(u32, data) |
| 68 | __field(bool, complete) |
Lina Iyer | 884981e | 2017-03-21 13:43:05 -0600 | [diff] [blame] | 69 | __field(bool, trigger) |
Lina Iyer | ea92144 | 2016-05-26 15:07:48 -0600 | [diff] [blame] | 70 | ), |
| 71 | |
| 72 | TP_fast_assign( |
Lina Iyer | 884981e | 2017-03-21 13:43:05 -0600 | [diff] [blame] | 73 | __entry->name = s; |
Lina Iyer | ea92144 | 2016-05-26 15:07:48 -0600 | [diff] [blame] | 74 | __entry->m = m; |
| 75 | __entry->n = n; |
| 76 | __entry->hdr = h; |
| 77 | __entry->addr = a; |
| 78 | __entry->data = v; |
| 79 | __entry->complete = c; |
Lina Iyer | 884981e | 2017-03-21 13:43:05 -0600 | [diff] [blame] | 80 | __entry->trigger = t; |
Lina Iyer | ea92144 | 2016-05-26 15:07:48 -0600 | [diff] [blame] | 81 | ), |
| 82 | |
Lina Iyer | 884981e | 2017-03-21 13:43:05 -0600 | [diff] [blame] | 83 | TP_printk("%s: send-msg: tcs(m): %d cmd(n): %d msgid: 0x%08x addr: 0x%08x data: 0x%08x complete: %d trigger: %d", |
| 84 | __entry->name, __entry->m, __entry->n, __entry->hdr, |
| 85 | __entry->addr, __entry->data, __entry->complete, __entry->trigger) |
Lina Iyer | ea92144 | 2016-05-26 15:07:48 -0600 | [diff] [blame] | 86 | ); |
| 87 | |
| 88 | TRACE_EVENT(rpmh_control_msg, |
| 89 | |
Lina Iyer | 884981e | 2017-03-21 13:43:05 -0600 | [diff] [blame] | 90 | TP_PROTO(const char *s, u32 v), |
Lina Iyer | ea92144 | 2016-05-26 15:07:48 -0600 | [diff] [blame] | 91 | |
Lina Iyer | 884981e | 2017-03-21 13:43:05 -0600 | [diff] [blame] | 92 | TP_ARGS(s, v), |
Lina Iyer | ea92144 | 2016-05-26 15:07:48 -0600 | [diff] [blame] | 93 | |
| 94 | TP_STRUCT__entry( |
Lina Iyer | 884981e | 2017-03-21 13:43:05 -0600 | [diff] [blame] | 95 | __field(const char *, name) |
Lina Iyer | ea92144 | 2016-05-26 15:07:48 -0600 | [diff] [blame] | 96 | __field(u32, data) |
| 97 | ), |
| 98 | |
| 99 | TP_fast_assign( |
Lina Iyer | 884981e | 2017-03-21 13:43:05 -0600 | [diff] [blame] | 100 | __entry->name = s; |
Lina Iyer | ea92144 | 2016-05-26 15:07:48 -0600 | [diff] [blame] | 101 | __entry->data = v; |
| 102 | ), |
| 103 | |
Lina Iyer | 884981e | 2017-03-21 13:43:05 -0600 | [diff] [blame] | 104 | TP_printk("%s: ctrl-msg: data: 0x%08x", |
| 105 | __entry->name, __entry->data) |
Lina Iyer | ea92144 | 2016-05-26 15:07:48 -0600 | [diff] [blame] | 106 | ); |
| 107 | |
| 108 | #endif /* _TRACE_RPMH_H */ |
| 109 | |
| 110 | #define TRACE_INCLUDE_FILE rpmh |
| 111 | #include <trace/define_trace.h> |