1 /* SPDX-License-Identifier: GPL-2.0 */
3 #define TRACE_SYSTEM ipi
5 #if !defined(_TRACE_IPI_H) || defined(TRACE_HEADER_MULTI_READ)
8 #include <linux/tracepoint.h>
11 * ipi_raise - called when a smp cross call is made
13 * @mask: mask of recipient CPUs for the IPI
14 * @reason: string identifying the IPI purpose
16 * It is necessary for @reason to be a static string declared with
17 * __tracepoint_string.
19 TRACE_EVENT(ipi_raise
,
21 TP_PROTO(const struct cpumask
*mask
, const char *reason
),
23 TP_ARGS(mask
, reason
),
26 __bitmask(target_cpus
, nr_cpumask_bits
)
27 __field(const char *, reason
)
31 __assign_bitmask(target_cpus
, cpumask_bits(mask
), nr_cpumask_bits
);
32 __entry
->reason
= reason
;
35 TP_printk("target_mask=%s (%s)", __get_bitmask(target_cpus
), __entry
->reason
)
38 TRACE_EVENT(ipi_send_cpu
,
40 TP_PROTO(const unsigned int cpu
, unsigned long callsite
, void *callback
),
42 TP_ARGS(cpu
, callsite
, callback
),
45 __field(unsigned int, cpu
)
46 __field(void *, callsite
)
47 __field(void *, callback
)
52 __entry
->callsite
= (void *)callsite
;
53 __entry
->callback
= callback
;
56 TP_printk("cpu=%u callsite=%pS callback=%pS",
57 __entry
->cpu
, __entry
->callsite
, __entry
->callback
)
60 TRACE_EVENT(ipi_send_cpumask
,
62 TP_PROTO(const struct cpumask
*cpumask
, unsigned long callsite
, void *callback
),
64 TP_ARGS(cpumask
, callsite
, callback
),
68 __field(void *, callsite
)
69 __field(void *, callback
)
73 __assign_cpumask(cpumask
, cpumask_bits(cpumask
));
74 __entry
->callsite
= (void *)callsite
;
75 __entry
->callback
= callback
;
78 TP_printk("cpumask=%s callsite=%pS callback=%pS",
79 __get_cpumask(cpumask
), __entry
->callsite
, __entry
->callback
)
82 DECLARE_EVENT_CLASS(ipi_handler
,
84 TP_PROTO(const char *reason
),
89 __field(const char *, reason
)
93 __entry
->reason
= reason
;
96 TP_printk("(%s)", __entry
->reason
)
100 * ipi_entry - called immediately before the IPI handler
102 * @reason: string identifying the IPI purpose
104 * It is necessary for @reason to be a static string declared with
105 * __tracepoint_string, ideally the same as used with trace_ipi_raise
108 DEFINE_EVENT(ipi_handler
, ipi_entry
,
110 TP_PROTO(const char *reason
),
116 * ipi_exit - called immediately after the IPI handler returns
118 * @reason: string identifying the IPI purpose
120 * It is necessary for @reason to be a static string declared with
121 * __tracepoint_string, ideally the same as used with trace_ipi_raise for
124 DEFINE_EVENT(ipi_handler
, ipi_exit
,
126 TP_PROTO(const char *reason
),
131 #endif /* _TRACE_IPI_H */
133 /* This part must be outside protection */
134 #include <trace/define_trace.h>