1 #include <asm/trace/irq_vectors.h>
2 #include <linux/trace.h>
4 #if defined(CONFIG_OSNOISE_TRACER) && defined(CONFIG_X86_LOCAL_APIC)
6 * trace_intel_irq_entry - record intel specific IRQ entry
8 static void trace_intel_irq_entry(void *data
, int vector
)
10 osnoise_trace_irq_entry(vector
);
14 * trace_intel_irq_exit - record intel specific IRQ exit
16 static void trace_intel_irq_exit(void *data
, int vector
)
18 char *vector_desc
= (char *) data
;
20 osnoise_trace_irq_exit(vector
, vector_desc
);
24 * register_intel_irq_tp - Register intel specific IRQ entry tracepoints
26 int osnoise_arch_register(void)
30 ret
= register_trace_local_timer_entry(trace_intel_irq_entry
, NULL
);
34 ret
= register_trace_local_timer_exit(trace_intel_irq_exit
, "local_timer");
38 #ifdef CONFIG_X86_THERMAL_VECTOR
39 ret
= register_trace_thermal_apic_entry(trace_intel_irq_entry
, NULL
);
43 ret
= register_trace_thermal_apic_exit(trace_intel_irq_exit
, "thermal_apic");
45 goto out_thermal_entry
;
46 #endif /* CONFIG_X86_THERMAL_VECTOR */
48 #ifdef CONFIG_X86_MCE_AMD
49 ret
= register_trace_deferred_error_apic_entry(trace_intel_irq_entry
, NULL
);
51 goto out_thermal_exit
;
53 ret
= register_trace_deferred_error_apic_exit(trace_intel_irq_exit
, "deferred_error");
55 goto out_deferred_entry
;
58 #ifdef CONFIG_X86_MCE_THRESHOLD
59 ret
= register_trace_threshold_apic_entry(trace_intel_irq_entry
, NULL
);
61 goto out_deferred_exit
;
63 ret
= register_trace_threshold_apic_exit(trace_intel_irq_exit
, "threshold_apic");
65 goto out_threshold_entry
;
66 #endif /* CONFIG_X86_MCE_THRESHOLD */
69 ret
= register_trace_call_function_single_entry(trace_intel_irq_entry
, NULL
);
71 goto out_threshold_exit
;
73 ret
= register_trace_call_function_single_exit(trace_intel_irq_exit
,
74 "call_function_single");
76 goto out_call_function_single_entry
;
78 ret
= register_trace_call_function_entry(trace_intel_irq_entry
, NULL
);
80 goto out_call_function_single_exit
;
82 ret
= register_trace_call_function_exit(trace_intel_irq_exit
, "call_function");
84 goto out_call_function_entry
;
86 ret
= register_trace_reschedule_entry(trace_intel_irq_entry
, NULL
);
88 goto out_call_function_exit
;
90 ret
= register_trace_reschedule_exit(trace_intel_irq_exit
, "reschedule");
92 goto out_reschedule_entry
;
93 #endif /* CONFIG_SMP */
95 #ifdef CONFIG_IRQ_WORK
96 ret
= register_trace_irq_work_entry(trace_intel_irq_entry
, NULL
);
98 goto out_reschedule_exit
;
100 ret
= register_trace_irq_work_exit(trace_intel_irq_exit
, "irq_work");
102 goto out_irq_work_entry
;
105 ret
= register_trace_x86_platform_ipi_entry(trace_intel_irq_entry
, NULL
);
107 goto out_irq_work_exit
;
109 ret
= register_trace_x86_platform_ipi_exit(trace_intel_irq_exit
, "x86_platform_ipi");
111 goto out_x86_ipi_entry
;
113 ret
= register_trace_error_apic_entry(trace_intel_irq_entry
, NULL
);
115 goto out_x86_ipi_exit
;
117 ret
= register_trace_error_apic_exit(trace_intel_irq_exit
, "error_apic");
119 goto out_error_apic_entry
;
121 ret
= register_trace_spurious_apic_entry(trace_intel_irq_entry
, NULL
);
123 goto out_error_apic_exit
;
125 ret
= register_trace_spurious_apic_exit(trace_intel_irq_exit
, "spurious_apic");
127 goto out_spurious_apic_entry
;
131 out_spurious_apic_entry
:
132 unregister_trace_spurious_apic_entry(trace_intel_irq_entry
, NULL
);
134 unregister_trace_error_apic_exit(trace_intel_irq_exit
, "error_apic");
135 out_error_apic_entry
:
136 unregister_trace_error_apic_entry(trace_intel_irq_entry
, NULL
);
138 unregister_trace_x86_platform_ipi_exit(trace_intel_irq_exit
, "x86_platform_ipi");
140 unregister_trace_x86_platform_ipi_entry(trace_intel_irq_entry
, NULL
);
143 #ifdef CONFIG_IRQ_WORK
144 unregister_trace_irq_work_exit(trace_intel_irq_exit
, "irq_work");
146 unregister_trace_irq_work_entry(trace_intel_irq_entry
, NULL
);
151 unregister_trace_reschedule_exit(trace_intel_irq_exit
, "reschedule");
152 out_reschedule_entry
:
153 unregister_trace_reschedule_entry(trace_intel_irq_entry
, NULL
);
154 out_call_function_exit
:
155 unregister_trace_call_function_exit(trace_intel_irq_exit
, "call_function");
156 out_call_function_entry
:
157 unregister_trace_call_function_entry(trace_intel_irq_entry
, NULL
);
158 out_call_function_single_exit
:
159 unregister_trace_call_function_single_exit(trace_intel_irq_exit
, "call_function_single");
160 out_call_function_single_entry
:
161 unregister_trace_call_function_single_entry(trace_intel_irq_entry
, NULL
);
165 #ifdef CONFIG_X86_MCE_THRESHOLD
166 unregister_trace_threshold_apic_exit(trace_intel_irq_exit
, "threshold_apic");
168 unregister_trace_threshold_apic_entry(trace_intel_irq_entry
, NULL
);
172 #ifdef CONFIG_X86_MCE_AMD
173 unregister_trace_deferred_error_apic_exit(trace_intel_irq_exit
, "deferred_error");
175 unregister_trace_deferred_error_apic_entry(trace_intel_irq_entry
, NULL
);
177 #endif /* CONFIG_X86_MCE_AMD */
179 #ifdef CONFIG_X86_THERMAL_VECTOR
180 unregister_trace_thermal_apic_exit(trace_intel_irq_exit
, "thermal_apic");
182 unregister_trace_thermal_apic_entry(trace_intel_irq_entry
, NULL
);
184 #endif /* CONFIG_X86_THERMAL_VECTOR */
186 unregister_trace_local_timer_exit(trace_intel_irq_exit
, "local_timer");
188 unregister_trace_local_timer_entry(trace_intel_irq_entry
, NULL
);
193 void osnoise_arch_unregister(void)
195 unregister_trace_spurious_apic_exit(trace_intel_irq_exit
, "spurious_apic");
196 unregister_trace_spurious_apic_entry(trace_intel_irq_entry
, NULL
);
197 unregister_trace_error_apic_exit(trace_intel_irq_exit
, "error_apic");
198 unregister_trace_error_apic_entry(trace_intel_irq_entry
, NULL
);
199 unregister_trace_x86_platform_ipi_exit(trace_intel_irq_exit
, "x86_platform_ipi");
200 unregister_trace_x86_platform_ipi_entry(trace_intel_irq_entry
, NULL
);
202 #ifdef CONFIG_IRQ_WORK
203 unregister_trace_irq_work_exit(trace_intel_irq_exit
, "irq_work");
204 unregister_trace_irq_work_entry(trace_intel_irq_entry
, NULL
);
208 unregister_trace_reschedule_exit(trace_intel_irq_exit
, "reschedule");
209 unregister_trace_reschedule_entry(trace_intel_irq_entry
, NULL
);
210 unregister_trace_call_function_exit(trace_intel_irq_exit
, "call_function");
211 unregister_trace_call_function_entry(trace_intel_irq_entry
, NULL
);
212 unregister_trace_call_function_single_exit(trace_intel_irq_exit
, "call_function_single");
213 unregister_trace_call_function_single_entry(trace_intel_irq_entry
, NULL
);
216 #ifdef CONFIG_X86_MCE_THRESHOLD
217 unregister_trace_threshold_apic_exit(trace_intel_irq_exit
, "threshold_apic");
218 unregister_trace_threshold_apic_entry(trace_intel_irq_entry
, NULL
);
221 #ifdef CONFIG_X86_MCE_AMD
222 unregister_trace_deferred_error_apic_exit(trace_intel_irq_exit
, "deferred_error");
223 unregister_trace_deferred_error_apic_entry(trace_intel_irq_entry
, NULL
);
226 #ifdef CONFIG_X86_THERMAL_VECTOR
227 unregister_trace_thermal_apic_exit(trace_intel_irq_exit
, "thermal_apic");
228 unregister_trace_thermal_apic_entry(trace_intel_irq_entry
, NULL
);
229 #endif /* CONFIG_X86_THERMAL_VECTOR */
231 unregister_trace_local_timer_exit(trace_intel_irq_exit
, "local_timer");
232 unregister_trace_local_timer_entry(trace_intel_irq_entry
, NULL
);
234 #endif /* CONFIG_OSNOISE_TRACER && CONFIG_X86_LOCAL_APIC */