162306a36Sopenharmony_ci#undef TRACE_SYSTEM
262306a36Sopenharmony_ci#define TRACE_SYSTEM irq_matrix
362306a36Sopenharmony_ci
462306a36Sopenharmony_ci#if !defined(_TRACE_IRQ_MATRIX_H) || defined(TRACE_HEADER_MULTI_READ)
562306a36Sopenharmony_ci#define _TRACE_IRQ_MATRIX_H
662306a36Sopenharmony_ci
762306a36Sopenharmony_ci#include <linux/tracepoint.h>
862306a36Sopenharmony_ci
962306a36Sopenharmony_cistruct irq_matrix;
1062306a36Sopenharmony_cistruct cpumap;
1162306a36Sopenharmony_ci
1262306a36Sopenharmony_ciDECLARE_EVENT_CLASS(irq_matrix_global,
1362306a36Sopenharmony_ci
1462306a36Sopenharmony_ci	TP_PROTO(struct irq_matrix *matrix),
1562306a36Sopenharmony_ci
1662306a36Sopenharmony_ci	TP_ARGS(matrix),
1762306a36Sopenharmony_ci
1862306a36Sopenharmony_ci	TP_STRUCT__entry(
1962306a36Sopenharmony_ci		__field(	unsigned int,	online_maps		)
2062306a36Sopenharmony_ci		__field(	unsigned int,	global_available	)
2162306a36Sopenharmony_ci		__field(	unsigned int,	global_reserved		)
2262306a36Sopenharmony_ci		__field(	unsigned int,	total_allocated		)
2362306a36Sopenharmony_ci	),
2462306a36Sopenharmony_ci
2562306a36Sopenharmony_ci	TP_fast_assign(
2662306a36Sopenharmony_ci		__entry->online_maps		= matrix->online_maps;
2762306a36Sopenharmony_ci		__entry->global_available	= matrix->global_available;
2862306a36Sopenharmony_ci		__entry->global_reserved	= matrix->global_reserved;
2962306a36Sopenharmony_ci		__entry->total_allocated	= matrix->total_allocated;
3062306a36Sopenharmony_ci	),
3162306a36Sopenharmony_ci
3262306a36Sopenharmony_ci	TP_printk("online_maps=%d global_avl=%u, global_rsvd=%u, total_alloc=%u",
3362306a36Sopenharmony_ci		  __entry->online_maps, __entry->global_available,
3462306a36Sopenharmony_ci		  __entry->global_reserved, __entry->total_allocated)
3562306a36Sopenharmony_ci);
3662306a36Sopenharmony_ci
3762306a36Sopenharmony_ciDECLARE_EVENT_CLASS(irq_matrix_global_update,
3862306a36Sopenharmony_ci
3962306a36Sopenharmony_ci	TP_PROTO(int bit, struct irq_matrix *matrix),
4062306a36Sopenharmony_ci
4162306a36Sopenharmony_ci	TP_ARGS(bit, matrix),
4262306a36Sopenharmony_ci
4362306a36Sopenharmony_ci	TP_STRUCT__entry(
4462306a36Sopenharmony_ci		__field(	int,		bit			)
4562306a36Sopenharmony_ci		__field(	unsigned int,	online_maps		)
4662306a36Sopenharmony_ci		__field(	unsigned int,	global_available	)
4762306a36Sopenharmony_ci		__field(	unsigned int,	global_reserved		)
4862306a36Sopenharmony_ci		__field(	unsigned int,	total_allocated		)
4962306a36Sopenharmony_ci	),
5062306a36Sopenharmony_ci
5162306a36Sopenharmony_ci	TP_fast_assign(
5262306a36Sopenharmony_ci		__entry->bit			= bit;
5362306a36Sopenharmony_ci		__entry->online_maps		= matrix->online_maps;
5462306a36Sopenharmony_ci		__entry->global_available	= matrix->global_available;
5562306a36Sopenharmony_ci		__entry->global_reserved	= matrix->global_reserved;
5662306a36Sopenharmony_ci		__entry->total_allocated	= matrix->total_allocated;
5762306a36Sopenharmony_ci	),
5862306a36Sopenharmony_ci
5962306a36Sopenharmony_ci	TP_printk("bit=%d online_maps=%d global_avl=%u, global_rsvd=%u, total_alloc=%u",
6062306a36Sopenharmony_ci		  __entry->bit, __entry->online_maps,
6162306a36Sopenharmony_ci		  __entry->global_available, __entry->global_reserved,
6262306a36Sopenharmony_ci		  __entry->total_allocated)
6362306a36Sopenharmony_ci);
6462306a36Sopenharmony_ci
6562306a36Sopenharmony_ciDECLARE_EVENT_CLASS(irq_matrix_cpu,
6662306a36Sopenharmony_ci
6762306a36Sopenharmony_ci	TP_PROTO(int bit, unsigned int cpu, struct irq_matrix *matrix,
6862306a36Sopenharmony_ci		 struct cpumap *cmap),
6962306a36Sopenharmony_ci
7062306a36Sopenharmony_ci	TP_ARGS(bit, cpu, matrix, cmap),
7162306a36Sopenharmony_ci
7262306a36Sopenharmony_ci	TP_STRUCT__entry(
7362306a36Sopenharmony_ci		__field(	int,		bit			)
7462306a36Sopenharmony_ci		__field(	unsigned int,	cpu			)
7562306a36Sopenharmony_ci		__field(	bool,		online			)
7662306a36Sopenharmony_ci		__field(	unsigned int,	available		)
7762306a36Sopenharmony_ci		__field(	unsigned int,	allocated		)
7862306a36Sopenharmony_ci		__field(	unsigned int,	managed			)
7962306a36Sopenharmony_ci		__field(	unsigned int,	online_maps		)
8062306a36Sopenharmony_ci		__field(	unsigned int,	global_available	)
8162306a36Sopenharmony_ci		__field(	unsigned int,	global_reserved		)
8262306a36Sopenharmony_ci		__field(	unsigned int,	total_allocated		)
8362306a36Sopenharmony_ci	),
8462306a36Sopenharmony_ci
8562306a36Sopenharmony_ci	TP_fast_assign(
8662306a36Sopenharmony_ci		__entry->bit			= bit;
8762306a36Sopenharmony_ci		__entry->cpu			= cpu;
8862306a36Sopenharmony_ci		__entry->online			= cmap->online;
8962306a36Sopenharmony_ci		__entry->available		= cmap->available;
9062306a36Sopenharmony_ci		__entry->allocated		= cmap->allocated;
9162306a36Sopenharmony_ci		__entry->managed		= cmap->managed;
9262306a36Sopenharmony_ci		__entry->online_maps		= matrix->online_maps;
9362306a36Sopenharmony_ci		__entry->global_available	= matrix->global_available;
9462306a36Sopenharmony_ci		__entry->global_reserved	= matrix->global_reserved;
9562306a36Sopenharmony_ci		__entry->total_allocated	= matrix->total_allocated;
9662306a36Sopenharmony_ci	),
9762306a36Sopenharmony_ci
9862306a36Sopenharmony_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",
9962306a36Sopenharmony_ci		  __entry->bit, __entry->cpu, __entry->online,
10062306a36Sopenharmony_ci		  __entry->available, __entry->allocated,
10162306a36Sopenharmony_ci		  __entry->managed, __entry->online_maps,
10262306a36Sopenharmony_ci		  __entry->global_available, __entry->global_reserved,
10362306a36Sopenharmony_ci		  __entry->total_allocated)
10462306a36Sopenharmony_ci);
10562306a36Sopenharmony_ci
10662306a36Sopenharmony_ciDEFINE_EVENT(irq_matrix_global, irq_matrix_online,
10762306a36Sopenharmony_ci
10862306a36Sopenharmony_ci	TP_PROTO(struct irq_matrix *matrix),
10962306a36Sopenharmony_ci
11062306a36Sopenharmony_ci	TP_ARGS(matrix)
11162306a36Sopenharmony_ci);
11262306a36Sopenharmony_ci
11362306a36Sopenharmony_ciDEFINE_EVENT(irq_matrix_global, irq_matrix_offline,
11462306a36Sopenharmony_ci
11562306a36Sopenharmony_ci	TP_PROTO(struct irq_matrix *matrix),
11662306a36Sopenharmony_ci
11762306a36Sopenharmony_ci	TP_ARGS(matrix)
11862306a36Sopenharmony_ci);
11962306a36Sopenharmony_ci
12062306a36Sopenharmony_ciDEFINE_EVENT(irq_matrix_global, irq_matrix_reserve,
12162306a36Sopenharmony_ci
12262306a36Sopenharmony_ci	TP_PROTO(struct irq_matrix *matrix),
12362306a36Sopenharmony_ci
12462306a36Sopenharmony_ci	TP_ARGS(matrix)
12562306a36Sopenharmony_ci);
12662306a36Sopenharmony_ci
12762306a36Sopenharmony_ciDEFINE_EVENT(irq_matrix_global, irq_matrix_remove_reserved,
12862306a36Sopenharmony_ci
12962306a36Sopenharmony_ci	TP_PROTO(struct irq_matrix *matrix),
13062306a36Sopenharmony_ci
13162306a36Sopenharmony_ci	TP_ARGS(matrix)
13262306a36Sopenharmony_ci);
13362306a36Sopenharmony_ci
13462306a36Sopenharmony_ciDEFINE_EVENT(irq_matrix_global_update, irq_matrix_assign_system,
13562306a36Sopenharmony_ci
13662306a36Sopenharmony_ci	TP_PROTO(int bit, struct irq_matrix *matrix),
13762306a36Sopenharmony_ci
13862306a36Sopenharmony_ci	TP_ARGS(bit, matrix)
13962306a36Sopenharmony_ci);
14062306a36Sopenharmony_ci
14162306a36Sopenharmony_ciDEFINE_EVENT(irq_matrix_cpu, irq_matrix_alloc_reserved,
14262306a36Sopenharmony_ci
14362306a36Sopenharmony_ci	TP_PROTO(int bit, unsigned int cpu,
14462306a36Sopenharmony_ci		 struct irq_matrix *matrix, struct cpumap *cmap),
14562306a36Sopenharmony_ci
14662306a36Sopenharmony_ci	TP_ARGS(bit, cpu, matrix, cmap)
14762306a36Sopenharmony_ci);
14862306a36Sopenharmony_ci
14962306a36Sopenharmony_ciDEFINE_EVENT(irq_matrix_cpu, irq_matrix_reserve_managed,
15062306a36Sopenharmony_ci
15162306a36Sopenharmony_ci	TP_PROTO(int bit, unsigned int cpu,
15262306a36Sopenharmony_ci		 struct irq_matrix *matrix, struct cpumap *cmap),
15362306a36Sopenharmony_ci
15462306a36Sopenharmony_ci	TP_ARGS(bit, cpu, matrix, cmap)
15562306a36Sopenharmony_ci);
15662306a36Sopenharmony_ci
15762306a36Sopenharmony_ciDEFINE_EVENT(irq_matrix_cpu, irq_matrix_remove_managed,
15862306a36Sopenharmony_ci
15962306a36Sopenharmony_ci	TP_PROTO(int bit, unsigned int cpu,
16062306a36Sopenharmony_ci		 struct irq_matrix *matrix, struct cpumap *cmap),
16162306a36Sopenharmony_ci
16262306a36Sopenharmony_ci	TP_ARGS(bit, cpu, matrix, cmap)
16362306a36Sopenharmony_ci);
16462306a36Sopenharmony_ci
16562306a36Sopenharmony_ciDEFINE_EVENT(irq_matrix_cpu, irq_matrix_alloc_managed,
16662306a36Sopenharmony_ci
16762306a36Sopenharmony_ci	TP_PROTO(int bit, unsigned int cpu,
16862306a36Sopenharmony_ci		 struct irq_matrix *matrix, struct cpumap *cmap),
16962306a36Sopenharmony_ci
17062306a36Sopenharmony_ci	TP_ARGS(bit, cpu, matrix, cmap)
17162306a36Sopenharmony_ci);
17262306a36Sopenharmony_ci
17362306a36Sopenharmony_ciDEFINE_EVENT(irq_matrix_cpu, irq_matrix_assign,
17462306a36Sopenharmony_ci
17562306a36Sopenharmony_ci	TP_PROTO(int bit, unsigned int cpu,
17662306a36Sopenharmony_ci		 struct irq_matrix *matrix, struct cpumap *cmap),
17762306a36Sopenharmony_ci
17862306a36Sopenharmony_ci	TP_ARGS(bit, cpu, matrix, cmap)
17962306a36Sopenharmony_ci);
18062306a36Sopenharmony_ci
18162306a36Sopenharmony_ciDEFINE_EVENT(irq_matrix_cpu, irq_matrix_alloc,
18262306a36Sopenharmony_ci
18362306a36Sopenharmony_ci	TP_PROTO(int bit, unsigned int cpu,
18462306a36Sopenharmony_ci		 struct irq_matrix *matrix, struct cpumap *cmap),
18562306a36Sopenharmony_ci
18662306a36Sopenharmony_ci	TP_ARGS(bit, cpu, matrix, cmap)
18762306a36Sopenharmony_ci);
18862306a36Sopenharmony_ci
18962306a36Sopenharmony_ciDEFINE_EVENT(irq_matrix_cpu, irq_matrix_free,
19062306a36Sopenharmony_ci
19162306a36Sopenharmony_ci	TP_PROTO(int bit, unsigned int cpu,
19262306a36Sopenharmony_ci		 struct irq_matrix *matrix, struct cpumap *cmap),
19362306a36Sopenharmony_ci
19462306a36Sopenharmony_ci	TP_ARGS(bit, cpu, matrix, cmap)
19562306a36Sopenharmony_ci);
19662306a36Sopenharmony_ci
19762306a36Sopenharmony_ci
19862306a36Sopenharmony_ci#endif /*  _TRACE_IRQ_H */
19962306a36Sopenharmony_ci
20062306a36Sopenharmony_ci/* This part must be outside protection */
20162306a36Sopenharmony_ci#include <trace/define_trace.h>
202