xref: /freebsd/sys/dev/hwpmc/pmc_events.h (revision 00b6911b7f95bffeff6fdc1843562375d14e9cd8)
1 /*-
2  * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
3  *
4  * Copyright (c) 2005  Joseph Koshy
5  * All rights reserved.
6  *
7  * Redistribution and use in source and binary forms, with or without
8  * modification, are permitted provided that the following conditions
9  * are met:
10  * 1. Redistributions of source code must retain the above copyright
11  *    notice, this list of conditions and the following disclaimer.
12  * 2. Redistributions in binary form must reproduce the above copyright
13  *    notice, this list of conditions and the following disclaimer in the
14  *    documentation and/or other materials provided with the distribution.
15  *
16  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
17  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
20  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26  * SUCH DAMAGE.
27  *
28  * $FreeBSD$
29  */
30 
31 #ifndef _DEV_HWPMC_PMC_EVENTS_H_
32 #define	_DEV_HWPMC_PMC_EVENTS_H_
33 
34 /*
35  * Note: Documentation on adding events can be found both in
36  * the source tree at src/share/doc/papers/hwpmc/hwpmc.ms
37  * as well as on-line at:
38  *
39  * https://wiki.freebsd.org/PmcTools/PmcHardwareHowTo
40  *
41  * Please refer to those resources before you attempt to modify
42  * this file or the hwpmc driver/subsystem.
43  */
44 
45 /* * PMC event codes.
46  *
47  * __PMC_EV(CLASS, SYMBOLIC-NAME)
48  *
49  */
50 /* timestamp counters. */
51 #define        __PMC_EV_TSC()                                                  \
52 	__PMC_EV(TSC, TSC)
53 
54 #define        PMC_EV_TSC_FIRST        PMC_EV_TSC_TSC
55 #define        PMC_EV_TSC_LAST         PMC_EV_TSC_TSC
56 
57 /*
58  * Software events are dynamically defined.
59  */
60 
61 #define        PMC_EV_DYN_COUNT        0x1000
62 
63 #define        PMC_EV_SOFT_FIRST       0x20000
64 #define        PMC_EV_SOFT_LAST        (PMC_EV_SOFT_FIRST + PMC_EV_DYN_COUNT - 1)
65 
66 /*
67  * AMD K7 Events, from "The AMD Athlon(tm) Processor x86 Code
68  * Optimization Guide" [Doc#22007K, Feb 2002]
69  */
70 
71 #define	__PMC_EV_K7()					\
72 __PMC_EV(K7, DC_ACCESSES)				\
73 __PMC_EV(K7, DC_MISSES)					\
74 __PMC_EV(K7, DC_REFILLS_FROM_L2)			\
75 __PMC_EV(K7, DC_REFILLS_FROM_SYSTEM)			\
76 __PMC_EV(K7, DC_WRITEBACKS)				\
77 __PMC_EV(K7, L1_DTLB_MISS_AND_L2_DTLB_HITS)		\
78 __PMC_EV(K7, L1_AND_L2_DTLB_MISSES)			\
79 __PMC_EV(K7, MISALIGNED_REFERENCES)			\
80 __PMC_EV(K7, IC_FETCHES)				\
81 __PMC_EV(K7, IC_MISSES)					\
82 __PMC_EV(K7, L1_ITLB_MISSES)				\
83 __PMC_EV(K7, L1_L2_ITLB_MISSES)				\
84 __PMC_EV(K7, RETIRED_INSTRUCTIONS)			\
85 __PMC_EV(K7, RETIRED_OPS)				\
86 __PMC_EV(K7, RETIRED_BRANCHES)				\
87 __PMC_EV(K7, RETIRED_BRANCHES_MISPREDICTED)		\
88 __PMC_EV(K7, RETIRED_TAKEN_BRANCHES)			\
89 __PMC_EV(K7, RETIRED_TAKEN_BRANCHES_MISPREDICTED)	\
90 __PMC_EV(K7, RETIRED_FAR_CONTROL_TRANSFERS)		\
91 __PMC_EV(K7, RETIRED_RESYNC_BRANCHES)			\
92 __PMC_EV(K7, INTERRUPTS_MASKED_CYCLES)			\
93 __PMC_EV(K7, INTERRUPTS_MASKED_WHILE_PENDING_CYCLES)	\
94 __PMC_EV(K7, HARDWARE_INTERRUPTS)
95 
96 #define	PMC_EV_K7_FIRST	PMC_EV_K7_DC_ACCESSES
97 #define	PMC_EV_K7_LAST	PMC_EV_K7_HARDWARE_INTERRUPTS
98 
99 /* AMD K8 PMCs */
100 
101 #define	__PMC_EV_K8()							\
102 __PMC_EV(K8, FP_DISPATCHED_FPU_OPS)					\
103 __PMC_EV(K8, FP_CYCLES_WITH_NO_FPU_OPS_RETIRED)				\
104 __PMC_EV(K8, FP_DISPATCHED_FPU_FAST_FLAG_OPS)				\
105 __PMC_EV(K8, LS_SEGMENT_REGISTER_LOAD)					\
106 __PMC_EV(K8, LS_MICROARCHITECTURAL_RESYNC_BY_SELF_MODIFYING_CODE)	\
107 __PMC_EV(K8, LS_MICROARCHITECTURAL_RESYNC_BY_SNOOP)			\
108 __PMC_EV(K8, LS_BUFFER2_FULL)						\
109 __PMC_EV(K8, LS_LOCKED_OPERATION)					\
110 __PMC_EV(K8, LS_MICROARCHITECTURAL_LATE_CANCEL)				\
111 __PMC_EV(K8, LS_RETIRED_CFLUSH_INSTRUCTIONS)				\
112 __PMC_EV(K8, LS_RETIRED_CPUID_INSTRUCTIONS)				\
113 __PMC_EV(K8, DC_ACCESS)							\
114 __PMC_EV(K8, DC_MISS)							\
115 __PMC_EV(K8, DC_REFILL_FROM_L2)						\
116 __PMC_EV(K8, DC_REFILL_FROM_SYSTEM)					\
117 __PMC_EV(K8, DC_COPYBACK)						\
118 __PMC_EV(K8, DC_L1_DTLB_MISS_AND_L2_DTLB_HIT)				\
119 __PMC_EV(K8, DC_L1_DTLB_MISS_AND_L2_DTLB_MISS)				\
120 __PMC_EV(K8, DC_MISALIGNED_DATA_REFERENCE)				\
121 __PMC_EV(K8, DC_MICROARCHITECTURAL_LATE_CANCEL)				\
122 __PMC_EV(K8, DC_MICROARCHITECTURAL_EARLY_CANCEL)			\
123 __PMC_EV(K8, DC_ONE_BIT_ECC_ERROR)					\
124 __PMC_EV(K8, DC_DISPATCHED_PREFETCH_INSTRUCTIONS)			\
125 __PMC_EV(K8, DC_DCACHE_ACCESSES_BY_LOCKS)				\
126 __PMC_EV(K8, BU_CPU_CLK_UNHALTED)					\
127 __PMC_EV(K8, BU_INTERNAL_L2_REQUEST)					\
128 __PMC_EV(K8, BU_FILL_REQUEST_L2_MISS)					\
129 __PMC_EV(K8, BU_FILL_INTO_L2)						\
130 __PMC_EV(K8, IC_FETCH)							\
131 __PMC_EV(K8, IC_MISS)							\
132 __PMC_EV(K8, IC_REFILL_FROM_L2)						\
133 __PMC_EV(K8, IC_REFILL_FROM_SYSTEM)					\
134 __PMC_EV(K8, IC_L1_ITLB_MISS_AND_L2_ITLB_HIT)				\
135 __PMC_EV(K8, IC_L1_ITLB_MISS_AND_L2_ITLB_MISS)				\
136 __PMC_EV(K8, IC_MICROARCHITECTURAL_RESYNC_BY_SNOOP)			\
137 __PMC_EV(K8, IC_INSTRUCTION_FETCH_STALL)				\
138 __PMC_EV(K8, IC_RETURN_STACK_HIT)					\
139 __PMC_EV(K8, IC_RETURN_STACK_OVERFLOW)					\
140 __PMC_EV(K8, FR_RETIRED_X86_INSTRUCTIONS)				\
141 __PMC_EV(K8, FR_RETIRED_UOPS)						\
142 __PMC_EV(K8, FR_RETIRED_BRANCHES)					\
143 __PMC_EV(K8, FR_RETIRED_BRANCHES_MISPREDICTED)				\
144 __PMC_EV(K8, FR_RETIRED_TAKEN_BRANCHES)					\
145 __PMC_EV(K8, FR_RETIRED_TAKEN_BRANCHES_MISPREDICTED)			\
146 __PMC_EV(K8, FR_RETIRED_FAR_CONTROL_TRANSFERS)				\
147 __PMC_EV(K8, FR_RETIRED_RESYNCS)					\
148 __PMC_EV(K8, FR_RETIRED_NEAR_RETURNS)					\
149 __PMC_EV(K8, FR_RETIRED_NEAR_RETURNS_MISPREDICTED)			\
150 __PMC_EV(K8, FR_RETIRED_TAKEN_BRANCHES_MISPREDICTED_BY_ADDR_MISCOMPARE)	\
151 __PMC_EV(K8, FR_RETIRED_FPU_INSTRUCTIONS)				\
152 __PMC_EV(K8, FR_RETIRED_FASTPATH_DOUBLE_OP_INSTRUCTIONS)		\
153 __PMC_EV(K8, FR_INTERRUPTS_MASKED_CYCLES)				\
154 __PMC_EV(K8, FR_INTERRUPTS_MASKED_WHILE_PENDING_CYCLES)			\
155 __PMC_EV(K8, FR_TAKEN_HARDWARE_INTERRUPTS)				\
156 __PMC_EV(K8, FR_DECODER_EMPTY)						\
157 __PMC_EV(K8, FR_DISPATCH_STALLS)					\
158 __PMC_EV(K8, FR_DISPATCH_STALL_FROM_BRANCH_ABORT_TO_RETIRE)		\
159 __PMC_EV(K8, FR_DISPATCH_STALL_FOR_SERIALIZATION)			\
160 __PMC_EV(K8, FR_DISPATCH_STALL_FOR_SEGMENT_LOAD)			\
161 __PMC_EV(K8, FR_DISPATCH_STALL_WHEN_REORDER_BUFFER_IS_FULL)		\
162 __PMC_EV(K8, FR_DISPATCH_STALL_WHEN_RESERVATION_STATIONS_ARE_FULL)	\
163 __PMC_EV(K8, FR_DISPATCH_STALL_WHEN_FPU_IS_FULL)			\
164 __PMC_EV(K8, FR_DISPATCH_STALL_WHEN_LS_IS_FULL)				\
165 __PMC_EV(K8, FR_DISPATCH_STALL_WHEN_WAITING_FOR_ALL_TO_BE_QUIET)	\
166 __PMC_EV(K8, FR_DISPATCH_STALL_WHEN_FAR_XFER_OR_RESYNC_BRANCH_PENDING)	\
167 __PMC_EV(K8, FR_FPU_EXCEPTIONS)						\
168 __PMC_EV(K8, FR_NUMBER_OF_BREAKPOINTS_FOR_DR0)				\
169 __PMC_EV(K8, FR_NUMBER_OF_BREAKPOINTS_FOR_DR1)				\
170 __PMC_EV(K8, FR_NUMBER_OF_BREAKPOINTS_FOR_DR2)				\
171 __PMC_EV(K8, FR_NUMBER_OF_BREAKPOINTS_FOR_DR3)				\
172 __PMC_EV(K8, NB_MEMORY_CONTROLLER_PAGE_ACCESS_EVENT)			\
173 __PMC_EV(K8, NB_MEMORY_CONTROLLER_PAGE_TABLE_OVERFLOW)			\
174 __PMC_EV(K8, NB_MEMORY_CONTROLLER_DRAM_COMMAND_SLOTS_MISSED)		\
175 __PMC_EV(K8, NB_MEMORY_CONTROLLER_TURNAROUND)				\
176 __PMC_EV(K8, NB_MEMORY_CONTROLLER_BYPASS_SATURATION)			\
177 __PMC_EV(K8, NB_SIZED_COMMANDS)						\
178 __PMC_EV(K8, NB_PROBE_RESULT)						\
179 __PMC_EV(K8, NB_HT_BUS0_BANDWIDTH)					\
180 __PMC_EV(K8, NB_HT_BUS1_BANDWIDTH)					\
181 __PMC_EV(K8, NB_HT_BUS2_BANDWIDTH)
182 
183 #define	PMC_EV_K8_FIRST		PMC_EV_K8_FP_DISPATCHED_FPU_OPS
184 #define	PMC_EV_K8_LAST		PMC_EV_K8_NB_HT_BUS2_BANDWIDTH
185 
186 /*
187  * Events supported by Intel architectural fixed function counters,
188  * from the "Intel 64 and IA-32 Architectures Software Developer's
189  * Manual Volume 3B: System Programming Guide, Part 2", July 2008.
190  */
191 #define	__PMC_EV_IAF()							\
192 __PMC_EV(IAF, INSTR_RETIRED_ANY)					\
193 __PMC_EV(IAF, CPU_CLK_UNHALTED_CORE)					\
194 __PMC_EV(IAF, CPU_CLK_UNHALTED_REF)
195 
196 #define	PMC_EV_IAF_FIRST	PMC_EV_IAF_INSTR_RETIRED_ANY
197 #define	PMC_EV_IAF_LAST		PMC_EV_IAF_CPU_CLK_UNHALTED_REF
198 
199 #define	__PMC_EV_ALIAS_IAF()						\
200 __PMC_EV_ALIAS("instruction-retired",	IAF_INSTR_RETIRED_ANY)		\
201 __PMC_EV_ALIAS("unhalted-core-cycles",	IAF_CPU_CLK_UNHALTED_CORE)	\
202 __PMC_EV_ALIAS("unhalted-reference-cycles", IAF_CPU_CLK_UNHALTED_REF)
203 
204 
205 #define	PMC_EV_IAP_FIRST	PMC_EV_IAP_ARCH_BR_INS_RET
206 #define	PMC_EV_IAP_LAST		PMC_EV_IAP_EVENT_FDH_40H
207 
208 /*
209  * Map "architectural" event names to event ids.
210  */
211 #define	__PMC_EV_ALIAS_INTEL_ARCHITECTURAL()				\
212 __PMC_EV_ALIAS("branch-instruction-retired",	IAP_ARCH_BR_INS_RET)	\
213 __PMC_EV_ALIAS("branch-misses-retired",		IAP_ARCH_BR_MIS_RET)	\
214 __PMC_EV_ALIAS("instruction-retired",		IAP_ARCH_INS_RET)	\
215 __PMC_EV_ALIAS("llc-misses",			IAP_ARCH_LLC_MIS)	\
216 __PMC_EV_ALIAS("llc-reference",			IAP_ARCH_LLC_REF)	\
217 __PMC_EV_ALIAS("unhalted-reference-cycles",	IAP_ARCH_UNH_REF_CYC)	\
218 __PMC_EV_ALIAS("unhalted-core-cycles",		IAP_ARCH_UNH_COR_CYC)
219 
220 #define        __PMC_EV_UCP()                          \
221 	__PMC_EV(UCP, EVENT_0CH_04H_E)					   \
222 	__PMC_EV(UCP, EVENT_0CH_04H_F)					   \
223 	__PMC_EV(UCP, EVENT_0CH_04H_M)					   \
224 	__PMC_EV(UCP, EVENT_0CH_04H_S)					   \
225 	__PMC_EV(UCP, EVENT_0CH_08H_E)					   \
226 	__PMC_EV(UCP, EVENT_0CH_08H_F)					   \
227 	__PMC_EV(UCP, EVENT_0CH_08H_M)					   \
228 	__PMC_EV(UCP, EVENT_0CH_08H_S)					   \
229 
230 /*
231  * Intel XScale events from:
232  *
233  * Intel XScale Core Developer's Manual
234  * January, 2004, #27347302
235  *
236  * 3rd Generation Intel XScale Microarchitecture
237  * Developer's Manual
238  * May 2007, #31628302
239  *
240  * First 14 events are for 1st and 2nd Generation Intel XScale cores. The
241  * remaining are available only on 3rd Generation Intel XScale cores.
242  */
243 #define	__PMC_EV_XSCALE()				\
244 	__PMC_EV(XSCALE, IC_FETCH)			\
245 	__PMC_EV(XSCALE, IC_MISS)			\
246 	__PMC_EV(XSCALE, DATA_DEPENDENCY_STALLED)	\
247 	__PMC_EV(XSCALE, ITLB_MISS)			\
248 	__PMC_EV(XSCALE, DTLB_MISS)			\
249 	__PMC_EV(XSCALE, BRANCH_RETIRED)		\
250 	__PMC_EV(XSCALE, BRANCH_MISPRED)		\
251 	__PMC_EV(XSCALE, INSTR_RETIRED)			\
252 	__PMC_EV(XSCALE, DC_FULL_CYCLE)			\
253 	__PMC_EV(XSCALE, DC_FULL_CONTIG)		\
254 	__PMC_EV(XSCALE, DC_ACCESS)			\
255 	__PMC_EV(XSCALE, DC_MISS)			\
256 	__PMC_EV(XSCALE, DC_WRITEBACK)			\
257 	__PMC_EV(XSCALE, PC_CHANGE)			\
258 	__PMC_EV(XSCALE, BRANCH_RETIRED_ALL)		\
259 	__PMC_EV(XSCALE, INSTR_CYCLE)			\
260 	__PMC_EV(XSCALE, CP_STALL)			\
261 	__PMC_EV(XSCALE, PC_CHANGE_ALL)			\
262 	__PMC_EV(XSCALE, PIPELINE_FLUSH)		\
263 	__PMC_EV(XSCALE, BACKEND_STALL)			\
264 	__PMC_EV(XSCALE, MULTIPLIER_USE)		\
265 	__PMC_EV(XSCALE, MULTIPLIER_STALLED)		\
266 	__PMC_EV(XSCALE, DATA_CACHE_STALLED)		\
267 	__PMC_EV(XSCALE, L2_CACHE_REQ)			\
268 	__PMC_EV(XSCALE, L2_CACHE_MISS)			\
269 	__PMC_EV(XSCALE, ADDRESS_BUS_TRANS)		\
270 	__PMC_EV(XSCALE, SELF_ADDRESS_BUS_TRANS)	\
271 	__PMC_EV(XSCALE, DATA_BUS_TRANS)
272 
273 #define	PMC_EV_XSCALE_FIRST	PMC_EV_XSCALE_IC_FETCH
274 #define	PMC_EV_XSCALE_LAST	PMC_EV_XSCALE_DATA_BUS_TRANS
275 
276 /*
277  * ARMv7 Events
278  */
279 
280 #define	__PMC_EV_ARMV7()			\
281 	__PMC_EV(ARMV7, EVENT_00H)		\
282 	__PMC_EV(ARMV7, EVENT_01H)		\
283 	__PMC_EV(ARMV7, EVENT_02H)		\
284 	__PMC_EV(ARMV7, EVENT_03H)		\
285 	__PMC_EV(ARMV7, EVENT_04H)		\
286 	__PMC_EV(ARMV7, EVENT_05H)		\
287 	__PMC_EV(ARMV7, EVENT_06H)		\
288 	__PMC_EV(ARMV7, EVENT_07H)		\
289 	__PMC_EV(ARMV7, EVENT_08H)		\
290 	__PMC_EV(ARMV7, EVENT_09H)		\
291 	__PMC_EV(ARMV7, EVENT_0AH)		\
292 	__PMC_EV(ARMV7, EVENT_0BH)		\
293 	__PMC_EV(ARMV7, EVENT_0CH)		\
294 	__PMC_EV(ARMV7, EVENT_0DH)		\
295 	__PMC_EV(ARMV7, EVENT_0EH)		\
296 	__PMC_EV(ARMV7, EVENT_0FH)		\
297 	__PMC_EV(ARMV7, EVENT_10H)		\
298 	__PMC_EV(ARMV7, EVENT_11H)		\
299 	__PMC_EV(ARMV7, EVENT_12H)		\
300 	__PMC_EV(ARMV7, EVENT_13H)		\
301 	__PMC_EV(ARMV7, EVENT_14H)		\
302 	__PMC_EV(ARMV7, EVENT_15H)		\
303 	__PMC_EV(ARMV7, EVENT_16H)		\
304 	__PMC_EV(ARMV7, EVENT_17H)		\
305 	__PMC_EV(ARMV7, EVENT_18H)		\
306 	__PMC_EV(ARMV7, EVENT_19H)		\
307 	__PMC_EV(ARMV7, EVENT_1AH)		\
308 	__PMC_EV(ARMV7, EVENT_1BH)		\
309 	__PMC_EV(ARMV7, EVENT_1CH)		\
310 	__PMC_EV(ARMV7, EVENT_1DH)		\
311 	__PMC_EV(ARMV7, EVENT_1EH)		\
312 	__PMC_EV(ARMV7, EVENT_1FH)		\
313 	__PMC_EV(ARMV7, EVENT_20H)		\
314 	__PMC_EV(ARMV7, EVENT_21H)		\
315 	__PMC_EV(ARMV7, EVENT_22H)		\
316 	__PMC_EV(ARMV7, EVENT_23H)		\
317 	__PMC_EV(ARMV7, EVENT_24H)		\
318 	__PMC_EV(ARMV7, EVENT_25H)		\
319 	__PMC_EV(ARMV7, EVENT_26H)		\
320 	__PMC_EV(ARMV7, EVENT_27H)		\
321 	__PMC_EV(ARMV7, EVENT_28H)		\
322 	__PMC_EV(ARMV7, EVENT_29H)		\
323 	__PMC_EV(ARMV7, EVENT_2AH)		\
324 	__PMC_EV(ARMV7, EVENT_2BH)		\
325 	__PMC_EV(ARMV7, EVENT_2CH)		\
326 	__PMC_EV(ARMV7, EVENT_2DH)		\
327 	__PMC_EV(ARMV7, EVENT_2EH)		\
328 	__PMC_EV(ARMV7, EVENT_2FH)		\
329 	__PMC_EV(ARMV7, EVENT_30H)		\
330 	__PMC_EV(ARMV7, EVENT_31H)		\
331 	__PMC_EV(ARMV7, EVENT_32H)		\
332 	__PMC_EV(ARMV7, EVENT_33H)		\
333 	__PMC_EV(ARMV7, EVENT_34H)		\
334 	__PMC_EV(ARMV7, EVENT_35H)		\
335 	__PMC_EV(ARMV7, EVENT_36H)		\
336 	__PMC_EV(ARMV7, EVENT_37H)		\
337 	__PMC_EV(ARMV7, EVENT_38H)		\
338 	__PMC_EV(ARMV7, EVENT_39H)		\
339 	__PMC_EV(ARMV7, EVENT_3AH)		\
340 	__PMC_EV(ARMV7, EVENT_3BH)		\
341 	__PMC_EV(ARMV7, EVENT_3CH)		\
342 	__PMC_EV(ARMV7, EVENT_3DH)		\
343 	__PMC_EV(ARMV7, EVENT_3EH)		\
344 	__PMC_EV(ARMV7, EVENT_3FH)		\
345 	__PMC_EV(ARMV7, EVENT_40H)		\
346 	__PMC_EV(ARMV7, EVENT_41H)		\
347 	__PMC_EV(ARMV7, EVENT_42H)		\
348 	__PMC_EV(ARMV7, EVENT_43H)		\
349 	__PMC_EV(ARMV7, EVENT_44H)		\
350 	__PMC_EV(ARMV7, EVENT_45H)		\
351 	__PMC_EV(ARMV7, EVENT_46H)		\
352 	__PMC_EV(ARMV7, EVENT_47H)		\
353 	__PMC_EV(ARMV7, EVENT_48H)		\
354 	__PMC_EV(ARMV7, EVENT_49H)		\
355 	__PMC_EV(ARMV7, EVENT_4AH)		\
356 	__PMC_EV(ARMV7, EVENT_4BH)		\
357 	__PMC_EV(ARMV7, EVENT_4CH)		\
358 	__PMC_EV(ARMV7, EVENT_4DH)		\
359 	__PMC_EV(ARMV7, EVENT_4EH)		\
360 	__PMC_EV(ARMV7, EVENT_4FH)		\
361 	__PMC_EV(ARMV7, EVENT_50H)		\
362 	__PMC_EV(ARMV7, EVENT_51H)		\
363 	__PMC_EV(ARMV7, EVENT_52H)		\
364 	__PMC_EV(ARMV7, EVENT_53H)		\
365 	__PMC_EV(ARMV7, EVENT_54H)		\
366 	__PMC_EV(ARMV7, EVENT_55H)		\
367 	__PMC_EV(ARMV7, EVENT_56H)		\
368 	__PMC_EV(ARMV7, EVENT_57H)		\
369 	__PMC_EV(ARMV7, EVENT_58H)		\
370 	__PMC_EV(ARMV7, EVENT_59H)		\
371 	__PMC_EV(ARMV7, EVENT_5AH)		\
372 	__PMC_EV(ARMV7, EVENT_5BH)		\
373 	__PMC_EV(ARMV7, EVENT_5CH)		\
374 	__PMC_EV(ARMV7, EVENT_5DH)		\
375 	__PMC_EV(ARMV7, EVENT_5EH)		\
376 	__PMC_EV(ARMV7, EVENT_5FH)		\
377 	__PMC_EV(ARMV7, EVENT_60H)		\
378 	__PMC_EV(ARMV7, EVENT_61H)		\
379 	__PMC_EV(ARMV7, EVENT_62H)		\
380 	__PMC_EV(ARMV7, EVENT_63H)		\
381 	__PMC_EV(ARMV7, EVENT_64H)		\
382 	__PMC_EV(ARMV7, EVENT_65H)		\
383 	__PMC_EV(ARMV7, EVENT_66H)		\
384 	__PMC_EV(ARMV7, EVENT_67H)		\
385 	__PMC_EV(ARMV7, EVENT_68H)		\
386 	__PMC_EV(ARMV7, EVENT_69H)		\
387 	__PMC_EV(ARMV7, EVENT_6AH)		\
388 	__PMC_EV(ARMV7, EVENT_6BH)		\
389 	__PMC_EV(ARMV7, EVENT_6CH)		\
390 	__PMC_EV(ARMV7, EVENT_6DH)		\
391 	__PMC_EV(ARMV7, EVENT_6EH)		\
392 	__PMC_EV(ARMV7, EVENT_6FH)		\
393 	__PMC_EV(ARMV7, EVENT_70H)		\
394 	__PMC_EV(ARMV7, EVENT_71H)		\
395 	__PMC_EV(ARMV7, EVENT_72H)		\
396 	__PMC_EV(ARMV7, EVENT_73H)		\
397 	__PMC_EV(ARMV7, EVENT_74H)		\
398 	__PMC_EV(ARMV7, EVENT_75H)		\
399 	__PMC_EV(ARMV7, EVENT_76H)		\
400 	__PMC_EV(ARMV7, EVENT_77H)		\
401 	__PMC_EV(ARMV7, EVENT_78H)		\
402 	__PMC_EV(ARMV7, EVENT_79H)		\
403 	__PMC_EV(ARMV7, EVENT_7AH)		\
404 	__PMC_EV(ARMV7, EVENT_7BH)		\
405 	__PMC_EV(ARMV7, EVENT_7CH)		\
406 	__PMC_EV(ARMV7, EVENT_7DH)		\
407 	__PMC_EV(ARMV7, EVENT_7EH)		\
408 	__PMC_EV(ARMV7, EVENT_7FH)		\
409 	__PMC_EV(ARMV7, EVENT_80H)		\
410 	__PMC_EV(ARMV7, EVENT_81H)		\
411 	__PMC_EV(ARMV7, EVENT_82H)		\
412 	__PMC_EV(ARMV7, EVENT_83H)		\
413 	__PMC_EV(ARMV7, EVENT_84H)		\
414 	__PMC_EV(ARMV7, EVENT_85H)		\
415 	__PMC_EV(ARMV7, EVENT_86H)		\
416 	__PMC_EV(ARMV7, EVENT_87H)		\
417 	__PMC_EV(ARMV7, EVENT_88H)		\
418 	__PMC_EV(ARMV7, EVENT_89H)		\
419 	__PMC_EV(ARMV7, EVENT_8AH)		\
420 	__PMC_EV(ARMV7, EVENT_8BH)		\
421 	__PMC_EV(ARMV7, EVENT_8CH)		\
422 	__PMC_EV(ARMV7, EVENT_8DH)		\
423 	__PMC_EV(ARMV7, EVENT_8EH)		\
424 	__PMC_EV(ARMV7, EVENT_8FH)		\
425 	__PMC_EV(ARMV7, EVENT_90H)		\
426 	__PMC_EV(ARMV7, EVENT_91H)		\
427 	__PMC_EV(ARMV7, EVENT_92H)		\
428 	__PMC_EV(ARMV7, EVENT_93H)		\
429 	__PMC_EV(ARMV7, EVENT_94H)		\
430 	__PMC_EV(ARMV7, EVENT_95H)		\
431 	__PMC_EV(ARMV7, EVENT_96H)		\
432 	__PMC_EV(ARMV7, EVENT_97H)		\
433 	__PMC_EV(ARMV7, EVENT_98H)		\
434 	__PMC_EV(ARMV7, EVENT_99H)		\
435 	__PMC_EV(ARMV7, EVENT_9AH)		\
436 	__PMC_EV(ARMV7, EVENT_9BH)		\
437 	__PMC_EV(ARMV7, EVENT_9CH)		\
438 	__PMC_EV(ARMV7, EVENT_9DH)		\
439 	__PMC_EV(ARMV7, EVENT_9EH)		\
440 	__PMC_EV(ARMV7, EVENT_9FH)		\
441 	__PMC_EV(ARMV7, EVENT_A0H)		\
442 	__PMC_EV(ARMV7, EVENT_A1H)		\
443 	__PMC_EV(ARMV7, EVENT_A2H)		\
444 	__PMC_EV(ARMV7, EVENT_A3H)		\
445 	__PMC_EV(ARMV7, EVENT_A4H)		\
446 	__PMC_EV(ARMV7, EVENT_A5H)		\
447 	__PMC_EV(ARMV7, EVENT_A6H)		\
448 	__PMC_EV(ARMV7, EVENT_A7H)		\
449 	__PMC_EV(ARMV7, EVENT_A8H)		\
450 	__PMC_EV(ARMV7, EVENT_A9H)		\
451 	__PMC_EV(ARMV7, EVENT_AAH)		\
452 	__PMC_EV(ARMV7, EVENT_ABH)		\
453 	__PMC_EV(ARMV7, EVENT_ACH)		\
454 	__PMC_EV(ARMV7, EVENT_ADH)		\
455 	__PMC_EV(ARMV7, EVENT_AEH)		\
456 	__PMC_EV(ARMV7, EVENT_AFH)		\
457 	__PMC_EV(ARMV7, EVENT_B0H)		\
458 	__PMC_EV(ARMV7, EVENT_B1H)		\
459 	__PMC_EV(ARMV7, EVENT_B2H)		\
460 	__PMC_EV(ARMV7, EVENT_B3H)		\
461 	__PMC_EV(ARMV7, EVENT_B4H)		\
462 	__PMC_EV(ARMV7, EVENT_B5H)		\
463 	__PMC_EV(ARMV7, EVENT_B6H)		\
464 	__PMC_EV(ARMV7, EVENT_B7H)		\
465 	__PMC_EV(ARMV7, EVENT_B8H)		\
466 	__PMC_EV(ARMV7, EVENT_B9H)		\
467 	__PMC_EV(ARMV7, EVENT_BAH)		\
468 	__PMC_EV(ARMV7, EVENT_BBH)		\
469 	__PMC_EV(ARMV7, EVENT_BCH)		\
470 	__PMC_EV(ARMV7, EVENT_BDH)		\
471 	__PMC_EV(ARMV7, EVENT_BEH)		\
472 	__PMC_EV(ARMV7, EVENT_BFH)		\
473 	__PMC_EV(ARMV7, EVENT_C0H)		\
474 	__PMC_EV(ARMV7, EVENT_C1H)		\
475 	__PMC_EV(ARMV7, EVENT_C2H)		\
476 	__PMC_EV(ARMV7, EVENT_C3H)		\
477 	__PMC_EV(ARMV7, EVENT_C4H)		\
478 	__PMC_EV(ARMV7, EVENT_C5H)		\
479 	__PMC_EV(ARMV7, EVENT_C6H)		\
480 	__PMC_EV(ARMV7, EVENT_C7H)		\
481 	__PMC_EV(ARMV7, EVENT_C8H)		\
482 	__PMC_EV(ARMV7, EVENT_C9H)		\
483 	__PMC_EV(ARMV7, EVENT_CAH)		\
484 	__PMC_EV(ARMV7, EVENT_CBH)		\
485 	__PMC_EV(ARMV7, EVENT_CCH)		\
486 	__PMC_EV(ARMV7, EVENT_CDH)		\
487 	__PMC_EV(ARMV7, EVENT_CEH)		\
488 	__PMC_EV(ARMV7, EVENT_CFH)		\
489 	__PMC_EV(ARMV7, EVENT_D0H)		\
490 	__PMC_EV(ARMV7, EVENT_D1H)		\
491 	__PMC_EV(ARMV7, EVENT_D2H)		\
492 	__PMC_EV(ARMV7, EVENT_D3H)		\
493 	__PMC_EV(ARMV7, EVENT_D4H)		\
494 	__PMC_EV(ARMV7, EVENT_D5H)		\
495 	__PMC_EV(ARMV7, EVENT_D6H)		\
496 	__PMC_EV(ARMV7, EVENT_D7H)		\
497 	__PMC_EV(ARMV7, EVENT_D8H)		\
498 	__PMC_EV(ARMV7, EVENT_D9H)		\
499 	__PMC_EV(ARMV7, EVENT_DAH)		\
500 	__PMC_EV(ARMV7, EVENT_DBH)		\
501 	__PMC_EV(ARMV7, EVENT_DCH)		\
502 	__PMC_EV(ARMV7, EVENT_DDH)		\
503 	__PMC_EV(ARMV7, EVENT_DEH)		\
504 	__PMC_EV(ARMV7, EVENT_DFH)		\
505 	__PMC_EV(ARMV7, EVENT_E0H)		\
506 	__PMC_EV(ARMV7, EVENT_E1H)		\
507 	__PMC_EV(ARMV7, EVENT_E2H)		\
508 	__PMC_EV(ARMV7, EVENT_E3H)		\
509 	__PMC_EV(ARMV7, EVENT_E4H)		\
510 	__PMC_EV(ARMV7, EVENT_E5H)		\
511 	__PMC_EV(ARMV7, EVENT_E6H)		\
512 	__PMC_EV(ARMV7, EVENT_E7H)		\
513 	__PMC_EV(ARMV7, EVENT_E8H)		\
514 	__PMC_EV(ARMV7, EVENT_E9H)		\
515 	__PMC_EV(ARMV7, EVENT_EAH)		\
516 	__PMC_EV(ARMV7, EVENT_EBH)		\
517 	__PMC_EV(ARMV7, EVENT_ECH)		\
518 	__PMC_EV(ARMV7, EVENT_EDH)		\
519 	__PMC_EV(ARMV7, EVENT_EEH)		\
520 	__PMC_EV(ARMV7, EVENT_EFH)		\
521 	__PMC_EV(ARMV7, EVENT_F0H)		\
522 	__PMC_EV(ARMV7, EVENT_F1H)		\
523 	__PMC_EV(ARMV7, EVENT_F2H)		\
524 	__PMC_EV(ARMV7, EVENT_F3H)		\
525 	__PMC_EV(ARMV7, EVENT_F4H)		\
526 	__PMC_EV(ARMV7, EVENT_F5H)		\
527 	__PMC_EV(ARMV7, EVENT_F6H)		\
528 	__PMC_EV(ARMV7, EVENT_F7H)		\
529 	__PMC_EV(ARMV7, EVENT_F8H)		\
530 	__PMC_EV(ARMV7, EVENT_F9H)		\
531 	__PMC_EV(ARMV7, EVENT_FAH)		\
532 	__PMC_EV(ARMV7, EVENT_FBH)		\
533 	__PMC_EV(ARMV7, EVENT_FCH)		\
534 	__PMC_EV(ARMV7, EVENT_FDH)		\
535 	__PMC_EV(ARMV7, EVENT_FEH)		\
536 	__PMC_EV(ARMV7, EVENT_FFH)
537 
538 #define	PMC_EV_ARMV7_FIRST	PMC_EV_ARMV7_EVENT_00H
539 #define	PMC_EV_ARMV7_LAST	PMC_EV_ARMV7_EVENT_FFH
540 
541 #define	__PMC_EV_ALIAS_ARMV7_COMMON()					\
542 	__PMC_EV_ALIAS("PMNC_SW_INCR",		ARMV7_EVENT_00H)	\
543 	__PMC_EV_ALIAS("L1_ICACHE_REFILL",	ARMV7_EVENT_01H)	\
544 	__PMC_EV_ALIAS("ITLB_REFILL",		ARMV7_EVENT_02H)	\
545 	__PMC_EV_ALIAS("L1_DCACHE_REFILL",	ARMV7_EVENT_03H)	\
546 	__PMC_EV_ALIAS("L1_DCACHE_ACCESS",	ARMV7_EVENT_04H)	\
547 	__PMC_EV_ALIAS("DTLB_REFILL",		ARMV7_EVENT_05H)	\
548 	__PMC_EV_ALIAS("MEM_READ",		ARMV7_EVENT_06H)	\
549 	__PMC_EV_ALIAS("MEM_WRITE",		ARMV7_EVENT_07H)	\
550 	__PMC_EV_ALIAS("EXC_TAKEN",		ARMV7_EVENT_09H)	\
551 	__PMC_EV_ALIAS("EXC_EXECUTED",		ARMV7_EVENT_0AH)	\
552 	__PMC_EV_ALIAS("CID_WRITE",		ARMV7_EVENT_0BH)	\
553 	__PMC_EV_ALIAS("PC_WRITE",		ARMV7_EVENT_0CH)	\
554 	__PMC_EV_ALIAS("PC_IMM_BRANCH",		ARMV7_EVENT_0DH)	\
555 	__PMC_EV_ALIAS("MEM_UNALIGNED_ACCESS",	ARMV7_EVENT_0FH)	\
556 	__PMC_EV_ALIAS("PC_BRANCH_MIS_PRED",	ARMV7_EVENT_10H)	\
557 	__PMC_EV_ALIAS("CLOCK_CYCLES",		ARMV7_EVENT_11H)	\
558 	__PMC_EV_ALIAS("PC_BRANCH_PRED",	ARMV7_EVENT_12H)
559 
560 #define	__PMC_EV_ALIAS_ARMV7_COMMON_A8()				\
561 	__PMC_EV_ALIAS_ARMV7_COMMON()					\
562 	__PMC_EV_ALIAS("INSTR_EXECUTED",	ARMV7_EVENT_08H)	\
563 	__PMC_EV_ALIAS("PC_PROC_RETURN",	ARMV7_EVENT_0EH)	\
564 	__PMC_EV_ALIAS("MEM_ACCESS",		ARMV7_EVENT_13H)	\
565 	__PMC_EV_ALIAS("L1_ICACHE_ACCESS",	ARMV7_EVENT_14H)	\
566 	__PMC_EV_ALIAS("L1_DCACHE_WB",		ARMV7_EVENT_15H)	\
567 	__PMC_EV_ALIAS("L2_CACHE_ACCESS",	ARMV7_EVENT_16H)	\
568 	__PMC_EV_ALIAS("L2_CACHE_REFILL",	ARMV7_EVENT_17H)	\
569 	__PMC_EV_ALIAS("L2_CACHE_WB",		ARMV7_EVENT_18H)	\
570 	__PMC_EV_ALIAS("BUS_ACCESS",		ARMV7_EVENT_19H)	\
571 	__PMC_EV_ALIAS("MEM_ERROR",		ARMV7_EVENT_1AH)	\
572 	__PMC_EV_ALIAS("INSTR_SPEC",		ARMV7_EVENT_1BH)	\
573 	__PMC_EV_ALIAS("TTBR_WRITE",		ARMV7_EVENT_1CH)	\
574 	__PMC_EV_ALIAS("BUS_CYCLES",		ARMV7_EVENT_1DH)	\
575 	__PMC_EV_ALIAS("CPU_CYCLES",		ARMV7_EVENT_FFH)
576 
577 #define	__PMC_EV_ALIAS_ARMV7_CORTEX_A8()				 \
578 	__PMC_EV_ALIAS_ARMV7_COMMON_A8()				 \
579 	__PMC_EV_ALIAS("WRITE_BUF_FULL",		ARMV7_EVENT_40H) \
580 	__PMC_EV_ALIAS("L2_STORE_MERGED",		ARMV7_EVENT_41H) \
581 	__PMC_EV_ALIAS("L2_STORE_BUFFERABLE",		ARMV7_EVENT_42H) \
582 	__PMC_EV_ALIAS("L2_ACCESS",			ARMV7_EVENT_43H) \
583 	__PMC_EV_ALIAS("L2_CACHE_MISS",			ARMV7_EVENT_44H) \
584 	__PMC_EV_ALIAS("AXI_READ",			ARMV7_EVENT_45H) \
585 	__PMC_EV_ALIAS("AXI_WRITE",			ARMV7_EVENT_46H) \
586 	__PMC_EV_ALIAS("MEM_REPLAY_EVT",		ARMV7_EVENT_47H) \
587 	__PMC_EV_ALIAS("MEM_UNALIGNED_ACCESS_REPLAY",	ARMV7_EVENT_48H) \
588 	__PMC_EV_ALIAS("L1_DCACHE_HASH_MISS",		ARMV7_EVENT_49H) \
589 	__PMC_EV_ALIAS("L1_ICACHE_HASH_MISS",		ARMV7_EVENT_4AH) \
590 	__PMC_EV_ALIAS("L1_CACHE_PAGECOL_ALIAS",	ARMV7_EVENT_4BH) \
591 	__PMC_EV_ALIAS("L1_DCACHE_NEON_ACCESS",		ARMV7_EVENT_4CH) \
592 	__PMC_EV_ALIAS("L1_DCACHE_NEON_CACHEABLE",	ARMV7_EVENT_4DH) \
593 	__PMC_EV_ALIAS("L2_CACHE_NEON_MEM_ACCESS",	ARMV7_EVENT_4EH) \
594 	__PMC_EV_ALIAS("L2_CACHE_NEON_HIT",		ARMV7_EVENT_4FH) \
595 	__PMC_EV_ALIAS("L1_CACHE_ACCESS_NOCP15",	ARMV7_EVENT_50H) \
596 	__PMC_EV_ALIAS("RET_STACK_MISPREDICT",		ARMV7_EVENT_51H) \
597 	__PMC_EV_ALIAS("BRANCH_DIR_MISPREDICT",		ARMV7_EVENT_52H) \
598 	__PMC_EV_ALIAS("PRED_BRANCH_PRED_TAKEN",	ARMV7_EVENT_53H) \
599 	__PMC_EV_ALIAS("PRED_BRANCH_EXEC_TAKEN",	ARMV7_EVENT_54H) \
600 	__PMC_EV_ALIAS("OPS_ISSUED",			ARMV7_EVENT_55H) \
601 	__PMC_EV_ALIAS("CYCLES_NO_INSTRUCTION",		ARMV7_EVENT_56H) \
602 	__PMC_EV_ALIAS("INSTRUCTIONS_ISSUED_CYCLE",	ARMV7_EVENT_57H) \
603 	__PMC_EV_ALIAS("CYCLES_STALLED_NEON_MRC",	ARMV7_EVENT_58H) \
604 	__PMC_EV_ALIAS("CYCLES_STALLED_NEON_FULLQ",	ARMV7_EVENT_59H) \
605 	__PMC_EV_ALIAS("CYCLES_NONIDLE_NEON_INT",	ARMV7_EVENT_5AH) \
606 	__PMC_EV_ALIAS("PMUEXTIN0_EVT",			ARMV7_EVENT_70H) \
607 	__PMC_EV_ALIAS("PMUEXTIN1_EVT",			ARMV7_EVENT_71H) \
608 	__PMC_EV_ALIAS("PMUEXTIN_EVT",			ARMV7_EVENT_72H)
609 #define	PMC_EV_ARMV7_CORTEX_A8_FIRST	PMC_EV_ARMV7_PMNC_SW_INCR
610 #define	PMC_EV_ARMV7_CORTEX_A8_LAST	PMC_EV_ARMV7_PMUEXTIN_EVT
611 
612 #define	__PMC_EV_ALIAS_ARMV7_CORTEX_A9()					\
613 	__PMC_EV_ALIAS_ARMV7_COMMON()						\
614 	__PMC_EV_ALIAS("JAVA_BYTECODE",			ARMV7_EVENT_40H)	\
615 	__PMC_EV_ALIAS("SOFTWARE_JAVA_BYTECODE",	ARMV7_EVENT_41H)	\
616 	__PMC_EV_ALIAS("JAZELLE_BACKWARD_BRANCH",	ARMV7_EVENT_42H)	\
617 	__PMC_EV_ALIAS("COHERENT_LINEFILL_MISSC",	ARMV7_EVENT_50H)	\
618 	__PMC_EV_ALIAS("COHERENT_LINEFILL_HITC",	ARMV7_EVENT_51H)	\
619 	__PMC_EV_ALIAS("INSTR_CACHE_DEPENDENT_STALL",	ARMV7_EVENT_60H)	\
620 	__PMC_EV_ALIAS("DATA_CACHE_DEPENDENT_STALL",	ARMV7_EVENT_61H)	\
621 	__PMC_EV_ALIAS("MAIN_TLB_MISS_STALL",		ARMV7_EVENT_62H)	\
622 	__PMC_EV_ALIAS("STREX_PASSED",			ARMV7_EVENT_63H)	\
623 	__PMC_EV_ALIAS("STREX_FAILED",			ARMV7_EVENT_64H)	\
624 	__PMC_EV_ALIAS("DATA_EVICTION",			ARMV7_EVENT_65H)	\
625 	__PMC_EV_ALIAS("ISSUE_DNOT_DISPATCH_ANY_INSTR",	ARMV7_EVENT_66H)	\
626 	__PMC_EV_ALIAS("ISSUE_IS_EMPTY",		ARMV7_EVENT_67H)	\
627 	__PMC_EV_ALIAS("INSTR_RENAMED",			ARMV7_EVENT_68H)	\
628 	__PMC_EV_ALIAS("PREDICTABLE_FUNCTION_RETURN",	ARMV7_EVENT_6EH)	\
629 	__PMC_EV_ALIAS("MAIN_EXECUTION_UNIT_PIPE",	ARMV7_EVENT_70H)	\
630 	__PMC_EV_ALIAS("SECOND_EXECUTION_UNIT_PIPE",	ARMV7_EVENT_71H)	\
631 	__PMC_EV_ALIAS("LOAD_STORE_PIPE",		ARMV7_EVENT_72H)	\
632 	__PMC_EV_ALIAS("FLOATING_POINT_INSTR_RENAMED",	ARMV7_EVENT_73H)	\
633 	__PMC_EV_ALIAS("NEON_INSTRS_RENAMED",		ARMV7_EVENT_74H)	\
634 	__PMC_EV_ALIAS("PLD_STALL",			ARMV7_EVENT_80H)	\
635 	__PMC_EV_ALIAS("WRITE_STALL",			ARMV7_EVENT_81H)	\
636 	__PMC_EV_ALIAS("INSTR_MAIN_TLB_MISS_STALL",	ARMV7_EVENT_82H)	\
637 	__PMC_EV_ALIAS("DATA_MAIN_TLB_MISS_STALL",	ARMV7_EVENT_83H)	\
638 	__PMC_EV_ALIAS("INSTR_MICRO_TLB_MISS_STALL",	ARMV7_EVENT_84H)	\
639 	__PMC_EV_ALIAS("DATA_MICRO_TLB_MISS_STALL",	ARMV7_EVENT_85H)	\
640 	__PMC_EV_ALIAS("DMB_STALL",			ARMV7_EVENT_86H)	\
641 	__PMC_EV_ALIAS("INTEGER_CORE_CLOCK_ENABLED",	ARMV7_EVENT_8AH)	\
642 	__PMC_EV_ALIAS("DATA_ENGINE_CLOCK_ENABLED",	ARMV7_EVENT_8BH)	\
643 	__PMC_EV_ALIAS("ISB",				ARMV7_EVENT_90H)	\
644 	__PMC_EV_ALIAS("DSB",				ARMV7_EVENT_91H)	\
645 	__PMC_EV_ALIAS("DMB",				ARMV7_EVENT_92H)	\
646 	__PMC_EV_ALIAS("EXTERNAL_INTERRUPT",		ARMV7_EVENT_93H)	\
647 	__PMC_EV_ALIAS("PLE_CACHE_LINE_REQ_COMPLETED",	ARMV7_EVENT_A0H)	\
648 	__PMC_EV_ALIAS("PLE_CACHE_LINE_REQ_SKIPPED",	ARMV7_EVENT_A1H)	\
649 	__PMC_EV_ALIAS("PLE_FIFO_FLUSH",		ARMV7_EVENT_A2H)	\
650 	__PMC_EV_ALIAS("PLE_REQUEST_COMPLETED",		ARMV7_EVENT_A3H)	\
651 	__PMC_EV_ALIAS("PLE_FIFO_OVERFLOW",		ARMV7_EVENT_A4H)	\
652 	__PMC_EV_ALIAS("PLE_REQUEST_PROGRAMMED",	ARMV7_EVENT_A5H)
653 
654 /*
655  * ARMv8 Events
656  */
657 
658 #define	__PMC_EV_ARMV8()			\
659 	__PMC_EV(ARMV8, EVENT_00H)		\
660 	__PMC_EV(ARMV8, EVENT_01H)		\
661 	__PMC_EV(ARMV8, EVENT_02H)		\
662 	__PMC_EV(ARMV8, EVENT_03H)		\
663 	__PMC_EV(ARMV8, EVENT_04H)		\
664 	__PMC_EV(ARMV8, EVENT_05H)		\
665 	__PMC_EV(ARMV8, EVENT_06H)		\
666 	__PMC_EV(ARMV8, EVENT_07H)		\
667 	__PMC_EV(ARMV8, EVENT_08H)		\
668 	__PMC_EV(ARMV8, EVENT_09H)		\
669 	__PMC_EV(ARMV8, EVENT_0AH)		\
670 	__PMC_EV(ARMV8, EVENT_0BH)		\
671 	__PMC_EV(ARMV8, EVENT_0CH)		\
672 	__PMC_EV(ARMV8, EVENT_0DH)		\
673 	__PMC_EV(ARMV8, EVENT_0EH)		\
674 	__PMC_EV(ARMV8, EVENT_0FH)		\
675 	__PMC_EV(ARMV8, EVENT_10H)		\
676 	__PMC_EV(ARMV8, EVENT_11H)		\
677 	__PMC_EV(ARMV8, EVENT_12H)		\
678 	__PMC_EV(ARMV8, EVENT_13H)		\
679 	__PMC_EV(ARMV8, EVENT_14H)		\
680 	__PMC_EV(ARMV8, EVENT_15H)		\
681 	__PMC_EV(ARMV8, EVENT_16H)		\
682 	__PMC_EV(ARMV8, EVENT_17H)		\
683 	__PMC_EV(ARMV8, EVENT_18H)		\
684 	__PMC_EV(ARMV8, EVENT_19H)		\
685 	__PMC_EV(ARMV8, EVENT_1AH)		\
686 	__PMC_EV(ARMV8, EVENT_1BH)		\
687 	__PMC_EV(ARMV8, EVENT_1CH)		\
688 	__PMC_EV(ARMV8, EVENT_1DH)		\
689 	__PMC_EV(ARMV8, EVENT_1EH)		\
690 	__PMC_EV(ARMV8, EVENT_1FH)		\
691 	__PMC_EV(ARMV8, EVENT_20H)		\
692 	__PMC_EV(ARMV8, EVENT_21H)		\
693 	__PMC_EV(ARMV8, EVENT_22H)		\
694 	__PMC_EV(ARMV8, EVENT_23H)		\
695 	__PMC_EV(ARMV8, EVENT_24H)		\
696 	__PMC_EV(ARMV8, EVENT_25H)		\
697 	__PMC_EV(ARMV8, EVENT_26H)		\
698 	__PMC_EV(ARMV8, EVENT_27H)		\
699 	__PMC_EV(ARMV8, EVENT_28H)		\
700 	__PMC_EV(ARMV8, EVENT_29H)		\
701 	__PMC_EV(ARMV8, EVENT_2AH)		\
702 	__PMC_EV(ARMV8, EVENT_2BH)		\
703 	__PMC_EV(ARMV8, EVENT_2CH)		\
704 	__PMC_EV(ARMV8, EVENT_2DH)		\
705 	__PMC_EV(ARMV8, EVENT_2EH)		\
706 	__PMC_EV(ARMV8, EVENT_2FH)		\
707 	__PMC_EV(ARMV8, EVENT_30H)		\
708 	__PMC_EV(ARMV8, EVENT_31H)		\
709 	__PMC_EV(ARMV8, EVENT_32H)		\
710 	__PMC_EV(ARMV8, EVENT_33H)		\
711 	__PMC_EV(ARMV8, EVENT_34H)		\
712 	__PMC_EV(ARMV8, EVENT_35H)		\
713 	__PMC_EV(ARMV8, EVENT_36H)		\
714 	__PMC_EV(ARMV8, EVENT_37H)		\
715 	__PMC_EV(ARMV8, EVENT_38H)		\
716 	__PMC_EV(ARMV8, EVENT_39H)		\
717 	__PMC_EV(ARMV8, EVENT_3AH)		\
718 	__PMC_EV(ARMV8, EVENT_3BH)		\
719 	__PMC_EV(ARMV8, EVENT_3CH)		\
720 	__PMC_EV(ARMV8, EVENT_3DH)		\
721 	__PMC_EV(ARMV8, EVENT_3EH)		\
722 	__PMC_EV(ARMV8, EVENT_3FH)		\
723 	__PMC_EV(ARMV8, EVENT_40H)		\
724 	__PMC_EV(ARMV8, EVENT_41H)		\
725 	__PMC_EV(ARMV8, EVENT_42H)		\
726 	__PMC_EV(ARMV8, EVENT_43H)		\
727 	__PMC_EV(ARMV8, EVENT_44H)		\
728 	__PMC_EV(ARMV8, EVENT_45H)		\
729 	__PMC_EV(ARMV8, EVENT_46H)		\
730 	__PMC_EV(ARMV8, EVENT_47H)		\
731 	__PMC_EV(ARMV8, EVENT_48H)		\
732 	__PMC_EV(ARMV8, EVENT_49H)		\
733 	__PMC_EV(ARMV8, EVENT_4AH)		\
734 	__PMC_EV(ARMV8, EVENT_4BH)		\
735 	__PMC_EV(ARMV8, EVENT_4CH)		\
736 	__PMC_EV(ARMV8, EVENT_4DH)		\
737 	__PMC_EV(ARMV8, EVENT_4EH)		\
738 	__PMC_EV(ARMV8, EVENT_4FH)		\
739 	__PMC_EV(ARMV8, EVENT_50H)		\
740 	__PMC_EV(ARMV8, EVENT_51H)		\
741 	__PMC_EV(ARMV8, EVENT_52H)		\
742 	__PMC_EV(ARMV8, EVENT_53H)		\
743 	__PMC_EV(ARMV8, EVENT_54H)		\
744 	__PMC_EV(ARMV8, EVENT_55H)		\
745 	__PMC_EV(ARMV8, EVENT_56H)		\
746 	__PMC_EV(ARMV8, EVENT_57H)		\
747 	__PMC_EV(ARMV8, EVENT_58H)		\
748 	__PMC_EV(ARMV8, EVENT_59H)		\
749 	__PMC_EV(ARMV8, EVENT_5AH)		\
750 	__PMC_EV(ARMV8, EVENT_5BH)		\
751 	__PMC_EV(ARMV8, EVENT_5CH)		\
752 	__PMC_EV(ARMV8, EVENT_5DH)		\
753 	__PMC_EV(ARMV8, EVENT_5EH)		\
754 	__PMC_EV(ARMV8, EVENT_5FH)		\
755 	__PMC_EV(ARMV8, EVENT_60H)		\
756 	__PMC_EV(ARMV8, EVENT_61H)		\
757 	__PMC_EV(ARMV8, EVENT_62H)		\
758 	__PMC_EV(ARMV8, EVENT_63H)		\
759 	__PMC_EV(ARMV8, EVENT_64H)		\
760 	__PMC_EV(ARMV8, EVENT_65H)		\
761 	__PMC_EV(ARMV8, EVENT_66H)		\
762 	__PMC_EV(ARMV8, EVENT_67H)		\
763 	__PMC_EV(ARMV8, EVENT_68H)		\
764 	__PMC_EV(ARMV8, EVENT_69H)		\
765 	__PMC_EV(ARMV8, EVENT_6AH)		\
766 	__PMC_EV(ARMV8, EVENT_6BH)		\
767 	__PMC_EV(ARMV8, EVENT_6CH)		\
768 	__PMC_EV(ARMV8, EVENT_6DH)		\
769 	__PMC_EV(ARMV8, EVENT_6EH)		\
770 	__PMC_EV(ARMV8, EVENT_6FH)		\
771 	__PMC_EV(ARMV8, EVENT_70H)		\
772 	__PMC_EV(ARMV8, EVENT_71H)		\
773 	__PMC_EV(ARMV8, EVENT_72H)		\
774 	__PMC_EV(ARMV8, EVENT_73H)		\
775 	__PMC_EV(ARMV8, EVENT_74H)		\
776 	__PMC_EV(ARMV8, EVENT_75H)		\
777 	__PMC_EV(ARMV8, EVENT_76H)		\
778 	__PMC_EV(ARMV8, EVENT_77H)		\
779 	__PMC_EV(ARMV8, EVENT_78H)		\
780 	__PMC_EV(ARMV8, EVENT_79H)		\
781 	__PMC_EV(ARMV8, EVENT_7AH)		\
782 	__PMC_EV(ARMV8, EVENT_7BH)		\
783 	__PMC_EV(ARMV8, EVENT_7CH)		\
784 	__PMC_EV(ARMV8, EVENT_7DH)		\
785 	__PMC_EV(ARMV8, EVENT_7EH)		\
786 	__PMC_EV(ARMV8, EVENT_7FH)		\
787 	__PMC_EV(ARMV8, EVENT_80H)		\
788 	__PMC_EV(ARMV8, EVENT_81H)		\
789 	__PMC_EV(ARMV8, EVENT_82H)		\
790 	__PMC_EV(ARMV8, EVENT_83H)		\
791 	__PMC_EV(ARMV8, EVENT_84H)		\
792 	__PMC_EV(ARMV8, EVENT_85H)		\
793 	__PMC_EV(ARMV8, EVENT_86H)		\
794 	__PMC_EV(ARMV8, EVENT_87H)		\
795 	__PMC_EV(ARMV8, EVENT_88H)		\
796 	__PMC_EV(ARMV8, EVENT_89H)		\
797 	__PMC_EV(ARMV8, EVENT_8AH)		\
798 	__PMC_EV(ARMV8, EVENT_8BH)		\
799 	__PMC_EV(ARMV8, EVENT_8CH)		\
800 	__PMC_EV(ARMV8, EVENT_8DH)		\
801 	__PMC_EV(ARMV8, EVENT_8EH)		\
802 	__PMC_EV(ARMV8, EVENT_8FH)		\
803 	__PMC_EV(ARMV8, EVENT_90H)		\
804 	__PMC_EV(ARMV8, EVENT_91H)		\
805 	__PMC_EV(ARMV8, EVENT_92H)		\
806 	__PMC_EV(ARMV8, EVENT_93H)		\
807 	__PMC_EV(ARMV8, EVENT_94H)		\
808 	__PMC_EV(ARMV8, EVENT_95H)		\
809 	__PMC_EV(ARMV8, EVENT_96H)		\
810 	__PMC_EV(ARMV8, EVENT_97H)		\
811 	__PMC_EV(ARMV8, EVENT_98H)		\
812 	__PMC_EV(ARMV8, EVENT_99H)		\
813 	__PMC_EV(ARMV8, EVENT_9AH)		\
814 	__PMC_EV(ARMV8, EVENT_9BH)		\
815 	__PMC_EV(ARMV8, EVENT_9CH)		\
816 	__PMC_EV(ARMV8, EVENT_9DH)		\
817 	__PMC_EV(ARMV8, EVENT_9EH)		\
818 	__PMC_EV(ARMV8, EVENT_9FH)		\
819 	__PMC_EV(ARMV8, EVENT_A0H)		\
820 	__PMC_EV(ARMV8, EVENT_A1H)		\
821 	__PMC_EV(ARMV8, EVENT_A2H)		\
822 	__PMC_EV(ARMV8, EVENT_A3H)		\
823 	__PMC_EV(ARMV8, EVENT_A4H)		\
824 	__PMC_EV(ARMV8, EVENT_A5H)		\
825 	__PMC_EV(ARMV8, EVENT_A6H)		\
826 	__PMC_EV(ARMV8, EVENT_A7H)		\
827 	__PMC_EV(ARMV8, EVENT_A8H)		\
828 	__PMC_EV(ARMV8, EVENT_A9H)		\
829 	__PMC_EV(ARMV8, EVENT_AAH)		\
830 	__PMC_EV(ARMV8, EVENT_ABH)		\
831 	__PMC_EV(ARMV8, EVENT_ACH)		\
832 	__PMC_EV(ARMV8, EVENT_ADH)		\
833 	__PMC_EV(ARMV8, EVENT_AEH)		\
834 	__PMC_EV(ARMV8, EVENT_AFH)		\
835 	__PMC_EV(ARMV8, EVENT_B0H)		\
836 	__PMC_EV(ARMV8, EVENT_B1H)		\
837 	__PMC_EV(ARMV8, EVENT_B2H)		\
838 	__PMC_EV(ARMV8, EVENT_B3H)		\
839 	__PMC_EV(ARMV8, EVENT_B4H)		\
840 	__PMC_EV(ARMV8, EVENT_B5H)		\
841 	__PMC_EV(ARMV8, EVENT_B6H)		\
842 	__PMC_EV(ARMV8, EVENT_B7H)		\
843 	__PMC_EV(ARMV8, EVENT_B8H)		\
844 	__PMC_EV(ARMV8, EVENT_B9H)		\
845 	__PMC_EV(ARMV8, EVENT_BAH)		\
846 	__PMC_EV(ARMV8, EVENT_BBH)		\
847 	__PMC_EV(ARMV8, EVENT_BCH)		\
848 	__PMC_EV(ARMV8, EVENT_BDH)		\
849 	__PMC_EV(ARMV8, EVENT_BEH)		\
850 	__PMC_EV(ARMV8, EVENT_BFH)		\
851 	__PMC_EV(ARMV8, EVENT_C0H)		\
852 	__PMC_EV(ARMV8, EVENT_C1H)		\
853 	__PMC_EV(ARMV8, EVENT_C2H)		\
854 	__PMC_EV(ARMV8, EVENT_C3H)		\
855 	__PMC_EV(ARMV8, EVENT_C4H)		\
856 	__PMC_EV(ARMV8, EVENT_C5H)		\
857 	__PMC_EV(ARMV8, EVENT_C6H)		\
858 	__PMC_EV(ARMV8, EVENT_C7H)		\
859 	__PMC_EV(ARMV8, EVENT_C8H)		\
860 	__PMC_EV(ARMV8, EVENT_C9H)		\
861 	__PMC_EV(ARMV8, EVENT_CAH)		\
862 	__PMC_EV(ARMV8, EVENT_CBH)		\
863 	__PMC_EV(ARMV8, EVENT_CCH)		\
864 	__PMC_EV(ARMV8, EVENT_CDH)		\
865 	__PMC_EV(ARMV8, EVENT_CEH)		\
866 	__PMC_EV(ARMV8, EVENT_CFH)		\
867 	__PMC_EV(ARMV8, EVENT_D0H)		\
868 	__PMC_EV(ARMV8, EVENT_D1H)		\
869 	__PMC_EV(ARMV8, EVENT_D2H)		\
870 	__PMC_EV(ARMV8, EVENT_D3H)		\
871 	__PMC_EV(ARMV8, EVENT_D4H)		\
872 	__PMC_EV(ARMV8, EVENT_D5H)		\
873 	__PMC_EV(ARMV8, EVENT_D6H)		\
874 	__PMC_EV(ARMV8, EVENT_D7H)		\
875 	__PMC_EV(ARMV8, EVENT_D8H)		\
876 	__PMC_EV(ARMV8, EVENT_D9H)		\
877 	__PMC_EV(ARMV8, EVENT_DAH)		\
878 	__PMC_EV(ARMV8, EVENT_DBH)		\
879 	__PMC_EV(ARMV8, EVENT_DCH)		\
880 	__PMC_EV(ARMV8, EVENT_DDH)		\
881 	__PMC_EV(ARMV8, EVENT_DEH)		\
882 	__PMC_EV(ARMV8, EVENT_DFH)		\
883 	__PMC_EV(ARMV8, EVENT_E0H)		\
884 	__PMC_EV(ARMV8, EVENT_E1H)		\
885 	__PMC_EV(ARMV8, EVENT_E2H)		\
886 	__PMC_EV(ARMV8, EVENT_E3H)		\
887 	__PMC_EV(ARMV8, EVENT_E4H)		\
888 	__PMC_EV(ARMV8, EVENT_E5H)		\
889 	__PMC_EV(ARMV8, EVENT_E6H)		\
890 	__PMC_EV(ARMV8, EVENT_E7H)		\
891 	__PMC_EV(ARMV8, EVENT_E8H)		\
892 	__PMC_EV(ARMV8, EVENT_E9H)		\
893 	__PMC_EV(ARMV8, EVENT_EAH)		\
894 	__PMC_EV(ARMV8, EVENT_EBH)		\
895 	__PMC_EV(ARMV8, EVENT_ECH)		\
896 	__PMC_EV(ARMV8, EVENT_EDH)		\
897 	__PMC_EV(ARMV8, EVENT_EEH)		\
898 	__PMC_EV(ARMV8, EVENT_EFH)		\
899 	__PMC_EV(ARMV8, EVENT_F0H)		\
900 	__PMC_EV(ARMV8, EVENT_F1H)		\
901 	__PMC_EV(ARMV8, EVENT_F2H)		\
902 	__PMC_EV(ARMV8, EVENT_F3H)		\
903 	__PMC_EV(ARMV8, EVENT_F4H)		\
904 	__PMC_EV(ARMV8, EVENT_F5H)		\
905 	__PMC_EV(ARMV8, EVENT_F6H)		\
906 	__PMC_EV(ARMV8, EVENT_F7H)		\
907 	__PMC_EV(ARMV8, EVENT_F8H)		\
908 	__PMC_EV(ARMV8, EVENT_F9H)		\
909 	__PMC_EV(ARMV8, EVENT_FAH)		\
910 	__PMC_EV(ARMV8, EVENT_FBH)		\
911 	__PMC_EV(ARMV8, EVENT_FCH)		\
912 	__PMC_EV(ARMV8, EVENT_FDH)		\
913 	__PMC_EV(ARMV8, EVENT_FEH)		\
914 	__PMC_EV(ARMV8, EVENT_FFH)
915 
916 #define	PMC_EV_ARMV8_FIRST	PMC_EV_ARMV8_EVENT_00H
917 #define	PMC_EV_ARMV8_LAST	PMC_EV_ARMV8_EVENT_FFH
918 
919 #define	__PMC_EV_ALIAS_ARMV8_COMMON()					\
920 	__PMC_EV_ALIAS("SW_INCR",		ARMV8_EVENT_00H)	\
921 	__PMC_EV_ALIAS("L1I_CACHE_REFILL",	ARMV8_EVENT_01H)	\
922 	__PMC_EV_ALIAS("L1I_TLB_REFILL",	ARMV8_EVENT_02H)	\
923 	__PMC_EV_ALIAS("L1D_CACHE_REFILL",	ARMV8_EVENT_03H)	\
924 	__PMC_EV_ALIAS("L1D_CACHE",		ARMV8_EVENT_04H)	\
925 	__PMC_EV_ALIAS("L1D_TLB_REFILL",	ARMV8_EVENT_05H)	\
926 	__PMC_EV_ALIAS("INST_RETIRED",		ARMV8_EVENT_08H)	\
927 	__PMC_EV_ALIAS("EXC_TAKEN",		ARMV8_EVENT_09H)	\
928 	__PMC_EV_ALIAS("EXC_RETURN",		ARMV8_EVENT_0AH)	\
929 	__PMC_EV_ALIAS("CID_WRITE_RETIRED",	ARMV8_EVENT_0BH)	\
930 	__PMC_EV_ALIAS("BR_MIS_PRED",		ARMV8_EVENT_10H)	\
931 	__PMC_EV_ALIAS("CPU_CYCLES",		ARMV8_EVENT_11H)	\
932 	__PMC_EV_ALIAS("BR_PRED",		ARMV8_EVENT_12H)	\
933 	__PMC_EV_ALIAS("MEM_ACCESS",		ARMV8_EVENT_13H)	\
934 	__PMC_EV_ALIAS("L1I_CACHE",		ARMV8_EVENT_14H)	\
935 	__PMC_EV_ALIAS("L1D_CACHE_WB",		ARMV8_EVENT_15H)	\
936 	__PMC_EV_ALIAS("L2D_CACHE",		ARMV8_EVENT_16H)	\
937 	__PMC_EV_ALIAS("L2D_CACHE_REFILL",	ARMV8_EVENT_17H)	\
938 	__PMC_EV_ALIAS("L2D_CACHE_WB",		ARMV8_EVENT_18H)	\
939 	__PMC_EV_ALIAS("BUS_ACCESS",		ARMV8_EVENT_19H)	\
940 	__PMC_EV_ALIAS("MEMORY_ERROR",		ARMV8_EVENT_1AH)	\
941 	__PMC_EV_ALIAS("BUS_CYCLES",		ARMV8_EVENT_1DH)	\
942 	__PMC_EV_ALIAS("CHAIN",			ARMV8_EVENT_1EH)	\
943 	__PMC_EV_ALIAS("BUS_ACCESS_LD",		ARMV8_EVENT_60H)	\
944 	__PMC_EV_ALIAS("BUS_ACCESS_ST",		ARMV8_EVENT_61H)	\
945 	__PMC_EV_ALIAS("BR_INDIRECT_SPEC",	ARMV8_EVENT_7AH)	\
946 	__PMC_EV_ALIAS("EXC_IRQ",		ARMV8_EVENT_86H)	\
947 	__PMC_EV_ALIAS("EXC_FIQ",		ARMV8_EVENT_87H)
948 
949 #define	__PMC_EV_ALIAS_ARMV8_CORTEX_A53()				\
950 	__PMC_EV_ALIAS_ARMV8_COMMON()					\
951 	__PMC_EV_ALIAS("LD_RETIRED",		ARMV8_EVENT_06H)	\
952 	__PMC_EV_ALIAS("ST_RETIRED",		ARMV8_EVENT_07H)	\
953 	__PMC_EV_ALIAS("PC_WRITE_RETIRED",	ARMV8_EVENT_0CH)	\
954 	__PMC_EV_ALIAS("BR_IMMED_RETIRED",	ARMV8_EVENT_0DH)	\
955 	__PMC_EV_ALIAS("BR_RETURN_RETIRED",	ARMV8_EVENT_0EH)	\
956 	__PMC_EV_ALIAS("UNALIGNED_LDST_RETIRED",ARMV8_EVENT_0FH)
957 
958 #define	__PMC_EV_ALIAS_ARMV8_CORTEX_A57()				\
959 	__PMC_EV_ALIAS_ARMV8_COMMON()					\
960 	__PMC_EV_ALIAS("INST_SPEC",		ARMV8_EVENT_1BH)	\
961 	__PMC_EV_ALIAS("TTBR_WRITE_RETIRED",	ARMV8_EVENT_1CH)	\
962 	__PMC_EV_ALIAS("L1D_CACHE_LD",		ARMV8_EVENT_40H)	\
963 	__PMC_EV_ALIAS("L1D_CACHE_ST",		ARMV8_EVENT_41H)	\
964 	__PMC_EV_ALIAS("L1D_CACHE_REFILL_LD",	ARMV8_EVENT_42H)	\
965 	__PMC_EV_ALIAS("L1D_CACHE_REFILL_ST",	ARMV8_EVENT_43H)	\
966 	__PMC_EV_ALIAS("L1D_CACHE_WB_VICTIM",	ARMV8_EVENT_46H)	\
967 	__PMC_EV_ALIAS("L1D_CACHE_WB_CLEAN",	ARMV8_EVENT_47H)	\
968 	__PMC_EV_ALIAS("L1D_CACHE_INVAL",	ARMV8_EVENT_48H)	\
969 	__PMC_EV_ALIAS("L1D_TLB_REFILL_LD",	ARMV8_EVENT_4CH)	\
970 	__PMC_EV_ALIAS("L1D_TLB_REFILL_ST",	ARMV8_EVENT_4DH)	\
971 	__PMC_EV_ALIAS("L2D_CACHE_LD",		ARMV8_EVENT_50H)	\
972 	__PMC_EV_ALIAS("L2D_CACHE_ST",		ARMV8_EVENT_51H)	\
973 	__PMC_EV_ALIAS("L2D_CACHE_REFILL_LD",	ARMV8_EVENT_52H)	\
974 	__PMC_EV_ALIAS("L2D_CACHE_REFILL_ST",	ARMV8_EVENT_53H)	\
975 	__PMC_EV_ALIAS("L2D_CACHE_WB_VICTIM",	ARMV8_EVENT_56H)	\
976 	__PMC_EV_ALIAS("L2D_CACHE_WB_CLEAN",	ARMV8_EVENT_57H)	\
977 	__PMC_EV_ALIAS("L2D_CACHE_INVAL",	ARMV8_EVENT_58H)	\
978 	__PMC_EV_ALIAS("BUS_ACCESS_SHARED",	ARMV8_EVENT_62H)	\
979 	__PMC_EV_ALIAS("BUS_ACCESS_NOT_SHARED",	ARMV8_EVENT_63H)	\
980 	__PMC_EV_ALIAS("BUS_ACCESS_NORMAL",	ARMV8_EVENT_64H)	\
981 	__PMC_EV_ALIAS("BUS_ACCESS_PERIPH",	ARMV8_EVENT_65H)	\
982 	__PMC_EV_ALIAS("MEM_ACCESS_LD",		ARMV8_EVENT_66H)	\
983 	__PMC_EV_ALIAS("MEM_ACCESS_ST",		ARMV8_EVENT_67H)	\
984 	__PMC_EV_ALIAS("UNALIGNED_LD_SPEC",	ARMV8_EVENT_68H)	\
985 	__PMC_EV_ALIAS("UNALIGNED_ST_SPEC",	ARMV8_EVENT_69H)	\
986 	__PMC_EV_ALIAS("UNALIGNED_LDST_SPEC",	ARMV8_EVENT_6AH)	\
987 	__PMC_EV_ALIAS("LDREX_SPEC",		ARMV8_EVENT_6CH)	\
988 	__PMC_EV_ALIAS("STREX_PASS_SPEC",	ARMV8_EVENT_6DH)	\
989 	__PMC_EV_ALIAS("STREX_FAIL_SPEC",	ARMV8_EVENT_6EH)	\
990 	__PMC_EV_ALIAS("LD_SPEC",		ARMV8_EVENT_70H)	\
991 	__PMC_EV_ALIAS("ST_SPEC",		ARMV8_EVENT_71H)	\
992 	__PMC_EV_ALIAS("LDST_SPEC",		ARMV8_EVENT_72H)	\
993 	__PMC_EV_ALIAS("DP_SPEC",		ARMV8_EVENT_73H)	\
994 	__PMC_EV_ALIAS("ASE_SPEC",		ARMV8_EVENT_74H)	\
995 	__PMC_EV_ALIAS("VFP_SPEC",		ARMV8_EVENT_75H)	\
996 	__PMC_EV_ALIAS("PC_WRITE_SPEC",		ARMV8_EVENT_76H)	\
997 	__PMC_EV_ALIAS("CRYPTO_SPEC",		ARMV8_EVENT_77H)	\
998 	__PMC_EV_ALIAS("BR_IMMED_SPEC",		ARMV8_EVENT_78H)	\
999 	__PMC_EV_ALIAS("BR_RETURN_SPEC",	ARMV8_EVENT_79H)	\
1000 	__PMC_EV_ALIAS("ISB_SPEC",		ARMV8_EVENT_7CH)	\
1001 	__PMC_EV_ALIAS("DSB_SPEC",		ARMV8_EVENT_7DH)	\
1002 	__PMC_EV_ALIAS("DMB_SPEC",		ARMV8_EVENT_7EH)	\
1003 	__PMC_EV_ALIAS("EXC_UNDEF",		ARMV8_EVENT_81H)	\
1004 	__PMC_EV_ALIAS("EXC_SVC",		ARMV8_EVENT_82H)	\
1005 	__PMC_EV_ALIAS("EXC_PABORT",		ARMV8_EVENT_83H)	\
1006 	__PMC_EV_ALIAS("EXC_DABORT",		ARMV8_EVENT_84H)	\
1007 	__PMC_EV_ALIAS("EXC_SMC",		ARMV8_EVENT_88H)	\
1008 	__PMC_EV_ALIAS("EXC_HVC",		ARMV8_EVENT_8AH)	\
1009 	__PMC_EV_ALIAS("EXC_TRAP_PABORT",	ARMV8_EVENT_8BH)	\
1010 	__PMC_EV_ALIAS("EXC_TRAP_DABORT",	ARMV8_EVENT_8CH)	\
1011 	__PMC_EV_ALIAS("EXC_TRAP_OTHER",	ARMV8_EVENT_8DH)	\
1012 	__PMC_EV_ALIAS("EXC_TRAP_IRQ",		ARMV8_EVENT_8EH)	\
1013 	__PMC_EV_ALIAS("EXC_TRAP_FIQ",		ARMV8_EVENT_8FH)	\
1014 	__PMC_EV_ALIAS("RC_LD_SPEC",		ARMV8_EVENT_90H)	\
1015 	__PMC_EV_ALIAS("RC_ST_SPEC",		ARMV8_EVENT_91H)
1016 
1017 /*
1018  * MIPS Events from "Programming the MIPS32 24K Core Family",
1019  * Document Number: MD00355 Revision 04.63 December 19, 2008
1020  * These events are kept in the order found in Table 7.4.
1021  * For counters which are different between the left hand
1022  * column (0/2) and the right hand column (1/3) the left
1023  * hand is given first, e.g. BRANCH_COMPLETED and BRANCH_MISPRED
1024  * in the definition below.
1025  */
1026 
1027 #define __PMC_EV_MIPS24K()                         \
1028 	__PMC_EV(MIPS24K, CYCLE)                   \
1029 	__PMC_EV(MIPS24K, INSTR_EXECUTED)          \
1030 	__PMC_EV(MIPS24K, BRANCH_COMPLETED)        \
1031 	__PMC_EV(MIPS24K, BRANCH_MISPRED)          \
1032 	__PMC_EV(MIPS24K, RETURN)                  \
1033 	__PMC_EV(MIPS24K, RETURN_MISPRED)          \
1034 	__PMC_EV(MIPS24K, RETURN_NOT_31)           \
1035 	__PMC_EV(MIPS24K, RETURN_NOTPRED)          \
1036 	__PMC_EV(MIPS24K, ITLB_ACCESS)             \
1037 	__PMC_EV(MIPS24K, ITLB_MISS)               \
1038 	__PMC_EV(MIPS24K, DTLB_ACCESS)             \
1039 	__PMC_EV(MIPS24K, DTLB_MISS)               \
1040 	__PMC_EV(MIPS24K, JTLB_IACCESS)            \
1041 	__PMC_EV(MIPS24K, JTLB_IMISS)              \
1042 	__PMC_EV(MIPS24K, JTLB_DACCESS)            \
1043 	__PMC_EV(MIPS24K, JTLB_DMISS)              \
1044 	__PMC_EV(MIPS24K, IC_FETCH)                \
1045 	__PMC_EV(MIPS24K, IC_MISS)                 \
1046 	__PMC_EV(MIPS24K, DC_LOADSTORE)            \
1047 	__PMC_EV(MIPS24K, DC_WRITEBACK)            \
1048 	__PMC_EV(MIPS24K, DC_MISS)                 \
1049 	__PMC_EV(MIPS24K, STORE_MISS)              \
1050 	__PMC_EV(MIPS24K, LOAD_MISS)               \
1051 	__PMC_EV(MIPS24K, INTEGER_COMPLETED)       \
1052 	__PMC_EV(MIPS24K, FP_COMPLETED)            \
1053 	__PMC_EV(MIPS24K, LOAD_COMPLETED)          \
1054 	__PMC_EV(MIPS24K, STORE_COMPLETED)         \
1055 	__PMC_EV(MIPS24K, BARRIER_COMPLETED)       \
1056 	__PMC_EV(MIPS24K, MIPS16_COMPLETED)        \
1057 	__PMC_EV(MIPS24K, NOP_COMPLETED)           \
1058 	__PMC_EV(MIPS24K, INTEGER_MULDIV_COMPLETED)\
1059 	__PMC_EV(MIPS24K, RF_STALL)                \
1060 	__PMC_EV(MIPS24K, INSTR_REFETCH)           \
1061 	__PMC_EV(MIPS24K, STORE_COND_COMPLETED)    \
1062 	__PMC_EV(MIPS24K, STORE_COND_FAILED)       \
1063 	__PMC_EV(MIPS24K, ICACHE_REQUESTS)         \
1064 	__PMC_EV(MIPS24K, ICACHE_HIT)              \
1065 	__PMC_EV(MIPS24K, L2_WRITEBACK)            \
1066 	__PMC_EV(MIPS24K, L2_ACCESS)               \
1067 	__PMC_EV(MIPS24K, L2_MISS)                 \
1068 	__PMC_EV(MIPS24K, L2_ERR_CORRECTED)        \
1069 	__PMC_EV(MIPS24K, EXCEPTIONS)              \
1070 	__PMC_EV(MIPS24K, RF_CYCLES_STALLED)       \
1071 	__PMC_EV(MIPS24K, IFU_CYCLES_STALLED)      \
1072 	__PMC_EV(MIPS24K, ALU_CYCLES_STALLED)      \
1073 	__PMC_EV(MIPS24K, UNCACHED_LOAD)           \
1074 	__PMC_EV(MIPS24K, UNCACHED_STORE)          \
1075 	__PMC_EV(MIPS24K, CP2_REG_TO_REG_COMPLETED)\
1076 	__PMC_EV(MIPS24K, MFTC_COMPLETED)          \
1077 	__PMC_EV(MIPS24K, IC_BLOCKED_CYCLES)       \
1078 	__PMC_EV(MIPS24K, DC_BLOCKED_CYCLES)       \
1079 	__PMC_EV(MIPS24K, L2_IMISS_STALL_CYCLES)   \
1080 	__PMC_EV(MIPS24K, L2_DMISS_STALL_CYCLES)   \
1081 	__PMC_EV(MIPS24K, DMISS_CYCLES)            \
1082 	__PMC_EV(MIPS24K, L2_MISS_CYCLES)          \
1083 	__PMC_EV(MIPS24K, UNCACHED_BLOCK_CYCLES)   \
1084 	__PMC_EV(MIPS24K, MDU_STALL_CYCLES)        \
1085 	__PMC_EV(MIPS24K, FPU_STALL_CYCLES)        \
1086 	__PMC_EV(MIPS24K, CP2_STALL_CYCLES)        \
1087 	__PMC_EV(MIPS24K, COREXTEND_STALL_CYCLES)  \
1088 	__PMC_EV(MIPS24K, ISPRAM_STALL_CYCLES)     \
1089 	__PMC_EV(MIPS24K, DSPRAM_STALL_CYCLES)     \
1090 	__PMC_EV(MIPS24K, CACHE_STALL_CYCLES)      \
1091 	__PMC_EV(MIPS24K, LOAD_TO_USE_STALLS)      \
1092 	__PMC_EV(MIPS24K, BASE_MISPRED_STALLS)     \
1093 	__PMC_EV(MIPS24K, CPO_READ_STALLS)         \
1094 	__PMC_EV(MIPS24K, BRANCH_MISPRED_CYCLES)   \
1095 	__PMC_EV(MIPS24K, IFETCH_BUFFER_FULL)      \
1096 	__PMC_EV(MIPS24K, FETCH_BUFFER_ALLOCATED)  \
1097 	__PMC_EV(MIPS24K, EJTAG_ITRIGGER)          \
1098 	__PMC_EV(MIPS24K, EJTAG_DTRIGGER)          \
1099 	__PMC_EV(MIPS24K, FSB_LT_QUARTER)          \
1100 	__PMC_EV(MIPS24K, FSB_QUARTER_TO_HALF)     \
1101 	__PMC_EV(MIPS24K, FSB_GT_HALF)             \
1102 	__PMC_EV(MIPS24K, FSB_FULL_PIPELINE_STALLS)\
1103 	__PMC_EV(MIPS24K, LDQ_LT_QUARTER)          \
1104 	__PMC_EV(MIPS24K, LDQ_QUARTER_TO_HALF)     \
1105 	__PMC_EV(MIPS24K, LDQ_GT_HALF)             \
1106 	__PMC_EV(MIPS24K, LDQ_FULL_PIPELINE_STALLS)\
1107 	__PMC_EV(MIPS24K, WBB_LT_QUARTER)          \
1108 	__PMC_EV(MIPS24K, WBB_QUARTER_TO_HALF)     \
1109 	__PMC_EV(MIPS24K, WBB_GT_HALF)             \
1110 	__PMC_EV(MIPS24K, WBB_FULL_PIPELINE_STALLS) \
1111 	__PMC_EV(MIPS24K, REQUEST_LATENCY)         \
1112 	__PMC_EV(MIPS24K, REQUEST_COUNT)
1113 
1114 #define	PMC_EV_MIPS24K_FIRST	PMC_EV_MIPS24K_CYCLE
1115 #define	PMC_EV_MIPS24K_LAST	PMC_EV_MIPS24K_WBB_FULL_PIPELINE_STALLS
1116 
1117 /*
1118  * MIPS74k events.  Similar to MIPS24k, the arrangement
1119  * is (0,2) then (1,3) events.
1120  */
1121 #define __PMC_EV_MIPS74K()			\
1122 	__PMC_EV(MIPS74K, CYCLES)		\
1123 	__PMC_EV(MIPS74K, INSTR_EXECUTED)	\
1124 	__PMC_EV(MIPS74K, PREDICTED_JR_31)	\
1125 	__PMC_EV(MIPS74K, JR_31_MISPREDICTIONS)	\
1126 	__PMC_EV(MIPS74K, REDIRECT_STALLS)	\
1127 	__PMC_EV(MIPS74K, JR_31_NO_PREDICTIONS)	\
1128 	__PMC_EV(MIPS74K, ITLB_ACCESSES)	\
1129 	__PMC_EV(MIPS74K, ITLB_MISSES)		\
1130 	__PMC_EV(MIPS74K, JTLB_INSN_MISSES)	\
1131 	__PMC_EV(MIPS74K, ICACHE_ACCESSES)	\
1132 	__PMC_EV(MIPS74K, ICACHE_MISSES)	\
1133 	__PMC_EV(MIPS74K, ICACHE_MISS_STALLS)	\
1134 	__PMC_EV(MIPS74K, UNCACHED_IFETCH_STALLS)	\
1135 	__PMC_EV(MIPS74K, PDTRACE_BACK_STALLS)	\
1136 	__PMC_EV(MIPS74K, IFU_REPLAYS)		\
1137 	__PMC_EV(MIPS74K, KILLED_FETCH_SLOTS)	\
1138 	__PMC_EV(MIPS74K, IFU_IDU_MISS_PRED_UPSTREAM_CYCLES)	\
1139 	__PMC_EV(MIPS74K, IFU_IDU_NO_FETCH_CYCLES)	\
1140 	__PMC_EV(MIPS74K, IFU_IDU_CLOGED_DOWNSTREAM_CYCLES)	\
1141 	__PMC_EV(MIPS74K, DDQ0_FULL_DR_STALLS)	\
1142 	__PMC_EV(MIPS74K, DDQ1_FULL_DR_STALLS)	\
1143 	__PMC_EV(MIPS74K, ALCB_FULL_DR_STALLS)	\
1144 	__PMC_EV(MIPS74K, AGCB_FULL_DR_STALLS)	\
1145 	__PMC_EV(MIPS74K, CLDQ_FULL_DR_STALLS)	\
1146 	__PMC_EV(MIPS74K, IODQ_FULL_DR_STALLS)	\
1147 	__PMC_EV(MIPS74K, ALU_EMPTY_CYCLES)	\
1148 	__PMC_EV(MIPS74K, AGEN_EMPTY_CYCLES)	\
1149 	__PMC_EV(MIPS74K, ALU_OPERANDS_NOT_READY_CYCLES)	\
1150 	__PMC_EV(MIPS74K, AGEN_OPERANDS_NOT_READY_CYCLES)	\
1151 	__PMC_EV(MIPS74K, ALU_NO_ISSUES_CYCLES)	\
1152 	__PMC_EV(MIPS74K, AGEN_NO_ISSUES_CYCLES)	\
1153 	__PMC_EV(MIPS74K, ALU_BUBBLE_CYCLES)	\
1154 	__PMC_EV(MIPS74K, AGEN_BUBBLE_CYCLES)	\
1155 	__PMC_EV(MIPS74K, SINGLE_ISSUE_CYCLES)	\
1156 	__PMC_EV(MIPS74K, DUAL_ISSUE_CYCLES)	\
1157 	__PMC_EV(MIPS74K, OOO_ALU_ISSUE_CYCLES)	\
1158 	__PMC_EV(MIPS74K, OOO_AGEN_ISSUE_CYCLES)	\
1159 	__PMC_EV(MIPS74K, JALR_JALR_HB_INSNS)	\
1160 	__PMC_EV(MIPS74K, DCACHE_LINE_REFILL_REQUESTS)	\
1161 	__PMC_EV(MIPS74K, DCACHE_LOAD_ACCESSES)	\
1162 	__PMC_EV(MIPS74K, DCACHE_ACCESSES)	\
1163 	__PMC_EV(MIPS74K, DCACHE_WRITEBACKS)	\
1164 	__PMC_EV(MIPS74K, DCACHE_MISSES)	\
1165 	__PMC_EV(MIPS74K, JTLB_DATA_ACCESSES)	\
1166 	__PMC_EV(MIPS74K, JTLB_DATA_MISSES)	\
1167 	__PMC_EV(MIPS74K, LOAD_STORE_REPLAYS)	\
1168 	__PMC_EV(MIPS74K, VA_TRANSALTION_CORNER_CASES)	\
1169 	__PMC_EV(MIPS74K, LOAD_STORE_BLOCKED_CYCLES)	\
1170 	__PMC_EV(MIPS74K, LOAD_STORE_NO_FILL_REQUESTS)	\
1171 	__PMC_EV(MIPS74K, L2_CACHE_WRITEBACKS)	\
1172 	__PMC_EV(MIPS74K, L2_CACHE_ACCESSES)	\
1173 	__PMC_EV(MIPS74K, L2_CACHE_MISSES)	\
1174 	__PMC_EV(MIPS74K, L2_CACHE_MISS_CYCLES)	\
1175 	__PMC_EV(MIPS74K, FSB_FULL_STALLS)	\
1176 	__PMC_EV(MIPS74K, FSB_OVER_50_FULL)	\
1177 	__PMC_EV(MIPS74K, LDQ_FULL_STALLS)	\
1178 	__PMC_EV(MIPS74K, LDQ_OVER_50_FULL)	\
1179 	__PMC_EV(MIPS74K, WBB_FULL_STALLS)	\
1180 	__PMC_EV(MIPS74K, WBB_OVER_50_FULL)	\
1181 	__PMC_EV(MIPS74K, LOAD_MISS_CONSUMER_REPLAYS)	\
1182 	__PMC_EV(MIPS74K, CP1_CP2_LOAD_INSNS)	\
1183 	__PMC_EV(MIPS74K, JR_NON_31_INSNS)	\
1184 	__PMC_EV(MIPS74K, MISPREDICTED_JR_31_INSNS)	\
1185 	__PMC_EV(MIPS74K, BRANCH_INSNS)		\
1186 	__PMC_EV(MIPS74K, CP1_CP2_COND_BRANCH_INSNS)	\
1187 	__PMC_EV(MIPS74K, BRANCH_LIKELY_INSNS)	\
1188 	__PMC_EV(MIPS74K, MISPREDICTED_BRANCH_LIKELY_INSNS)	\
1189 	__PMC_EV(MIPS74K, COND_BRANCH_INSNS)	\
1190 	__PMC_EV(MIPS74K, MISPREDICTED_BRANCH_INSNS)	\
1191 	__PMC_EV(MIPS74K, INTEGER_INSNS)	\
1192 	__PMC_EV(MIPS74K, FPU_INSNS)		\
1193 	__PMC_EV(MIPS74K, LOAD_INSNS)		\
1194 	__PMC_EV(MIPS74K, STORE_INSNS)		\
1195 	__PMC_EV(MIPS74K, J_JAL_INSNS)		\
1196 	__PMC_EV(MIPS74K, MIPS16_INSNS)		\
1197 	__PMC_EV(MIPS74K, NOP_INSNS)		\
1198 	__PMC_EV(MIPS74K, NT_MUL_DIV_INSNS)	\
1199 	__PMC_EV(MIPS74K, DSP_INSNS)		\
1200 	__PMC_EV(MIPS74K, ALU_DSP_SATURATION_INSNS)	\
1201 	__PMC_EV(MIPS74K, DSP_BRANCH_INSNS)	\
1202 	__PMC_EV(MIPS74K, MDU_DSP_SATURATION_INSNS)	\
1203 	__PMC_EV(MIPS74K, UNCACHED_LOAD_INSNS)	\
1204 	__PMC_EV(MIPS74K, UNCACHED_STORE_INSNS)	\
1205 	__PMC_EV(MIPS74K, EJTAG_INSN_TRIGGERS)	\
1206 	__PMC_EV(MIPS74K, CP1_BRANCH_MISPREDICTIONS)	\
1207 	__PMC_EV(MIPS74K, SC_INSNS)		\
1208 	__PMC_EV(MIPS74K, FAILED_SC_INSNS)	\
1209 	__PMC_EV(MIPS74K, PREFETCH_INSNS)	\
1210 	__PMC_EV(MIPS74K, CACHE_HIT_PREFETCH_INSNS)	\
1211 	__PMC_EV(MIPS74K, NO_INSN_CYCLES)	\
1212 	__PMC_EV(MIPS74K, LOAD_MISS_INSNS)	\
1213 	__PMC_EV(MIPS74K, ONE_INSN_CYCLES)	\
1214 	__PMC_EV(MIPS74K, TWO_INSNS_CYCLES)	\
1215 	__PMC_EV(MIPS74K, GFIFO_BLOCKED_CYCLES)	\
1216 	__PMC_EV(MIPS74K, CP1_CP2_STORE_INSNS)	\
1217 	__PMC_EV(MIPS74K, MISPREDICTION_STALLS)	\
1218 	__PMC_EV(MIPS74K, MISPREDICTED_BRANCH_INSNS_CYCLES)	\
1219 	__PMC_EV(MIPS74K, EXCEPTIONS_TAKEN)	\
1220 	__PMC_EV(MIPS74K, GRADUATION_REPLAYS)	\
1221 	__PMC_EV(MIPS74K, COREEXTEND_EVENTS)	\
1222 	__PMC_EV(MIPS74K, ISPRAM_EVENTS)	\
1223 	__PMC_EV(MIPS74K, DSPRAM_EVENTS)	\
1224 	__PMC_EV(MIPS74K, L2_CACHE_SINGLE_BIT_ERRORS)	\
1225 	__PMC_EV(MIPS74K, SYSTEM_EVENT_0)	\
1226 	__PMC_EV(MIPS74K, SYSTEM_EVENT_1)	\
1227 	__PMC_EV(MIPS74K, SYSTEM_EVENT_2)	\
1228 	__PMC_EV(MIPS74K, SYSTEM_EVENT_3)	\
1229 	__PMC_EV(MIPS74K, SYSTEM_EVENT_4)	\
1230 	__PMC_EV(MIPS74K, SYSTEM_EVENT_5)	\
1231 	__PMC_EV(MIPS74K, SYSTEM_EVENT_6)	\
1232 	__PMC_EV(MIPS74K, SYSTEM_EVENT_7)	\
1233 	__PMC_EV(MIPS74K, OCP_ALL_REQUESTS)	\
1234 	__PMC_EV(MIPS74K, OCP_ALL_CACHEABLE_REQUESTS)	\
1235 	__PMC_EV(MIPS74K, OCP_READ_REQUESTS)	\
1236 	__PMC_EV(MIPS74K, OCP_READ_CACHEABLE_REQUESTS)	\
1237 	__PMC_EV(MIPS74K, OCP_WRITE_REQUESTS)	\
1238 	__PMC_EV(MIPS74K, OCP_WRITE_CACHEABLE_REQUESTS)	\
1239 	__PMC_EV(MIPS74K, FSB_LESS_25_FULL)	\
1240 	__PMC_EV(MIPS74K, FSB_25_50_FULL)	\
1241 	__PMC_EV(MIPS74K, LDQ_LESS_25_FULL)	\
1242 	__PMC_EV(MIPS74K, LDQ_25_50_FULL)	\
1243 	__PMC_EV(MIPS74K, WBB_LESS_25_FULL)	\
1244 	__PMC_EV(MIPS74K, WBB_25_50_FULL)
1245 
1246 #define	PMC_EV_MIPS74K_FIRST	PMC_EV_MIPS74K_CYCLES
1247 #define	PMC_EV_MIPS74K_LAST	PMC_EV_MIPS74K_WBB_25_50_FULL
1248 
1249 #define __PMC_EV_BERI()					\
1250 	__PMC_EV(BERI, CYCLE)				\
1251 	__PMC_EV(BERI, INST)				\
1252 	__PMC_EV(BERI, INST_USER)			\
1253 	__PMC_EV(BERI, INST_KERNEL)			\
1254 	__PMC_EV(BERI, IMPRECISE_SETBOUNDS)		\
1255 	__PMC_EV(BERI, UNREPRESENTABLE_CAPS)		\
1256 	__PMC_EV(BERI, ITLB_MISS)			\
1257 	__PMC_EV(BERI, DTLB_MISS)			\
1258 	__PMC_EV(BERI, ICACHE_WRITE_HIT)		\
1259 	__PMC_EV(BERI, ICACHE_WRITE_MISS)		\
1260 	__PMC_EV(BERI, ICACHE_READ_HIT)			\
1261 	__PMC_EV(BERI, ICACHE_READ_MISS)		\
1262 	__PMC_EV(BERI, ICACHE_EVICT)			\
1263 	__PMC_EV(BERI, DCACHE_WRITE_HIT)		\
1264 	__PMC_EV(BERI, DCACHE_WRITE_MISS)		\
1265 	__PMC_EV(BERI, DCACHE_READ_HIT)			\
1266 	__PMC_EV(BERI, DCACHE_READ_MISS)		\
1267 	__PMC_EV(BERI, DCACHE_EVICT)			\
1268 	__PMC_EV(BERI, DCACHE_SET_TAG_WRITE)		\
1269 	__PMC_EV(BERI, DCACHE_SET_TAG_READ)		\
1270 	__PMC_EV(BERI, L2CACHE_WRITE_HIT)		\
1271 	__PMC_EV(BERI, L2CACHE_WRITE_MISS)		\
1272 	__PMC_EV(BERI, L2CACHE_READ_HIT)		\
1273 	__PMC_EV(BERI, L2CACHE_READ_MISS)		\
1274 	__PMC_EV(BERI, L2CACHE_EVICT)			\
1275 	__PMC_EV(BERI, L2CACHE_SET_TAG_WRITE)		\
1276 	__PMC_EV(BERI, L2CACHE_SET_TAG_READ)		\
1277 	__PMC_EV(BERI, MEM_BYTE_READ)			\
1278 	__PMC_EV(BERI, MEM_BYTE_WRITE)			\
1279 	__PMC_EV(BERI, MEM_HWORD_READ)			\
1280 	__PMC_EV(BERI, MEM_HWORD_WRITE)			\
1281 	__PMC_EV(BERI, MEM_WORD_READ)			\
1282 	__PMC_EV(BERI, MEM_WORD_WRITE)			\
1283 	__PMC_EV(BERI, MEM_DWORD_READ)			\
1284 	__PMC_EV(BERI, MEM_DWORD_WRITE)			\
1285 	__PMC_EV(BERI, MEM_CAP_READ)			\
1286 	__PMC_EV(BERI, MEM_CAP_WRITE)			\
1287 	__PMC_EV(BERI, MEM_CAP_READ_TAG_SET)		\
1288 	__PMC_EV(BERI, MEM_CAP_WRITE_TAG_SET)		\
1289 	__PMC_EV(BERI, TAGCACHE_WRITE_HIT)		\
1290 	__PMC_EV(BERI, TAGCACHE_WRITE_MISS)		\
1291 	__PMC_EV(BERI, TAGCACHE_READ_HIT)		\
1292 	__PMC_EV(BERI, TAGCACHE_READ_MISS)		\
1293 	__PMC_EV(BERI, TAGCACHE_EVICT)			\
1294 	__PMC_EV(BERI, L2CACHEMASTER_READ_REQ)		\
1295 	__PMC_EV(BERI, L2CACHEMASTER_WRITE_REQ)		\
1296 	__PMC_EV(BERI, L2CACHEMASTER_WRITE_REQ_FLIT)	\
1297 	__PMC_EV(BERI, L2CACHEMASTER_READ_RSP)		\
1298 	__PMC_EV(BERI, L2CACHEMASTER_READ_RSP_FLIT)	\
1299 	__PMC_EV(BERI, L2CACHEMASTER_WRITE_RSP)		\
1300 	__PMC_EV(BERI, TAGCACHEMASTER_READ_REQ)		\
1301 	__PMC_EV(BERI, TAGCACHEMASTER_WRITE_REQ)	\
1302 	__PMC_EV(BERI, TAGCACHEMASTER_WRITE_REQ_FLIT)	\
1303 	__PMC_EV(BERI, TAGCACHEMASTER_READ_RSP)		\
1304 	__PMC_EV(BERI, TAGCACHEMASTER_READ_RSP_FLIT)	\
1305 	__PMC_EV(BERI, TAGCACHEMASTER_WRITE_RSP)
1306 
1307 #define	PMC_EV_BERI_FIRST	PMC_EV_BERI_CYCLE
1308 #define	PMC_EV_BERI_LAST	PMC_EV_BERI_TAGCACHEMASTER_WRITE_RSP
1309 
1310 /*
1311  * Cavium Octeon counters. Obtained from cvmx-core.h
1312  */
1313 #define __PMC_EV_OCTEON()                         \
1314     __PMC_EV(OCTEON, CLK)                         \
1315     __PMC_EV(OCTEON, ISSUE)                       \
1316     __PMC_EV(OCTEON, RET)                         \
1317     __PMC_EV(OCTEON, NISSUE)                      \
1318     __PMC_EV(OCTEON, SISSUE)                      \
1319     __PMC_EV(OCTEON, DISSUE)                      \
1320     __PMC_EV(OCTEON, IFI)                         \
1321     __PMC_EV(OCTEON, BR)                          \
1322     __PMC_EV(OCTEON, BRMIS)                       \
1323     __PMC_EV(OCTEON, J)                           \
1324     __PMC_EV(OCTEON, JMIS)                        \
1325     __PMC_EV(OCTEON, REPLAY)                      \
1326     __PMC_EV(OCTEON, IUNA)                        \
1327     __PMC_EV(OCTEON, TRAP)                        \
1328     __PMC_EV(OCTEON, UULOAD)                      \
1329     __PMC_EV(OCTEON, UUSTORE)                     \
1330     __PMC_EV(OCTEON, ULOAD)                       \
1331     __PMC_EV(OCTEON, USTORE)                      \
1332     __PMC_EV(OCTEON, EC)                          \
1333     __PMC_EV(OCTEON, MC)                          \
1334     __PMC_EV(OCTEON, CC)                          \
1335     __PMC_EV(OCTEON, CSRC)                        \
1336     __PMC_EV(OCTEON, CFETCH)                      \
1337     __PMC_EV(OCTEON, CPREF)                       \
1338     __PMC_EV(OCTEON, ICA)                         \
1339     __PMC_EV(OCTEON, II)                          \
1340     __PMC_EV(OCTEON, IP)                          \
1341     __PMC_EV(OCTEON, CIMISS)                      \
1342     __PMC_EV(OCTEON, WBUF)                        \
1343     __PMC_EV(OCTEON, WDAT)                        \
1344     __PMC_EV(OCTEON, WBUFLD)                      \
1345     __PMC_EV(OCTEON, WBUFFL)                      \
1346     __PMC_EV(OCTEON, WBUFTR)                      \
1347     __PMC_EV(OCTEON, BADD)                        \
1348     __PMC_EV(OCTEON, BADDL2)                      \
1349     __PMC_EV(OCTEON, BFILL)                       \
1350     __PMC_EV(OCTEON, DDIDS)                       \
1351     __PMC_EV(OCTEON, IDIDS)                       \
1352     __PMC_EV(OCTEON, DIDNA)                       \
1353     __PMC_EV(OCTEON, LDS)                         \
1354     __PMC_EV(OCTEON, LMLDS)                       \
1355     __PMC_EV(OCTEON, IOLDS)                       \
1356     __PMC_EV(OCTEON, DMLDS)                       \
1357     __PMC_EV(OCTEON, STS)                         \
1358     __PMC_EV(OCTEON, LMSTS)                       \
1359     __PMC_EV(OCTEON, IOSTS)                       \
1360     __PMC_EV(OCTEON, IOBDMA)                      \
1361     __PMC_EV(OCTEON, DTLB)                        \
1362     __PMC_EV(OCTEON, DTLBAD)                      \
1363     __PMC_EV(OCTEON, ITLB)                        \
1364     __PMC_EV(OCTEON, SYNC)                        \
1365     __PMC_EV(OCTEON, SYNCIOB)                     \
1366     __PMC_EV(OCTEON, SYNCW)
1367 
1368 #define	PMC_EV_OCTEON_FIRST	PMC_EV_OCTEON_CLK
1369 #define	PMC_EV_OCTEON_LAST	PMC_EV_OCTEON_SYNCW
1370 
1371 #define __PMC_EV_PPC7450()						\
1372 	__PMC_EV(PPC7450, CYCLE)					\
1373 	__PMC_EV(PPC7450, INSTR_COMPLETED)				\
1374 	__PMC_EV(PPC7450, TLB_BIT_TRANSITIONS)				\
1375 	__PMC_EV(PPC7450, INSTR_DISPATCHED)				\
1376 	__PMC_EV(PPC7450, PMON_EXCEPT)					\
1377 	__PMC_EV(PPC7450, PMON_SIG)					\
1378 	__PMC_EV(PPC7450, VPU_INSTR_COMPLETED)				\
1379 	__PMC_EV(PPC7450, VFPU_INSTR_COMPLETED)				\
1380 	__PMC_EV(PPC7450, VIU1_INSTR_COMPLETED)				\
1381 	__PMC_EV(PPC7450, VIU2_INSTR_COMPLETED)				\
1382 	__PMC_EV(PPC7450, MTVSCR_INSTR_COMPLETED)			\
1383 	__PMC_EV(PPC7450, MTVRSAVE_INSTR_COMPLETED)			\
1384 	__PMC_EV(PPC7450, VPU_INSTR_WAIT_CYCLES)			\
1385 	__PMC_EV(PPC7450, VFPU_INSTR_WAIT_CYCLES)			\
1386 	__PMC_EV(PPC7450, VIU1_INSTR_WAIT_CYCLES)			\
1387 	__PMC_EV(PPC7450, VIU2_INSTR_WAIT_CYCLES)			\
1388 	__PMC_EV(PPC7450, MFVSCR_SYNC_CYCLES)				\
1389 	__PMC_EV(PPC7450, VSCR_SAT_SET)					\
1390 	__PMC_EV(PPC7450, STORE_INSTR_COMPLETED)			\
1391 	__PMC_EV(PPC7450, L1_INSTR_CACHE_MISSES)			\
1392 	__PMC_EV(PPC7450, L1_DATA_SNOOPS)				\
1393 	__PMC_EV(PPC7450, UNRESOLVED_BRANCHES)				\
1394 	__PMC_EV(PPC7450, SPEC_BUFFER_CYCLES)				\
1395 	__PMC_EV(PPC7450, BRANCH_UNIT_STALL_CYCLES)			\
1396 	__PMC_EV(PPC7450, TRUE_BRANCH_TARGET_HITS)			\
1397 	__PMC_EV(PPC7450, BRANCH_LINK_STAC_PREDICTED)			\
1398 	__PMC_EV(PPC7450, GPR_ISSUE_QUEUE_DISPATCHES)			\
1399 	__PMC_EV(PPC7450, CYCLES_THREE_INSTR_DISPATCHED)		\
1400 	__PMC_EV(PPC7450, THRESHOLD_INSTR_QUEUE_ENTRIES_CYCLES)		\
1401 	__PMC_EV(PPC7450, THRESHOLD_VEC_INSTR_QUEUE_ENTRIES_CYCLES)	\
1402 	__PMC_EV(PPC7450, CYCLES_NO_COMPLETED_INSTRS)			\
1403 	__PMC_EV(PPC7450, IU2_INSTR_COMPLETED)				\
1404 	__PMC_EV(PPC7450, BRANCHES_COMPLETED)				\
1405 	__PMC_EV(PPC7450, EIEIO_INSTR_COMPLETED)			\
1406 	__PMC_EV(PPC7450, MTSPR_INSTR_COMPLETED)			\
1407 	__PMC_EV(PPC7450, SC_INSTR_COMPLETED)				\
1408 	__PMC_EV(PPC7450, LS_LM_COMPLETED)				\
1409 	__PMC_EV(PPC7450, ITLB_HW_TABLE_SEARCH_CYCLES)			\
1410 	__PMC_EV(PPC7450, DTLB_HW_SEARCH_CYCLES_OVER_THRESHOLD)		\
1411 	__PMC_EV(PPC7450, L1_INSTR_CACHE_ACCESSES)			\
1412 	__PMC_EV(PPC7450, INSTR_BKPT_MATCHES)				\
1413 	__PMC_EV(PPC7450, L1_DATA_CACHE_LOAD_MISS_CYCLES_OVER_THRESHOLD)\
1414 	__PMC_EV(PPC7450, L1_DATA_SNOOP_HIT_ON_MODIFIED)		\
1415 	__PMC_EV(PPC7450, LOAD_MISS_ALIAS)				\
1416 	__PMC_EV(PPC7450, LOAD_MISS_ALIAS_ON_TOUCH)			\
1417 	__PMC_EV(PPC7450, TOUCH_ALIAS)					\
1418 	__PMC_EV(PPC7450, L1_DATA_SNOOP_HIT_CASTOUT_QUEUE)		\
1419 	__PMC_EV(PPC7450, L1_DATA_SNOOP_HIT_CASTOUT)			\
1420 	__PMC_EV(PPC7450, L1_DATA_SNOOP_HITS)				\
1421 	__PMC_EV(PPC7450, WRITE_THROUGH_STORES)				\
1422 	__PMC_EV(PPC7450, CACHE_INHIBITED_STORES)			\
1423 	__PMC_EV(PPC7450, L1_DATA_LOAD_HIT)				\
1424 	__PMC_EV(PPC7450, L1_DATA_TOUCH_HIT)				\
1425 	__PMC_EV(PPC7450, L1_DATA_STORE_HIT)				\
1426 	__PMC_EV(PPC7450, L1_DATA_TOTAL_HITS)				\
1427 	__PMC_EV(PPC7450, DST_INSTR_DISPATCHED)				\
1428 	__PMC_EV(PPC7450, REFRESHED_DSTS)				\
1429 	__PMC_EV(PPC7450, SUCCESSFUL_DST_TABLE_SEARCHES)		\
1430 	__PMC_EV(PPC7450, DSS_INSTR_COMPLETED)				\
1431 	__PMC_EV(PPC7450, DST_STREAM_0_CACHE_LINE_FETCHES)		\
1432 	__PMC_EV(PPC7450, VTQ_SUSPENDS_DUE_TO_CTX_CHANGE)		\
1433 	__PMC_EV(PPC7450, VTQ_LINE_FETCH_HIT)				\
1434 	__PMC_EV(PPC7450, VEC_LOAD_INSTR_COMPLETED)			\
1435 	__PMC_EV(PPC7450, FP_STORE_INSTR_COMPLETED_IN_LSU)		\
1436 	__PMC_EV(PPC7450, FPU_RENORMALIZATION)				\
1437 	__PMC_EV(PPC7450, FPU_DENORMALIZATION)				\
1438 	__PMC_EV(PPC7450, FP_STORE_CAUSES_STALL_IN_LSU)			\
1439 	__PMC_EV(PPC7450, LD_ST_TRUE_ALIAS_STALL)			\
1440 	__PMC_EV(PPC7450, LSU_INDEXED_ALIAS_STALL)			\
1441 	__PMC_EV(PPC7450, LSU_ALIAS_VS_FSQ_WB0_WB1)			\
1442 	__PMC_EV(PPC7450, LSU_ALIAS_VS_CSQ)				\
1443 	__PMC_EV(PPC7450, LSU_LOAD_HIT_LINE_ALIAS_VS_CSQ0)		\
1444 	__PMC_EV(PPC7450, LSU_LOAD_MISS_LINE_ALIAS_VS_CSQ0)		\
1445 	__PMC_EV(PPC7450, LSU_TOUCH_LINE_ALIAS_VS_FSQ_WB0_WB1)		\
1446 	__PMC_EV(PPC7450, LSU_TOUCH_ALIAS_VS_CSQ)			\
1447 	__PMC_EV(PPC7450, LSU_LMQ_FULL_STALL)				\
1448 	__PMC_EV(PPC7450, FP_LOAD_INSTR_COMPLETED_IN_LSU)		\
1449 	__PMC_EV(PPC7450, FP_LOAD_SINGLE_INSTR_COMPLETED_IN_LSU)	\
1450 	__PMC_EV(PPC7450, FP_LOAD_DOUBLE_COMPLETED_IN_LSU)		\
1451 	__PMC_EV(PPC7450, LSU_RA_LATCH_STALL)				\
1452 	__PMC_EV(PPC7450, LSU_LOAD_VS_STORE_QUEUE_ALIAS_STALL)		\
1453 	__PMC_EV(PPC7450, LSU_LMQ_INDEX_ALIAS)				\
1454 	__PMC_EV(PPC7450, LSU_STORE_QUEUE_INDEX_ALIAS)			\
1455 	__PMC_EV(PPC7450, LSU_CSQ_FORWARDING)				\
1456 	__PMC_EV(PPC7450, LSU_MISALIGNED_LOAD_FINISH)			\
1457 	__PMC_EV(PPC7450, LSU_MISALIGN_STORE_COMPLETED)			\
1458 	__PMC_EV(PPC7450, LSU_MISALIGN_STALL)				\
1459 	__PMC_EV(PPC7450, FP_ONE_QUARTER_FPSCR_RENAMES_BUSY)		\
1460 	__PMC_EV(PPC7450, FP_ONE_HALF_FPSCR_RENAMES_BUSY)		\
1461 	__PMC_EV(PPC7450, FP_THREE_QUARTERS_FPSCR_RENAMES_BUSY)		\
1462 	__PMC_EV(PPC7450, FP_ALL_FPSCR_RENAMES_BUSY)			\
1463 	__PMC_EV(PPC7450, FP_DENORMALIZED_RESULT)			\
1464 	__PMC_EV(PPC7450, L1_DATA_TOTAL_MISSES)				\
1465 	__PMC_EV(PPC7450, DISPATCHES_TO_FPR_ISSUE_QUEUE)		\
1466 	__PMC_EV(PPC7450, LSU_INSTR_COMPLETED)				\
1467 	__PMC_EV(PPC7450, LOAD_INSTR_COMPLETED)				\
1468 	__PMC_EV(PPC7450, SS_SM_INSTR_COMPLETED)			\
1469 	__PMC_EV(PPC7450, TLBIE_INSTR_COMPLETED)			\
1470 	__PMC_EV(PPC7450, LWARX_INSTR_COMPLETED)			\
1471 	__PMC_EV(PPC7450, MFSPR_INSTR_COMPLETED)			\
1472 	__PMC_EV(PPC7450, REFETCH_SERIALIZATION)			\
1473 	__PMC_EV(PPC7450, COMPLETION_QUEUE_ENTRIES_OVER_THRESHOLD)	\
1474 	__PMC_EV(PPC7450, CYCLES_ONE_INSTR_DISPATCHED)			\
1475 	__PMC_EV(PPC7450, CYCLES_TWO_INSTR_COMPLETED)			\
1476 	__PMC_EV(PPC7450, ITLB_NON_SPECULATIVE_MISSES)			\
1477 	__PMC_EV(PPC7450, CYCLES_WAITING_FROM_L1_INSTR_CACHE_MISS)	\
1478 	__PMC_EV(PPC7450, L1_DATA_LOAD_ACCESS_MISS)			\
1479 	__PMC_EV(PPC7450, L1_DATA_TOUCH_MISS)				\
1480 	__PMC_EV(PPC7450, L1_DATA_STORE_MISS)				\
1481 	__PMC_EV(PPC7450, L1_DATA_TOUCH_MISS_CYCLES)			\
1482 	__PMC_EV(PPC7450, L1_DATA_CYCLES_USED)				\
1483 	__PMC_EV(PPC7450, DST_STREAM_1_CACHE_LINE_FETCHES)		\
1484 	__PMC_EV(PPC7450, VTQ_STREAM_CANCELED_PREMATURELY)		\
1485 	__PMC_EV(PPC7450, VTQ_RESUMES_DUE_TO_CTX_CHANGE)		\
1486 	__PMC_EV(PPC7450, VTQ_LINE_FETCH_MISS)				\
1487 	__PMC_EV(PPC7450, VTQ_LINE_FETCH)				\
1488 	__PMC_EV(PPC7450, TLBIE_SNOOPS)					\
1489 	__PMC_EV(PPC7450, L1_INSTR_CACHE_RELOADS)			\
1490 	__PMC_EV(PPC7450, L1_DATA_CACHE_RELOADS)			\
1491 	__PMC_EV(PPC7450, L1_DATA_CACHE_CASTOUTS_TO_L2)			\
1492 	__PMC_EV(PPC7450, STORE_MERGE_GATHER)				\
1493 	__PMC_EV(PPC7450, CACHEABLE_STORE_MERGE_TO_32_BYTES)		\
1494 	__PMC_EV(PPC7450, DATA_BKPT_MATCHES)				\
1495 	__PMC_EV(PPC7450, FALL_THROUGH_BRANCHES_PROCESSED)		\
1496 	__PMC_EV(PPC7450,						\
1497 	    FIRST_SPECULATIVE_BRANCH_BUFFER_RESOLVED_CORRECTLY)		\
1498 	__PMC_EV(PPC7450, SECOND_SPECULATION_BUFFER_ACTIVE)		\
1499 	__PMC_EV(PPC7450, BPU_STALL_ON_LR_DEPENDENCY)			\
1500 	__PMC_EV(PPC7450, BTIC_MISS)					\
1501 	__PMC_EV(PPC7450, BRANCH_LINK_STACK_CORRECTLY_RESOLVED)		\
1502 	__PMC_EV(PPC7450, FPR_ISSUE_STALLED)				\
1503 	__PMC_EV(PPC7450, SWITCHES_BETWEEN_PRIV_USER)			\
1504 	__PMC_EV(PPC7450, LSU_COMPLETES_FP_STORE_SINGLE)		\
1505 	__PMC_EV(PPC7450, VR_ISSUE_QUEUE_DISPATCHES)			\
1506 	__PMC_EV(PPC7450, VR_STALLS)					\
1507 	__PMC_EV(PPC7450, GPR_RENAME_BUFFER_ENTRIES_OVER_THRESHOLD)	\
1508 	__PMC_EV(PPC7450, FPR_ISSUE_QUEUE_ENTRIES)			\
1509 	__PMC_EV(PPC7450, FPU_INSTR_COMPLETED)				\
1510 	__PMC_EV(PPC7450, STWCX_INSTR_COMPLETED)			\
1511 	__PMC_EV(PPC7450, LS_LM_INSTR_PIECES)				\
1512 	__PMC_EV(PPC7450, ITLB_HW_SEARCH_CYCLES_OVER_THRESHOLD)		\
1513 	__PMC_EV(PPC7450, DTLB_MISSES)					\
1514 	__PMC_EV(PPC7450, CANCELLED_L1_INSTR_CACHE_MISSES)		\
1515 	__PMC_EV(PPC7450, L1_DATA_CACHE_OP_HIT)				\
1516 	__PMC_EV(PPC7450, L1_DATA_LOAD_MISS_CYCLES)			\
1517 	__PMC_EV(PPC7450, L1_DATA_PUSHES)				\
1518 	__PMC_EV(PPC7450, L1_DATA_TOTAL_MISS)				\
1519 	__PMC_EV(PPC7450, VT2_FETCHES)					\
1520 	__PMC_EV(PPC7450, TAKEN_BRANCHES_PROCESSED)			\
1521 	__PMC_EV(PPC7450, BRANCH_FLUSHES)				\
1522 	__PMC_EV(PPC7450,						\
1523 	    SECOND_SPECULATIVE_BRANCH_BUFFER_RESOLVED_CORRECTLY)	\
1524 	__PMC_EV(PPC7450, THIRD_SPECULATION_BUFFER_ACTIVE)		\
1525 	__PMC_EV(PPC7450, BRANCH_UNIT_STALL_ON_CTR_DEPENDENCY)		\
1526 	__PMC_EV(PPC7450, FAST_BTIC_HIT)				\
1527 	__PMC_EV(PPC7450, BRANCH_LINK_STACK_MISPREDICTED)		\
1528 	__PMC_EV(PPC7450, CYCLES_THREE_INSTR_COMPLETED)			\
1529 	__PMC_EV(PPC7450, CYCLES_NO_INSTR_DISPATCHED)			\
1530 	__PMC_EV(PPC7450, GPR_ISSUE_QUEUE_ENTRIES_OVER_THRESHOLD)	\
1531 	__PMC_EV(PPC7450, GPR_ISSUE_QUEUE_STALLED)			\
1532 	__PMC_EV(PPC7450, IU1_INSTR_COMPLETED)				\
1533 	__PMC_EV(PPC7450, DSSALL_INSTR_COMPLETED)			\
1534 	__PMC_EV(PPC7450, TLBSYNC_INSTR_COMPLETED)			\
1535 	__PMC_EV(PPC7450, SYNC_INSTR_COMPLETED)				\
1536 	__PMC_EV(PPC7450, SS_SM_INSTR_PIECES)				\
1537 	__PMC_EV(PPC7450, DTLB_HW_SEARCH_CYCLES)			\
1538 	__PMC_EV(PPC7450, SNOOP_RETRIES)				\
1539 	__PMC_EV(PPC7450, SUCCESSFUL_STWCX)				\
1540 	__PMC_EV(PPC7450, DST_STREAM_3_CACHE_LINE_FETCHES)		\
1541 	__PMC_EV(PPC7450,						\
1542 	    THIRD_SPECULATIVE_BRANCH_BUFFER_RESOLVED_CORRECTLY)		\
1543 	__PMC_EV(PPC7450, MISPREDICTED_BRANCHES)			\
1544 	__PMC_EV(PPC7450, FOLDED_BRANCHES)				\
1545 	__PMC_EV(PPC7450, FP_STORE_DOUBLE_COMPLETES_IN_LSU)		\
1546 	__PMC_EV(PPC7450, L2_CACHE_HITS)				\
1547 	__PMC_EV(PPC7450, L3_CACHE_HITS)				\
1548 	__PMC_EV(PPC7450, L2_INSTR_CACHE_MISSES)			\
1549 	__PMC_EV(PPC7450, L3_INSTR_CACHE_MISSES)			\
1550 	__PMC_EV(PPC7450, L2_DATA_CACHE_MISSES)				\
1551 	__PMC_EV(PPC7450, L3_DATA_CACHE_MISSES)				\
1552 	__PMC_EV(PPC7450, L2_LOAD_HITS)					\
1553 	__PMC_EV(PPC7450, L2_STORE_HITS)				\
1554 	__PMC_EV(PPC7450, L3_LOAD_HITS)					\
1555 	__PMC_EV(PPC7450, L3_STORE_HITS)				\
1556 	__PMC_EV(PPC7450, L2_TOUCH_HITS)				\
1557 	__PMC_EV(PPC7450, L3_TOUCH_HITS)				\
1558 	__PMC_EV(PPC7450, SNOOP_MODIFIED)				\
1559 	__PMC_EV(PPC7450, SNOOP_VALID)					\
1560 	__PMC_EV(PPC7450, INTERVENTION)					\
1561 	__PMC_EV(PPC7450, L2_CACHE_MISSES)				\
1562 	__PMC_EV(PPC7450, L3_CACHE_MISSES)				\
1563 	__PMC_EV(PPC7450, L2_CACHE_CASTOUTS)				\
1564 	__PMC_EV(PPC7450, L3_CACHE_CASTOUTS)				\
1565 	__PMC_EV(PPC7450, L2SQ_FULL_CYCLES)				\
1566 	__PMC_EV(PPC7450, L3SQ_FULL_CYCLES)				\
1567 	__PMC_EV(PPC7450, RAQ_FULL_CYCLES)				\
1568 	__PMC_EV(PPC7450, WAQ_FULL_CYCLES)				\
1569 	__PMC_EV(PPC7450, L1_EXTERNAL_INTERVENTIONS)			\
1570 	__PMC_EV(PPC7450, L2_EXTERNAL_INTERVENTIONS)			\
1571 	__PMC_EV(PPC7450, L3_EXTERNAL_INTERVENTIONS)			\
1572 	__PMC_EV(PPC7450, EXTERNAL_INTERVENTIONS)			\
1573 	__PMC_EV(PPC7450, EXTERNAL_PUSHES)				\
1574 	__PMC_EV(PPC7450, EXTERNAL_SNOOP_RETRY)				\
1575 	__PMC_EV(PPC7450, DTQ_FULL_CYCLES)				\
1576 	__PMC_EV(PPC7450, BUS_RETRY)					\
1577 	__PMC_EV(PPC7450, L2_VALID_REQUEST)				\
1578 	__PMC_EV(PPC7450, BORDQ_FULL)					\
1579 	__PMC_EV(PPC7450, BUS_TAS_FOR_READS)				\
1580 	__PMC_EV(PPC7450, BUS_TAS_FOR_WRITES)				\
1581 	__PMC_EV(PPC7450, BUS_READS_NOT_RETRIED)			\
1582 	__PMC_EV(PPC7450, BUS_WRITES_NOT_RETRIED)			\
1583 	__PMC_EV(PPC7450, BUS_READS_WRITES_NOT_RETRIED)			\
1584 	__PMC_EV(PPC7450, BUS_RETRY_DUE_TO_L1_RETRY)			\
1585 	__PMC_EV(PPC7450, BUS_RETRY_DUE_TO_PREVIOUS_ADJACENT)		\
1586 	__PMC_EV(PPC7450, BUS_RETRY_DUE_TO_COLLISION)			\
1587 	__PMC_EV(PPC7450, BUS_RETRY_DUE_TO_INTERVENTION_ORDERING)	\
1588 	__PMC_EV(PPC7450, SNOOP_REQUESTS)				\
1589 	__PMC_EV(PPC7450, PREFETCH_ENGINE_REQUEST)			\
1590 	__PMC_EV(PPC7450, PREFETCH_ENGINE_COLLISION_VS_LOAD)		\
1591 	__PMC_EV(PPC7450, PREFETCH_ENGINE_COLLISION_VS_STORE)		\
1592 	__PMC_EV(PPC7450, PREFETCH_ENGINE_COLLISION_VS_INSTR_FETCH)	\
1593 	__PMC_EV(PPC7450,						\
1594 	    PREFETCH_ENGINE_COLLISION_VS_LOAD_STORE_INSTR_FETCH)	\
1595 	__PMC_EV(PPC7450, PREFETCH_ENGINE_FULL)
1596 
1597 #define PMC_EV_PPC7450_FIRST	PMC_EV_PPC7450_CYCLE
1598 #define PMC_EV_PPC7450_LAST	PMC_EV_PPC7450_PREFETCH_ENGINE_FULL
1599 
1600 #define __PMC_EV_PPC970() \
1601 	__PMC_EV(PPC970, INSTR_COMPLETED) \
1602 	__PMC_EV(PPC970, MARKED_GROUP_DISPATCH) \
1603 	__PMC_EV(PPC970, MARKED_STORE_COMPLETED) \
1604 	__PMC_EV(PPC970, GCT_EMPTY) \
1605 	__PMC_EV(PPC970, RUN_CYCLES) \
1606 	__PMC_EV(PPC970, OVERFLOW) \
1607 	__PMC_EV(PPC970, CYCLES) \
1608 	__PMC_EV(PPC970, THRESHOLD_TIMEOUT) \
1609 	__PMC_EV(PPC970, GROUP_DISPATCH) \
1610 	__PMC_EV(PPC970, BR_MARKED_INSTR_FINISH) \
1611 	__PMC_EV(PPC970, GCT_EMPTY_BY_SRQ_FULL) \
1612 	__PMC_EV(PPC970, STOP_COMPLETION) \
1613 	__PMC_EV(PPC970, LSU_EMPTY) \
1614 	__PMC_EV(PPC970, MARKED_STORE_WITH_INTR) \
1615 	__PMC_EV(PPC970, CYCLES_IN_SUPER) \
1616 	__PMC_EV(PPC970, VPU_MARKED_INSTR_COMPLETED) \
1617 	__PMC_EV(PPC970, FXU0_IDLE_FXU1_BUSY) \
1618 	__PMC_EV(PPC970, SRQ_EMPTY) \
1619 	__PMC_EV(PPC970, MARKED_GROUP_COMPLETED) \
1620 	__PMC_EV(PPC970, CR_MARKED_INSTR_FINISH) \
1621 	__PMC_EV(PPC970, DISPATCH_SUCCESS) \
1622 	__PMC_EV(PPC970, FXU0_IDLE_FXU1_IDLE) \
1623 	__PMC_EV(PPC970, ONE_PLUS_INSTR_COMPLETED) \
1624 	__PMC_EV(PPC970, GROUP_MARKED_IDU) \
1625 	__PMC_EV(PPC970, MARKED_GROUP_COMPLETE_TIMEOUT) \
1626 	__PMC_EV(PPC970, FXU0_BUSY_FXU1_BUSY) \
1627 	__PMC_EV(PPC970, MARKED_STORE_SENT_TO_STS) \
1628 	__PMC_EV(PPC970, FXU_MARKED_INSTR_FINISHED) \
1629 	__PMC_EV(PPC970, MARKED_GROUP_ISSUED) \
1630 	__PMC_EV(PPC970, FXU0_BUSY_FXU1_IDLE) \
1631 	__PMC_EV(PPC970, GROUP_COMPLETED) \
1632 	__PMC_EV(PPC970, FPU_MARKED_INSTR_COMPLETED) \
1633 	__PMC_EV(PPC970, MARKED_INSTR_FINISH_ANY_UNIT) \
1634 	__PMC_EV(PPC970, EXTERNAL_INTERRUPT) \
1635 	__PMC_EV(PPC970, GROUP_DISPATCH_REJECT) \
1636 	__PMC_EV(PPC970, LSU_MARKED_INSTR_FINISH) \
1637 	__PMC_EV(PPC970, TIMEBASE_EVENT) \
1638 	__PMC_EV(PPC970, LSU_COMPLETION_STALL) \
1639 	__PMC_EV(PPC970, FXU_COMPLETION_STALL) \
1640 	__PMC_EV(PPC970, DCACHE_MISS_COMPLETION_STALL) \
1641 	__PMC_EV(PPC970, FPU_COMPLETION_STALL) \
1642 	__PMC_EV(PPC970, FXU_LONG_INSTR_COMPLETION_STALL) \
1643 	__PMC_EV(PPC970, REJECT_COMPLETION_STALL) \
1644 	__PMC_EV(PPC970, FPU_LONG_INSTR_COMPLETION_STALL) \
1645 	__PMC_EV(PPC970, GCT_EMPTY_BY_ICACHE_MISS) \
1646 	__PMC_EV(PPC970, REJECT_COMPLETION_STALL_ERAT_MISS) \
1647 	__PMC_EV(PPC970, GCT_EMPTY_BY_BRANCH_MISS_PREDICT) \
1648 	__PMC_EV(PPC970, BUS_HIGH) \
1649 	__PMC_EV(PPC970, BUS_LOW) \
1650 	__PMC_EV(PPC970, ADDER)
1651 
1652 
1653 #define PMC_EV_PPC970_FIRST		PMC_EV_PPC970_INSTR_COMPLETED
1654 #define PMC_EV_PPC970_LAST		PMC_EV_PPC970_ADDER
1655 
1656 #define __PMC_EV_E500() \
1657 	__PMC_EV(E500, CYCLES) \
1658 	__PMC_EV(E500, INSTR_COMPLETED) \
1659 	__PMC_EV(E500, UOPS_COMPLETED) \
1660 	__PMC_EV(E500, INSTR_FETCHED) \
1661 	__PMC_EV(E500, UOPS_DECODED) \
1662 	__PMC_EV(E500, PM_EVENT_TRANSITIONS) \
1663 	__PMC_EV(E500, PM_EVENT_CYCLES) \
1664 	__PMC_EV(E500, BRANCH_INSTRS_COMPLETED) \
1665 	__PMC_EV(E500, LOAD_UOPS_COMPLETED) \
1666 	__PMC_EV(E500, STORE_UOPS_COMPLETED) \
1667 	__PMC_EV(E500, CQ_REDIRECTS) \
1668 	__PMC_EV(E500, BRANCHES_FINISHED) \
1669 	__PMC_EV(E500, TAKEN_BRANCHES_FINISHED) \
1670 	__PMC_EV(E500, FINISHED_UNCOND_BRANCHES_MISS_BTB) \
1671 	__PMC_EV(E500, BRANCH_MISPRED) \
1672 	__PMC_EV(E500, BTB_BRANCH_MISPRED_FROM_DIRECTION) \
1673 	__PMC_EV(E500, BTB_HITS_PSEUDO_HITS) \
1674 	__PMC_EV(E500, CYCLES_DECODE_STALLED) \
1675 	__PMC_EV(E500, CYCLES_ISSUE_STALLED) \
1676 	__PMC_EV(E500, CYCLES_BRANCH_ISSUE_STALLED) \
1677 	__PMC_EV(E500, CYCLES_SU1_SCHED_STALLED) \
1678 	__PMC_EV(E500, CYCLES_SU2_SCHED_STALLED) \
1679 	__PMC_EV(E500, CYCLES_MU_SCHED_STALLED) \
1680 	__PMC_EV(E500, CYCLES_LRU_SCHED_STALLED) \
1681 	__PMC_EV(E500, CYCLES_BU_SCHED_STALLED) \
1682 	__PMC_EV(E500, TOTAL_TRANSLATED) \
1683 	__PMC_EV(E500, LOADS_TRANSLATED) \
1684 	__PMC_EV(E500, STORES_TRANSLATED) \
1685 	__PMC_EV(E500, TOUCHES_TRANSLATED) \
1686 	__PMC_EV(E500, CACHEOPS_TRANSLATED) \
1687 	__PMC_EV(E500, CACHE_INHIBITED_ACCESS_TRANSLATED) \
1688 	__PMC_EV(E500, GUARDED_LOADS_TRANSLATED) \
1689 	__PMC_EV(E500, WRITE_THROUGH_STORES_TRANSLATED) \
1690 	__PMC_EV(E500, MISALIGNED_LOAD_STORE_ACCESS_TRANSLATED) \
1691 	__PMC_EV(E500, TOTAL_ALLOCATED_TO_DLFB) \
1692 	__PMC_EV(E500, LOADS_TRANSLATED_ALLOCATED_TO_DLFB) \
1693 	__PMC_EV(E500, STORES_COMPLETED_ALLOCATED_TO_DLFB) \
1694 	__PMC_EV(E500, TOUCHES_TRANSLATED_ALLOCATED_TO_DLFB) \
1695 	__PMC_EV(E500, STORES_COMPLETED) \
1696 	__PMC_EV(E500, DATA_L1_CACHE_LOCKS) \
1697 	__PMC_EV(E500, DATA_L1_CACHE_RELOADS) \
1698 	__PMC_EV(E500, DATA_L1_CACHE_CASTOUTS) \
1699 	__PMC_EV(E500, LOAD_MISS_DLFB_FULL) \
1700 	__PMC_EV(E500, LOAD_MISS_LDQ_FULL) \
1701 	__PMC_EV(E500, LOAD_GUARDED_MISS) \
1702 	__PMC_EV(E500, STORE_TRANSLATE_WHEN_QUEUE_FULL) \
1703 	__PMC_EV(E500, ADDRESS_COLLISION) \
1704 	__PMC_EV(E500, DATA_MMU_MISS) \
1705 	__PMC_EV(E500, DATA_MMU_BUSY) \
1706 	__PMC_EV(E500, PART2_MISALIGNED_CACHE_ACCESS) \
1707 	__PMC_EV(E500, LOAD_MISS_DLFB_FULL_CYCLES) \
1708 	__PMC_EV(E500, LOAD_MISS_LDQ_FULL_CYCLES) \
1709 	__PMC_EV(E500, LOAD_GUARDED_MISS_CYCLES) \
1710 	__PMC_EV(E500, STORE_TRANSLATE_WHEN_QUEUE_FULL_CYCLES) \
1711 	__PMC_EV(E500, ADDRESS_COLLISION_CYCLES) \
1712 	__PMC_EV(E500, DATA_MMU_MISS_CYCLES) \
1713 	__PMC_EV(E500, DATA_MMU_BUSY_CYCLES) \
1714 	__PMC_EV(E500, PART2_MISALIGNED_CACHE_ACCESS_CYCLES) \
1715 	__PMC_EV(E500, INSTR_L1_CACHE_LOCKS) \
1716 	__PMC_EV(E500, INSTR_L1_CACHE_RELOADS) \
1717 	__PMC_EV(E500, INSTR_L1_CACHE_FETCHES) \
1718 	__PMC_EV(E500, INSTR_MMU_TLB4K_RELOADS) \
1719 	__PMC_EV(E500, INSTR_MMU_VSP_RELOADS) \
1720 	__PMC_EV(E500, DATA_MMU_TLB4K_RELOADS) \
1721 	__PMC_EV(E500, DATA_MMU_VSP_RELOADS) \
1722 	__PMC_EV(E500, L2MMU_MISSES) \
1723 	__PMC_EV(E500, BIU_MASTER_REQUESTS) \
1724 	__PMC_EV(E500, BIU_MASTER_INSTR_SIDE_REQUESTS) \
1725 	__PMC_EV(E500, BIU_MASTER_DATA_SIDE_REQUESTS) \
1726 	__PMC_EV(E500, BIU_MASTER_DATA_SIDE_CASTOUT_REQUESTS) \
1727 	__PMC_EV(E500, BIU_MASTER_RETRIES) \
1728 	__PMC_EV(E500, SNOOP_REQUESTS) \
1729 	__PMC_EV(E500, SNOOP_HITS) \
1730 	__PMC_EV(E500, SNOOP_PUSHES) \
1731 	__PMC_EV(E500, SNOOP_RETRIES) \
1732 	__PMC_EV(E500, DLFB_LOAD_MISS_CYCLES) \
1733 	__PMC_EV(E500, ILFB_FETCH_MISS_CYCLES) \
1734 	__PMC_EV(E500, EXT_INPU_INTR_LATENCY_CYCLES) \
1735 	__PMC_EV(E500, CRIT_INPUT_INTR_LATENCY_CYCLES) \
1736 	__PMC_EV(E500, EXT_INPUT_INTR_PENDING_LATENCY_CYCLES) \
1737 	__PMC_EV(E500, CRIT_INPUT_INTR_PENDING_LATENCY_CYCLES) \
1738 	__PMC_EV(E500, PMC0_OVERFLOW) \
1739 	__PMC_EV(E500, PMC1_OVERFLOW) \
1740 	__PMC_EV(E500, PMC2_OVERFLOW) \
1741 	__PMC_EV(E500, PMC3_OVERFLOW) \
1742 	__PMC_EV(E500, INTERRUPTS_TAKEN) \
1743 	__PMC_EV(E500, EXT_INPUT_INTR_TAKEN) \
1744 	__PMC_EV(E500, CRIT_INPUT_INTR_TAKEN) \
1745 	__PMC_EV(E500, SYSCALL_TRAP_INTR) \
1746 	__PMC_EV(E500, TLB_BIT_TRANSITIONS) \
1747 	__PMC_EV(E500, L2_LINEFILL_BUFFER) \
1748 	__PMC_EV(E500, LV2_VS) \
1749 	__PMC_EV(E500, CASTOUTS_RELEASED) \
1750 	__PMC_EV(E500, INTV_ALLOCATIONS) \
1751 	__PMC_EV(E500, DLFB_RETRIES_TO_MBAR) \
1752 	__PMC_EV(E500, STORE_RETRIES) \
1753 	__PMC_EV(E500, STASH_L1_HITS) \
1754 	__PMC_EV(E500, STASH_L2_HITS) \
1755 	__PMC_EV(E500, STASH_BUSY_1) \
1756 	__PMC_EV(E500, STASH_BUSY_2) \
1757 	__PMC_EV(E500, STASH_BUSY_3) \
1758 	__PMC_EV(E500, STASH_HITS) \
1759 	__PMC_EV(E500, STASH_HIT_DLFB) \
1760 	__PMC_EV(E500, STASH_REQUESTS) \
1761 	__PMC_EV(E500, STASH_REQUESTS_L1) \
1762 	__PMC_EV(E500, STASH_REQUESTS_L2) \
1763 	__PMC_EV(E500, STALLS_NO_CAQ_OR_COB) \
1764 	__PMC_EV(E500, L2_CACHE_ACCESSES) \
1765 	__PMC_EV(E500, L2_HIT_CACHE_ACCESSES) \
1766 	__PMC_EV(E500, L2_CACHE_DATA_ACCESSES) \
1767 	__PMC_EV(E500, L2_CACHE_DATA_HITS) \
1768 	__PMC_EV(E500, L2_CACHE_INSTR_ACCESSES) \
1769 	__PMC_EV(E500, L2_CACHE_INSTR_HITS) \
1770 	__PMC_EV(E500, L2_CACHE_ALLOCATIONS) \
1771 	__PMC_EV(E500, L2_CACHE_DATA_ALLOCATIONS) \
1772 	__PMC_EV(E500, L2_CACHE_DIRTY_DATA_ALLOCATIONS) \
1773 	__PMC_EV(E500, L2_CACHE_INSTR_ALLOCATIONS) \
1774 	__PMC_EV(E500, L2_CACHE_UPDATES) \
1775 	__PMC_EV(E500, L2_CACHE_CLEAN_UPDATES) \
1776 	__PMC_EV(E500, L2_CACHE_DIRTY_UPDATES) \
1777 	__PMC_EV(E500, L2_CACHE_CLEAN_REDUNDANT_UPDATES) \
1778 	__PMC_EV(E500, L2_CACHE_DIRTY_REDUNDANT_UPDATES) \
1779 	__PMC_EV(E500, L2_CACHE_LOCKS) \
1780 	__PMC_EV(E500, L2_CACHE_CASTOUTS) \
1781 	__PMC_EV(E500, L2_CACHE_DATA_DIRTY_HITS) \
1782 	__PMC_EV(E500, INSTR_LFB_WENT_HIGH_PRIORITY) \
1783 	__PMC_EV(E500, SNOOP_THROTTLING_TURNED_ON) \
1784 	__PMC_EV(E500, L2_CLEAN_LINE_INVALIDATIONS) \
1785 	__PMC_EV(E500, L2_INCOHERENT_LINE_INVALIDATIONS) \
1786 	__PMC_EV(E500, L2_COHERENT_LINE_INVALIDATIONS) \
1787 	__PMC_EV(E500, COHERENT_LOOKUP_MISS_DUE_TO_VALID_BUT_INCOHERENT_MATCHES) \
1788 	__PMC_EV(E500, IAC1S_DETECTED) \
1789 	__PMC_EV(E500, IAC2S_DETECTED) \
1790 	__PMC_EV(E500, DAC1S_DTECTED) \
1791 	__PMC_EV(E500, DAC2S_DTECTED) \
1792 	__PMC_EV(E500, DVT0_DETECTED) \
1793 	__PMC_EV(E500, DVT1_DETECTED) \
1794 	__PMC_EV(E500, DVT2_DETECTED) \
1795 	__PMC_EV(E500, DVT3_DETECTED) \
1796 	__PMC_EV(E500, DVT4_DETECTED) \
1797 	__PMC_EV(E500, DVT5_DETECTED) \
1798 	__PMC_EV(E500, DVT6_DETECTED) \
1799 	__PMC_EV(E500, DVT7_DETECTED) \
1800 	__PMC_EV(E500, CYCLES_COMPLETION_STALLED_NEXUS_FIFO_FULL) \
1801 	__PMC_EV(E500, FPU_DOUBLE_PUMP) \
1802 	__PMC_EV(E500, FPU_FINISH) \
1803 	__PMC_EV(E500, FPU_DIVIDE_CYCLES) \
1804 	__PMC_EV(E500, FPU_DENORM_INPUT_CYCLES) \
1805 	__PMC_EV(E500, FPU_RESULT_STALL_CYCLES) \
1806 	__PMC_EV(E500, FPU_FPSCR_FULL_STALL) \
1807 	__PMC_EV(E500, FPU_PIPE_SYNC_STALLS) \
1808 	__PMC_EV(E500, FPU_INPUT_DATA_STALLS) \
1809 	__PMC_EV(E500, DECORATED_LOADS) \
1810 	__PMC_EV(E500, DECORATED_STORES) \
1811 	__PMC_EV(E500, LOAD_RETRIES) \
1812 	__PMC_EV(E500, STWCX_SUCCESSES) \
1813 	__PMC_EV(E500, STWCX_FAILURES) \
1814 
1815 #define PMC_EV_E500_FIRST		PMC_EV_E500_CYCLES
1816 #define PMC_EV_E500_LAST		PMC_EV_E500_STWCX_FAILURES
1817 /*
1818  * All known PMC events.
1819  *
1820  * PMC event numbers are allocated sparsely to allow new PMC events to
1821  * be added to a PMC class without breaking ABI compatibility.  The
1822  * current allocation scheme is:
1823  *
1824  * START	#EVENTS		DESCRIPTION
1825  * 0		0x1000		Reserved
1826  * 0x1000	0x0001		TSC
1827  * 0x2000	0x0080		AMD K7 events
1828  * 0x2080	0x0100		AMD K8 events
1829  * 0x10000	0x0080		INTEL architectural fixed-function events
1830  * 0x10080	0x0F80		INTEL architectural programmable events
1831  * 0x11000	0x0080		INTEL Pentium 4 events
1832  * 0x11080	0x0080		INTEL Pentium MMX events
1833  * 0x11100	0x0100		INTEL Pentium Pro/P-II/P-III/Pentium-M events
1834  * 0x11200	0x00FF		INTEL XScale events
1835  * 0x11300	0x00FF		MIPS 24K events
1836  * 0x11400	0x00FF		Octeon events
1837  * 0x11500	0x00FF		MIPS 74K events
1838  * 0x11600	0x00FF		BERI statcounters
1839  * 0x13000	0x00FF		MPC7450 events
1840  * 0x13100	0x00FF		IBM PPC970 events
1841  * 0x13300	0x00FF		Freescale e500 events
1842  * 0x14000	0x0100		ARMv7 events
1843  * 0x14100	0x0100		ARMv8 events
1844  * 0x20000	0x1000		Software events
1845  */
1846 #define	__PMC_EVENTS()				\
1847 	__PMC_EV_BLOCK(TSC,	0x01000)	\
1848 	__PMC_EV_TSC()				\
1849 	__PMC_EV_BLOCK(IAF,     0x10000)	\
1850 	__PMC_EV_IAF()				\
1851 	__PMC_EV_BLOCK(K7,	0x2000)		\
1852 	__PMC_EV_K7()				\
1853 	__PMC_EV_BLOCK(K8,	0x2080)	        \
1854 	__PMC_EV_K8()				\
1855 	__PMC_EV_BLOCK(XSCALE,	0x11200)	\
1856 	__PMC_EV_XSCALE()                       \
1857 	__PMC_EV_BLOCK(MIPS24K,	0x11300)	\
1858 	__PMC_EV_MIPS24K()			\
1859 	__PMC_EV_BLOCK(OCTEON,	0x11400)	\
1860 	__PMC_EV_OCTEON()			\
1861 	__PMC_EV_BLOCK(MIPS74K,	0x11500)        \
1862 	__PMC_EV_MIPS74K()			\
1863 	__PMC_EV_BLOCK(BERI,	0x11600)        \
1864 	__PMC_EV_BERI()				\
1865 	__PMC_EV_BLOCK(UCP,     0x12080)        \
1866 	__PMC_EV_UCP()				\
1867 	__PMC_EV_BLOCK(PPC7450,	0x13000)	\
1868 	__PMC_EV_PPC7450()			\
1869 	__PMC_EV_BLOCK(PPC970,	0x13100)	\
1870 	__PMC_EV_PPC970()			\
1871 	__PMC_EV_BLOCK(E500,	0x13300)	\
1872 	__PMC_EV_E500()				\
1873 	__PMC_EV_BLOCK(ARMV7,	0x14000)	\
1874 	__PMC_EV_ARMV7()			\
1875 	__PMC_EV_BLOCK(ARMV8,	0x14100)	\
1876 	__PMC_EV_ARMV8()
1877 
1878 #define	PMC_EVENT_FIRST	PMC_EV_TSC_TSC
1879 #define	PMC_EVENT_LAST	PMC_EV_SOFT_LAST
1880 
1881 #endif /* _DEV_HWPMC_PMC_EVENTS_H_ */
1882