blob: eff4860712d9b665e27a56b002e67a971d7a6e4f [file] [log] [blame]
Mahesh Sivasubramaniand69058b2012-10-01 16:49:26 -06001/* Copyright (c) 2012, The Linux Foundation. All rights reserved.
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 rpm_smd
15
16#if !defined(_TRACE_RPM_SMD_H) || defined(TRACE_HEADER_MULTI_READ)
17#define _TRACE_RPM_SMD_H
18
19#include <linux/tracepoint.h>
20
21TRACE_EVENT(rpm_ack_recd,
22
23 TP_PROTO(unsigned int irq, unsigned int msg_id),
24
25 TP_ARGS(irq, msg_id),
26
27 TP_STRUCT__entry(
28 __field(int, irq)
29 __field(int, msg_id)
30 ),
31
32 TP_fast_assign(
33 __entry->irq = irq;
34 __entry->msg_id = msg_id;
35 ),
36
37 TP_printk("ctx:%s id:%d",
38 __entry->irq ? "noslp" : "sleep",
39 __entry->msg_id)
40);
41
42TRACE_EVENT(rpm_send_message,
43
44 TP_PROTO(unsigned int irq, unsigned int set, unsigned int rsc_type,
45 unsigned int rsc_id, unsigned int msg_id),
46
47 TP_ARGS(irq, set, rsc_type, rsc_id, msg_id),
48
49 TP_STRUCT__entry(
50 __field(u32, irq)
51 __field(u32, set)
52 __field(u32, rsc_type)
53 __field(u32, rsc_id)
54 __field(u32, msg_id)
55 __array(char, name, 5)
56 ),
57
58 TP_fast_assign(
59 __entry->irq = irq;
60 __entry->name[4] = 0;
61 __entry->set = set;
62 __entry->rsc_type = rsc_type;
63 __entry->rsc_id = rsc_id;
64 __entry->msg_id = msg_id;
65 memcpy(__entry->name, &rsc_type, sizeof(uint32_t));
66
67 ),
68
69 TP_printk("ctx:%s set:%s rsc_type:0x%08x(%s), rsc_id:0x%08x, id:%d",
70 __entry->irq ? "noslp" : "sleep",
71 __entry->set ? "slp" : "act",
72 __entry->rsc_type, __entry->name,
73 __entry->rsc_id, __entry->msg_id)
74);
75#endif
76#undef TRACE_INCLUDE_PATH
77#define TRACE_INCLUDE_PATH .
78#define TRACE_INCLUDE_FILE trace_rpm_smd
79#include <trace/define_trace.h>