18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */
28c2ecf20Sopenharmony_ci
38c2ecf20Sopenharmony_ci/*
48c2ecf20Sopenharmony_ci * DOMAIN(name, num, index_kind, is_physical)
58c2ecf20Sopenharmony_ci *
68c2ecf20Sopenharmony_ci * @name:	An all caps token, suitable for use in generating an enum
78c2ecf20Sopenharmony_ci *		member and appending to an event name in sysfs.
88c2ecf20Sopenharmony_ci *
98c2ecf20Sopenharmony_ci * @num:	The number corresponding to the domain as given in
108c2ecf20Sopenharmony_ci *		documentation. We assume the catalog domain and the hcall
118c2ecf20Sopenharmony_ci *		domain have the same numbering (so far they do), but this
128c2ecf20Sopenharmony_ci *		may need to be changed in the future.
138c2ecf20Sopenharmony_ci *
148c2ecf20Sopenharmony_ci * @index_kind: A stringifiable token describing the meaning of the index
158c2ecf20Sopenharmony_ci *		within the given domain. Must fit the parsing rules of the
168c2ecf20Sopenharmony_ci *		perf sysfs api.
178c2ecf20Sopenharmony_ci *
188c2ecf20Sopenharmony_ci * @is_physical: True if the domain is physical, false otherwise (if virtual).
198c2ecf20Sopenharmony_ci *
208c2ecf20Sopenharmony_ci * Note: The terms PHYS_CHIP, PHYS_CORE, VCPU correspond to physical chip,
218c2ecf20Sopenharmony_ci *	 physical core and virtual processor in 24x7 Counters specifications.
228c2ecf20Sopenharmony_ci */
238c2ecf20Sopenharmony_ci
248c2ecf20Sopenharmony_ciDOMAIN(PHYS_CHIP, 0x01, chip, true)
258c2ecf20Sopenharmony_ciDOMAIN(PHYS_CORE, 0x02, core, true)
268c2ecf20Sopenharmony_ciDOMAIN(VCPU_HOME_CORE, 0x03, vcpu, false)
278c2ecf20Sopenharmony_ciDOMAIN(VCPU_HOME_CHIP, 0x04, vcpu, false)
288c2ecf20Sopenharmony_ciDOMAIN(VCPU_HOME_NODE, 0x05, vcpu, false)
298c2ecf20Sopenharmony_ciDOMAIN(VCPU_REMOTE_NODE, 0x06, vcpu, false)
30