2 #define TRACE_SYSTEM powerpc
4 #if !defined(_TRACE_POWERPC_H) || defined(TRACE_HEADER_MULTI_READ)
5 #define _TRACE_POWERPC_H
7 #include <linux/tracepoint.h>
11 DECLARE_EVENT_CLASS(ppc64_interrupt_class
,
13 TP_PROTO(struct pt_regs
*regs
),
18 __field(struct pt_regs
*, regs
)
25 TP_printk("pt_regs=%p", __entry
->regs
)
28 DEFINE_EVENT(ppc64_interrupt_class
, irq_entry
,
30 TP_PROTO(struct pt_regs
*regs
),
35 DEFINE_EVENT(ppc64_interrupt_class
, irq_exit
,
37 TP_PROTO(struct pt_regs
*regs
),
42 DEFINE_EVENT(ppc64_interrupt_class
, timer_interrupt_entry
,
44 TP_PROTO(struct pt_regs
*regs
),
49 DEFINE_EVENT(ppc64_interrupt_class
, timer_interrupt_exit
,
51 TP_PROTO(struct pt_regs
*regs
),
56 #ifdef CONFIG_PPC_PSERIES
57 extern void hcall_tracepoint_regfunc(void);
58 extern void hcall_tracepoint_unregfunc(void);
60 TRACE_EVENT_FN(hcall_entry
,
62 TP_PROTO(unsigned long opcode
, unsigned long *args
),
64 TP_ARGS(opcode
, args
),
67 __field(unsigned long, opcode
)
71 __entry
->opcode
= opcode
;
74 TP_printk("opcode=%lu", __entry
->opcode
),
76 hcall_tracepoint_regfunc
, hcall_tracepoint_unregfunc
79 TRACE_EVENT_FN(hcall_exit
,
81 TP_PROTO(unsigned long opcode
, unsigned long retval
,
82 unsigned long *retbuf
),
84 TP_ARGS(opcode
, retval
, retbuf
),
87 __field(unsigned long, opcode
)
88 __field(unsigned long, retval
)
92 __entry
->opcode
= opcode
;
93 __entry
->retval
= retval
;
96 TP_printk("opcode=%lu retval=%lu", __entry
->opcode
, __entry
->retval
),
98 hcall_tracepoint_regfunc
, hcall_tracepoint_unregfunc
102 #ifdef CONFIG_PPC_POWERNV
103 extern void opal_tracepoint_regfunc(void);
104 extern void opal_tracepoint_unregfunc(void);
106 TRACE_EVENT_FN(opal_entry
,
108 TP_PROTO(unsigned long opcode
, unsigned long *args
),
110 TP_ARGS(opcode
, args
),
113 __field(unsigned long, opcode
)
117 __entry
->opcode
= opcode
;
120 TP_printk("opcode=%lu", __entry
->opcode
),
122 opal_tracepoint_regfunc
, opal_tracepoint_unregfunc
125 TRACE_EVENT_FN(opal_exit
,
127 TP_PROTO(unsigned long opcode
, unsigned long retval
),
129 TP_ARGS(opcode
, retval
),
132 __field(unsigned long, opcode
)
133 __field(unsigned long, retval
)
137 __entry
->opcode
= opcode
;
138 __entry
->retval
= retval
;
141 TP_printk("opcode=%lu retval=%lu", __entry
->opcode
, __entry
->retval
),
143 opal_tracepoint_regfunc
, opal_tracepoint_unregfunc
147 TRACE_EVENT(hash_fault
,
149 TP_PROTO(unsigned long addr
, unsigned long access
, unsigned long trap
),
150 TP_ARGS(addr
, access
, trap
),
152 __field(unsigned long, addr
)
153 __field(unsigned long, access
)
154 __field(unsigned long, trap
)
158 __entry
->addr
= addr
;
159 __entry
->access
= access
;
160 __entry
->trap
= trap
;
163 TP_printk("hash fault with addr 0x%lx and access = 0x%lx trap = 0x%lx",
164 __entry
->addr
, __entry
->access
, __entry
->trap
)
167 #endif /* _TRACE_POWERPC_H */
169 #undef TRACE_INCLUDE_PATH
170 #undef TRACE_INCLUDE_FILE
172 #define TRACE_INCLUDE_PATH asm
173 #define TRACE_INCLUDE_FILE trace
175 #include <trace/define_trace.h>