blob: 919877d6c65aa5b906459f0345b755da455ddc87 [file] [log] [blame]
Lina Iyer884981e2017-03-21 13:43:05 -06001/* Copyright (c) 2016-2017, The Linux Foundation. All rights reserved.
Lina Iyerea921442016-05-26 15:07:48 -06002 *
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
21DECLARE_EVENT_CLASS(rpmh_ack_recvd,
22
Lina Iyer884981e2017-03-21 13:43:05 -060023 TP_PROTO(const char *s, int m, u32 addr, int errno),
Lina Iyerea921442016-05-26 15:07:48 -060024
Lina Iyer884981e2017-03-21 13:43:05 -060025 TP_ARGS(s, m, addr, errno),
Lina Iyerea921442016-05-26 15:07:48 -060026
27 TP_STRUCT__entry(
Lina Iyer884981e2017-03-21 13:43:05 -060028 __field(const char *, name)
Lina Iyerea921442016-05-26 15:07:48 -060029 __field(int, m)
30 __field(u32, addr)
31 __field(int, errno)
32 ),
33
34 TP_fast_assign(
Lina Iyer884981e2017-03-21 13:43:05 -060035 __entry->name = s;
Lina Iyerea921442016-05-26 15:07:48 -060036 __entry->m = m;
37 __entry->addr = addr;
38 __entry->errno = errno;
39 ),
40
Lina Iyer884981e2017-03-21 13:43:05 -060041 TP_printk("%s: ack: tcs-m:%d addr: 0x%08x errno: %d",
42 __entry->name, __entry->m, __entry->addr, __entry->errno)
Lina Iyerea921442016-05-26 15:07:48 -060043);
44
45DEFINE_EVENT(rpmh_ack_recvd, rpmh_notify_irq,
Lina Iyer884981e2017-03-21 13:43:05 -060046 TP_PROTO(const char *s, int m, u32 addr, int err),
47 TP_ARGS(s, m, addr, err)
Lina Iyerea921442016-05-26 15:07:48 -060048);
49
50DEFINE_EVENT(rpmh_ack_recvd, rpmh_notify,
Lina Iyer884981e2017-03-21 13:43:05 -060051 TP_PROTO(const char *s, int m, u32 addr, int err),
52 TP_ARGS(s, m, addr, err)
Lina Iyerea921442016-05-26 15:07:48 -060053);
54
55TRACE_EVENT(rpmh_send_msg,
56
Lina Iyer884981e2017-03-21 13:43:05 -060057 TP_PROTO(const char *s, int m, int n, u32 h, u32 a, u32 v, bool c, bool t),
Lina Iyerea921442016-05-26 15:07:48 -060058
Lina Iyer884981e2017-03-21 13:43:05 -060059 TP_ARGS(s, m, n, h, a, v, c, t),
Lina Iyerea921442016-05-26 15:07:48 -060060
61 TP_STRUCT__entry(
Lina Iyer884981e2017-03-21 13:43:05 -060062 __field(const char*, name)
Lina Iyerea921442016-05-26 15:07:48 -060063 __field(int, m)
64 __field(int, n)
65 __field(u32, hdr)
66 __field(u32, addr)
67 __field(u32, data)
68 __field(bool, complete)
Lina Iyer884981e2017-03-21 13:43:05 -060069 __field(bool, trigger)
Lina Iyerea921442016-05-26 15:07:48 -060070 ),
71
72 TP_fast_assign(
Lina Iyer884981e2017-03-21 13:43:05 -060073 __entry->name = s;
Lina Iyerea921442016-05-26 15:07:48 -060074 __entry->m = m;
75 __entry->n = n;
76 __entry->hdr = h;
77 __entry->addr = a;
78 __entry->data = v;
79 __entry->complete = c;
Lina Iyer884981e2017-03-21 13:43:05 -060080 __entry->trigger = t;
Lina Iyerea921442016-05-26 15:07:48 -060081 ),
82
Lina Iyer884981e2017-03-21 13:43:05 -060083 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 Iyerea921442016-05-26 15:07:48 -060086);
87
88TRACE_EVENT(rpmh_control_msg,
89
Lina Iyer884981e2017-03-21 13:43:05 -060090 TP_PROTO(const char *s, u32 v),
Lina Iyerea921442016-05-26 15:07:48 -060091
Lina Iyer884981e2017-03-21 13:43:05 -060092 TP_ARGS(s, v),
Lina Iyerea921442016-05-26 15:07:48 -060093
94 TP_STRUCT__entry(
Lina Iyer884981e2017-03-21 13:43:05 -060095 __field(const char *, name)
Lina Iyerea921442016-05-26 15:07:48 -060096 __field(u32, data)
97 ),
98
99 TP_fast_assign(
Lina Iyer884981e2017-03-21 13:43:05 -0600100 __entry->name = s;
Lina Iyerea921442016-05-26 15:07:48 -0600101 __entry->data = v;
102 ),
103
Lina Iyer884981e2017-03-21 13:43:05 -0600104 TP_printk("%s: ctrl-msg: data: 0x%08x",
105 __entry->name, __entry->data)
Lina Iyerea921442016-05-26 15:07:48 -0600106);
107
108#endif /* _TRACE_RPMH_H */
109
110#define TRACE_INCLUDE_FILE rpmh
111#include <trace/define_trace.h>