x86/mm/pat: Don't report PAT on CPUs that don't support it
[linux/fpc-iii.git] / arch / powerpc / include / asm / trace.h
blobc05cef6ee06c82c4a68c77ec95c48c55ac2e7010
1 #undef TRACE_SYSTEM
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>
9 struct pt_regs;
11 DECLARE_EVENT_CLASS(ppc64_interrupt_class,
13 TP_PROTO(struct pt_regs *regs),
15 TP_ARGS(regs),
17 TP_STRUCT__entry(
18 __field(struct pt_regs *, regs)
21 TP_fast_assign(
22 __entry->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),
32 TP_ARGS(regs)
35 DEFINE_EVENT(ppc64_interrupt_class, irq_exit,
37 TP_PROTO(struct pt_regs *regs),
39 TP_ARGS(regs)
42 DEFINE_EVENT(ppc64_interrupt_class, timer_interrupt_entry,
44 TP_PROTO(struct pt_regs *regs),
46 TP_ARGS(regs)
49 DEFINE_EVENT(ppc64_interrupt_class, timer_interrupt_exit,
51 TP_PROTO(struct pt_regs *regs),
53 TP_ARGS(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())),
68 TP_STRUCT__entry(
69 __field(unsigned long, opcode)
72 TP_fast_assign(
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())),
90 TP_STRUCT__entry(
91 __field(unsigned long, opcode)
92 __field(unsigned long, retval)
95 TP_fast_assign(
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
104 #endif
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),
116 TP_STRUCT__entry(
117 __field(unsigned long, opcode)
120 TP_fast_assign(
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),
135 TP_STRUCT__entry(
136 __field(unsigned long, opcode)
137 __field(unsigned long, retval)
140 TP_fast_assign(
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
149 #endif
151 TRACE_EVENT(hash_fault,
153 TP_PROTO(unsigned long addr, unsigned long access, unsigned long trap),
154 TP_ARGS(addr, access, trap),
155 TP_STRUCT__entry(
156 __field(unsigned long, addr)
157 __field(unsigned long, access)
158 __field(unsigned long, trap)
161 TP_fast_assign(
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>