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 int hcall_tracepoint_regfunc(void);
58 extern void hcall_tracepoint_unregfunc(void);
60 TRACE_EVENT_FN_COND(hcall_entry
,
62 TP_PROTO(unsigned long opcode
, unsigned long *args
),
64 TP_ARGS(opcode
, args
),
66 TP_CONDITION(cpu_online(raw_smp_processor_id())),
69 __field(unsigned long, opcode
)
73 __entry
->opcode
= opcode
;
76 TP_printk("opcode=%lu", __entry
->opcode
),
78 hcall_tracepoint_regfunc
, hcall_tracepoint_unregfunc
81 TRACE_EVENT_FN_COND(hcall_exit
,
83 TP_PROTO(unsigned long opcode
, unsigned long retval
,
84 unsigned long *retbuf
),
86 TP_ARGS(opcode
, retval
, retbuf
),
88 TP_CONDITION(cpu_online(raw_smp_processor_id())),
91 __field(unsigned long, opcode
)
92 __field(unsigned long, retval
)
96 __entry
->opcode
= opcode
;
97 __entry
->retval
= retval
;
100 TP_printk("opcode=%lu retval=%lu", __entry
->opcode
, __entry
->retval
),
102 hcall_tracepoint_regfunc
, hcall_tracepoint_unregfunc
106 #ifdef CONFIG_PPC_POWERNV
107 extern int opal_tracepoint_regfunc(void);
108 extern void opal_tracepoint_unregfunc(void);
110 TRACE_EVENT_FN(opal_entry
,
112 TP_PROTO(unsigned long opcode
, unsigned long *args
),
114 TP_ARGS(opcode
, args
),
117 __field(unsigned long, opcode
)
121 __entry
->opcode
= opcode
;
124 TP_printk("opcode=%lu", __entry
->opcode
),
126 opal_tracepoint_regfunc
, opal_tracepoint_unregfunc
129 TRACE_EVENT_FN(opal_exit
,
131 TP_PROTO(unsigned long opcode
, unsigned long retval
),
133 TP_ARGS(opcode
, retval
),
136 __field(unsigned long, opcode
)
137 __field(unsigned long, retval
)
141 __entry
->opcode
= opcode
;
142 __entry
->retval
= retval
;
145 TP_printk("opcode=%lu retval=%lu", __entry
->opcode
, __entry
->retval
),
147 opal_tracepoint_regfunc
, opal_tracepoint_unregfunc
151 TRACE_EVENT(hash_fault
,
153 TP_PROTO(unsigned long addr
, unsigned long access
, unsigned long trap
),
154 TP_ARGS(addr
, access
, trap
),
156 __field(unsigned long, addr
)
157 __field(unsigned long, access
)
158 __field(unsigned long, trap
)
162 __entry
->addr
= addr
;
163 __entry
->access
= access
;
164 __entry
->trap
= trap
;
167 TP_printk("hash fault with addr 0x%lx and access = 0x%lx trap = 0x%lx",
168 __entry
->addr
, __entry
->access
, __entry
->trap
)
171 #endif /* _TRACE_POWERPC_H */
173 #undef TRACE_INCLUDE_PATH
174 #undef TRACE_INCLUDE_FILE
176 #define TRACE_INCLUDE_PATH asm
177 #define TRACE_INCLUDE_FILE trace
179 #include <trace/define_trace.h>