1 /* SPDX-License-Identifier: MIT */
2 /*
3  * Copyright © 2025 Intel Corporation
4  */
5 
6 #ifndef _XE_PMU_TYPES_H_
7 #define _XE_PMU_TYPES_H_
8 
9 #include <linux/perf_event.h>
10 #include <linux/spinlock_types.h>
11 
12 #define XE_PMU_MAX_GT 2
13 
14 /**
15  * struct xe_pmu - PMU related data per Xe device
16  *
17  * Stores per device PMU info that includes event/perf attributes and sampling
18  * counters across all GTs for this device.
19  */
20 struct xe_pmu {
21 	/**
22 	 * @base: PMU base.
23 	 */
24 	struct pmu base;
25 	/**
26 	 * @registered: PMU is registered and not in the unregistering process.
27 	 */
28 	bool registered;
29 	/**
30 	 * @name: Name as registered with perf core.
31 	 */
32 	const char *name;
33 	/**
34 	 * @supported_events: Bitmap of supported events, indexed by event id
35 	 */
36 	u64 supported_events;
37 };
38 
39 #endif
40