18c2ecf20Sopenharmony_ci#undef TRACE_SYSTEM
28c2ecf20Sopenharmony_ci#define TRACE_SYSTEM irq_matrix
38c2ecf20Sopenharmony_ci
48c2ecf20Sopenharmony_ci#if !defined(_TRACE_IRQ_MATRIX_H) || defined(TRACE_HEADER_MULTI_READ)
58c2ecf20Sopenharmony_ci#define _TRACE_IRQ_MATRIX_H
68c2ecf20Sopenharmony_ci
78c2ecf20Sopenharmony_ci#include <linux/tracepoint.h>
88c2ecf20Sopenharmony_ci
98c2ecf20Sopenharmony_cistruct irq_matrix;
108c2ecf20Sopenharmony_cistruct cpumap;
118c2ecf20Sopenharmony_ci
128c2ecf20Sopenharmony_ciDECLARE_EVENT_CLASS(irq_matrix_global,
138c2ecf20Sopenharmony_ci
148c2ecf20Sopenharmony_ci	TP_PROTO(struct irq_matrix *matrix),
158c2ecf20Sopenharmony_ci
168c2ecf20Sopenharmony_ci	TP_ARGS(matrix),
178c2ecf20Sopenharmony_ci
188c2ecf20Sopenharmony_ci	TP_STRUCT__entry(
198c2ecf20Sopenharmony_ci		__field(	unsigned int,	online_maps		)
208c2ecf20Sopenharmony_ci		__field(	unsigned int,	global_available	)
218c2ecf20Sopenharmony_ci		__field(	unsigned int,	global_reserved		)
228c2ecf20Sopenharmony_ci		__field(	unsigned int,	total_allocated		)
238c2ecf20Sopenharmony_ci	),
248c2ecf20Sopenharmony_ci
258c2ecf20Sopenharmony_ci	TP_fast_assign(
268c2ecf20Sopenharmony_ci		__entry->online_maps		= matrix->online_maps;
278c2ecf20Sopenharmony_ci		__entry->global_available	= matrix->global_available;
288c2ecf20Sopenharmony_ci		__entry->global_reserved	= matrix->global_reserved;
298c2ecf20Sopenharmony_ci		__entry->total_allocated	= matrix->total_allocated;
308c2ecf20Sopenharmony_ci	),
318c2ecf20Sopenharmony_ci
328c2ecf20Sopenharmony_ci	TP_printk("online_maps=%d global_avl=%u, global_rsvd=%u, total_alloc=%u",
338c2ecf20Sopenharmony_ci		  __entry->online_maps, __entry->global_available,
348c2ecf20Sopenharmony_ci		  __entry->global_reserved, __entry->total_allocated)
358c2ecf20Sopenharmony_ci);
368c2ecf20Sopenharmony_ci
378c2ecf20Sopenharmony_ciDECLARE_EVENT_CLASS(irq_matrix_global_update,
388c2ecf20Sopenharmony_ci
398c2ecf20Sopenharmony_ci	TP_PROTO(int bit, struct irq_matrix *matrix),
408c2ecf20Sopenharmony_ci
418c2ecf20Sopenharmony_ci	TP_ARGS(bit, matrix),
428c2ecf20Sopenharmony_ci
438c2ecf20Sopenharmony_ci	TP_STRUCT__entry(
448c2ecf20Sopenharmony_ci		__field(	int,		bit			)
458c2ecf20Sopenharmony_ci		__field(	unsigned int,	online_maps		)
468c2ecf20Sopenharmony_ci		__field(	unsigned int,	global_available	)
478c2ecf20Sopenharmony_ci		__field(	unsigned int,	global_reserved		)
488c2ecf20Sopenharmony_ci		__field(	unsigned int,	total_allocated		)
498c2ecf20Sopenharmony_ci	),
508c2ecf20Sopenharmony_ci
518c2ecf20Sopenharmony_ci	TP_fast_assign(
528c2ecf20Sopenharmony_ci		__entry->bit			= bit;
538c2ecf20Sopenharmony_ci		__entry->online_maps		= matrix->online_maps;
548c2ecf20Sopenharmony_ci		__entry->global_available	= matrix->global_available;
558c2ecf20Sopenharmony_ci		__entry->global_reserved	= matrix->global_reserved;
568c2ecf20Sopenharmony_ci		__entry->total_allocated	= matrix->total_allocated;
578c2ecf20Sopenharmony_ci	),
588c2ecf20Sopenharmony_ci
598c2ecf20Sopenharmony_ci	TP_printk("bit=%d online_maps=%d global_avl=%u, global_rsvd=%u, total_alloc=%u",
608c2ecf20Sopenharmony_ci		  __entry->bit, __entry->online_maps,
618c2ecf20Sopenharmony_ci		  __entry->global_available, __entry->global_reserved,
628c2ecf20Sopenharmony_ci		  __entry->total_allocated)
638c2ecf20Sopenharmony_ci);
648c2ecf20Sopenharmony_ci
658c2ecf20Sopenharmony_ciDECLARE_EVENT_CLASS(irq_matrix_cpu,
668c2ecf20Sopenharmony_ci
678c2ecf20Sopenharmony_ci	TP_PROTO(int bit, unsigned int cpu, struct irq_matrix *matrix,
688c2ecf20Sopenharmony_ci		 struct cpumap *cmap),
698c2ecf20Sopenharmony_ci
708c2ecf20Sopenharmony_ci	TP_ARGS(bit, cpu, matrix, cmap),
718c2ecf20Sopenharmony_ci
728c2ecf20Sopenharmony_ci	TP_STRUCT__entry(
738c2ecf20Sopenharmony_ci		__field(	int,		bit			)
748c2ecf20Sopenharmony_ci		__field(	unsigned int,	cpu			)
758c2ecf20Sopenharmony_ci		__field(	bool,		online			)
768c2ecf20Sopenharmony_ci		__field(	unsigned int,	available		)
778c2ecf20Sopenharmony_ci		__field(	unsigned int,	allocated		)
788c2ecf20Sopenharmony_ci		__field(	unsigned int,	managed			)
798c2ecf20Sopenharmony_ci		__field(	unsigned int,	online_maps		)
808c2ecf20Sopenharmony_ci		__field(	unsigned int,	global_available	)
818c2ecf20Sopenharmony_ci		__field(	unsigned int,	global_reserved		)
828c2ecf20Sopenharmony_ci		__field(	unsigned int,	total_allocated		)
838c2ecf20Sopenharmony_ci	),
848c2ecf20Sopenharmony_ci
858c2ecf20Sopenharmony_ci	TP_fast_assign(
868c2ecf20Sopenharmony_ci		__entry->bit			= bit;
878c2ecf20Sopenharmony_ci		__entry->cpu			= cpu;
888c2ecf20Sopenharmony_ci		__entry->online			= cmap->online;
898c2ecf20Sopenharmony_ci		__entry->available		= cmap->available;
908c2ecf20Sopenharmony_ci		__entry->allocated		= cmap->allocated;
918c2ecf20Sopenharmony_ci		__entry->managed		= cmap->managed;
928c2ecf20Sopenharmony_ci		__entry->online_maps		= matrix->online_maps;
938c2ecf20Sopenharmony_ci		__entry->global_available	= matrix->global_available;
948c2ecf20Sopenharmony_ci		__entry->global_reserved	= matrix->global_reserved;
958c2ecf20Sopenharmony_ci		__entry->total_allocated	= matrix->total_allocated;
968c2ecf20Sopenharmony_ci	),
978c2ecf20Sopenharmony_ci
988c2ecf20Sopenharmony_ci	TP_printk("bit=%d cpu=%u online=%d avl=%u alloc=%u managed=%u online_maps=%u global_avl=%u, global_rsvd=%u, total_alloc=%u",
998c2ecf20Sopenharmony_ci		  __entry->bit, __entry->cpu, __entry->online,
1008c2ecf20Sopenharmony_ci		  __entry->available, __entry->allocated,
1018c2ecf20Sopenharmony_ci		  __entry->managed, __entry->online_maps,
1028c2ecf20Sopenharmony_ci		  __entry->global_available, __entry->global_reserved,
1038c2ecf20Sopenharmony_ci		  __entry->total_allocated)
1048c2ecf20Sopenharmony_ci);
1058c2ecf20Sopenharmony_ci
1068c2ecf20Sopenharmony_ciDEFINE_EVENT(irq_matrix_global, irq_matrix_online,
1078c2ecf20Sopenharmony_ci
1088c2ecf20Sopenharmony_ci	TP_PROTO(struct irq_matrix *matrix),
1098c2ecf20Sopenharmony_ci
1108c2ecf20Sopenharmony_ci	TP_ARGS(matrix)
1118c2ecf20Sopenharmony_ci);
1128c2ecf20Sopenharmony_ci
1138c2ecf20Sopenharmony_ciDEFINE_EVENT(irq_matrix_global, irq_matrix_offline,
1148c2ecf20Sopenharmony_ci
1158c2ecf20Sopenharmony_ci	TP_PROTO(struct irq_matrix *matrix),
1168c2ecf20Sopenharmony_ci
1178c2ecf20Sopenharmony_ci	TP_ARGS(matrix)
1188c2ecf20Sopenharmony_ci);
1198c2ecf20Sopenharmony_ci
1208c2ecf20Sopenharmony_ciDEFINE_EVENT(irq_matrix_global, irq_matrix_reserve,
1218c2ecf20Sopenharmony_ci
1228c2ecf20Sopenharmony_ci	TP_PROTO(struct irq_matrix *matrix),
1238c2ecf20Sopenharmony_ci
1248c2ecf20Sopenharmony_ci	TP_ARGS(matrix)
1258c2ecf20Sopenharmony_ci);
1268c2ecf20Sopenharmony_ci
1278c2ecf20Sopenharmony_ciDEFINE_EVENT(irq_matrix_global, irq_matrix_remove_reserved,
1288c2ecf20Sopenharmony_ci
1298c2ecf20Sopenharmony_ci	TP_PROTO(struct irq_matrix *matrix),
1308c2ecf20Sopenharmony_ci
1318c2ecf20Sopenharmony_ci	TP_ARGS(matrix)
1328c2ecf20Sopenharmony_ci);
1338c2ecf20Sopenharmony_ci
1348c2ecf20Sopenharmony_ciDEFINE_EVENT(irq_matrix_global_update, irq_matrix_assign_system,
1358c2ecf20Sopenharmony_ci
1368c2ecf20Sopenharmony_ci	TP_PROTO(int bit, struct irq_matrix *matrix),
1378c2ecf20Sopenharmony_ci
1388c2ecf20Sopenharmony_ci	TP_ARGS(bit, matrix)
1398c2ecf20Sopenharmony_ci);
1408c2ecf20Sopenharmony_ci
1418c2ecf20Sopenharmony_ciDEFINE_EVENT(irq_matrix_cpu, irq_matrix_alloc_reserved,
1428c2ecf20Sopenharmony_ci
1438c2ecf20Sopenharmony_ci	TP_PROTO(int bit, unsigned int cpu,
1448c2ecf20Sopenharmony_ci		 struct irq_matrix *matrix, struct cpumap *cmap),
1458c2ecf20Sopenharmony_ci
1468c2ecf20Sopenharmony_ci	TP_ARGS(bit, cpu, matrix, cmap)
1478c2ecf20Sopenharmony_ci);
1488c2ecf20Sopenharmony_ci
1498c2ecf20Sopenharmony_ciDEFINE_EVENT(irq_matrix_cpu, irq_matrix_reserve_managed,
1508c2ecf20Sopenharmony_ci
1518c2ecf20Sopenharmony_ci	TP_PROTO(int bit, unsigned int cpu,
1528c2ecf20Sopenharmony_ci		 struct irq_matrix *matrix, struct cpumap *cmap),
1538c2ecf20Sopenharmony_ci
1548c2ecf20Sopenharmony_ci	TP_ARGS(bit, cpu, matrix, cmap)
1558c2ecf20Sopenharmony_ci);
1568c2ecf20Sopenharmony_ci
1578c2ecf20Sopenharmony_ciDEFINE_EVENT(irq_matrix_cpu, irq_matrix_remove_managed,
1588c2ecf20Sopenharmony_ci
1598c2ecf20Sopenharmony_ci	TP_PROTO(int bit, unsigned int cpu,
1608c2ecf20Sopenharmony_ci		 struct irq_matrix *matrix, struct cpumap *cmap),
1618c2ecf20Sopenharmony_ci
1628c2ecf20Sopenharmony_ci	TP_ARGS(bit, cpu, matrix, cmap)
1638c2ecf20Sopenharmony_ci);
1648c2ecf20Sopenharmony_ci
1658c2ecf20Sopenharmony_ciDEFINE_EVENT(irq_matrix_cpu, irq_matrix_alloc_managed,
1668c2ecf20Sopenharmony_ci
1678c2ecf20Sopenharmony_ci	TP_PROTO(int bit, unsigned int cpu,
1688c2ecf20Sopenharmony_ci		 struct irq_matrix *matrix, struct cpumap *cmap),
1698c2ecf20Sopenharmony_ci
1708c2ecf20Sopenharmony_ci	TP_ARGS(bit, cpu, matrix, cmap)
1718c2ecf20Sopenharmony_ci);
1728c2ecf20Sopenharmony_ci
1738c2ecf20Sopenharmony_ciDEFINE_EVENT(irq_matrix_cpu, irq_matrix_assign,
1748c2ecf20Sopenharmony_ci
1758c2ecf20Sopenharmony_ci	TP_PROTO(int bit, unsigned int cpu,
1768c2ecf20Sopenharmony_ci		 struct irq_matrix *matrix, struct cpumap *cmap),
1778c2ecf20Sopenharmony_ci
1788c2ecf20Sopenharmony_ci	TP_ARGS(bit, cpu, matrix, cmap)
1798c2ecf20Sopenharmony_ci);
1808c2ecf20Sopenharmony_ci
1818c2ecf20Sopenharmony_ciDEFINE_EVENT(irq_matrix_cpu, irq_matrix_alloc,
1828c2ecf20Sopenharmony_ci
1838c2ecf20Sopenharmony_ci	TP_PROTO(int bit, unsigned int cpu,
1848c2ecf20Sopenharmony_ci		 struct irq_matrix *matrix, struct cpumap *cmap),
1858c2ecf20Sopenharmony_ci
1868c2ecf20Sopenharmony_ci	TP_ARGS(bit, cpu, matrix, cmap)
1878c2ecf20Sopenharmony_ci);
1888c2ecf20Sopenharmony_ci
1898c2ecf20Sopenharmony_ciDEFINE_EVENT(irq_matrix_cpu, irq_matrix_free,
1908c2ecf20Sopenharmony_ci
1918c2ecf20Sopenharmony_ci	TP_PROTO(int bit, unsigned int cpu,
1928c2ecf20Sopenharmony_ci		 struct irq_matrix *matrix, struct cpumap *cmap),
1938c2ecf20Sopenharmony_ci
1948c2ecf20Sopenharmony_ci	TP_ARGS(bit, cpu, matrix, cmap)
1958c2ecf20Sopenharmony_ci);
1968c2ecf20Sopenharmony_ci
1978c2ecf20Sopenharmony_ci
1988c2ecf20Sopenharmony_ci#endif /*  _TRACE_IRQ_H */
1998c2ecf20Sopenharmony_ci
2008c2ecf20Sopenharmony_ci/* This part must be outside protection */
2018c2ecf20Sopenharmony_ci#include <trace/define_trace.h>
202