xref: /linux/arch/s390/kernel/perf_cpum_cf_events.c (revision 820bace734722715c643dcb5f74b502cb912d4eb)
1b2441318SGreg Kroah-Hartman // SPDX-License-Identifier: GPL-2.0
2c7168325SHendrik Brueckner /*
3c7168325SHendrik Brueckner  * Perf PMU sysfs events attributes for available CPU-measurement counters
4c7168325SHendrik Brueckner  *
5c7168325SHendrik Brueckner  */
6c7168325SHendrik Brueckner 
7c7168325SHendrik Brueckner #include <linux/slab.h>
8c7168325SHendrik Brueckner #include <linux/perf_event.h>
930e145f8SHendrik Brueckner #include <asm/cpu_mf.h>
10c7168325SHendrik Brueckner 
11c7168325SHendrik Brueckner 
12c7168325SHendrik Brueckner /* BEGIN: CPUM_CF COUNTER DEFINITIONS =================================== */
13c7168325SHendrik Brueckner 
143593eb94SHendrik Brueckner CPUMF_EVENT_ATTR(cf_fvn1, CPU_CYCLES, 0x0000);
153593eb94SHendrik Brueckner CPUMF_EVENT_ATTR(cf_fvn1, INSTRUCTIONS, 0x0001);
163593eb94SHendrik Brueckner CPUMF_EVENT_ATTR(cf_fvn1, L1I_DIR_WRITES, 0x0002);
173593eb94SHendrik Brueckner CPUMF_EVENT_ATTR(cf_fvn1, L1I_PENALTY_CYCLES, 0x0003);
183593eb94SHendrik Brueckner CPUMF_EVENT_ATTR(cf_fvn1, PROBLEM_STATE_CPU_CYCLES, 0x0020);
193593eb94SHendrik Brueckner CPUMF_EVENT_ATTR(cf_fvn1, PROBLEM_STATE_INSTRUCTIONS, 0x0021);
203593eb94SHendrik Brueckner CPUMF_EVENT_ATTR(cf_fvn1, PROBLEM_STATE_L1I_DIR_WRITES, 0x0022);
213593eb94SHendrik Brueckner CPUMF_EVENT_ATTR(cf_fvn1, PROBLEM_STATE_L1I_PENALTY_CYCLES, 0x0023);
223593eb94SHendrik Brueckner CPUMF_EVENT_ATTR(cf_fvn1, PROBLEM_STATE_L1D_DIR_WRITES, 0x0024);
233593eb94SHendrik Brueckner CPUMF_EVENT_ATTR(cf_fvn1, PROBLEM_STATE_L1D_PENALTY_CYCLES, 0x0025);
243593eb94SHendrik Brueckner CPUMF_EVENT_ATTR(cf_fvn1, L1D_DIR_WRITES, 0x0004);
253593eb94SHendrik Brueckner CPUMF_EVENT_ATTR(cf_fvn1, L1D_PENALTY_CYCLES, 0x0005);
263593eb94SHendrik Brueckner CPUMF_EVENT_ATTR(cf_fvn3, CPU_CYCLES, 0x0000);
273593eb94SHendrik Brueckner CPUMF_EVENT_ATTR(cf_fvn3, INSTRUCTIONS, 0x0001);
283593eb94SHendrik Brueckner CPUMF_EVENT_ATTR(cf_fvn3, L1I_DIR_WRITES, 0x0002);
293593eb94SHendrik Brueckner CPUMF_EVENT_ATTR(cf_fvn3, L1I_PENALTY_CYCLES, 0x0003);
303593eb94SHendrik Brueckner CPUMF_EVENT_ATTR(cf_fvn3, PROBLEM_STATE_CPU_CYCLES, 0x0020);
313593eb94SHendrik Brueckner CPUMF_EVENT_ATTR(cf_fvn3, PROBLEM_STATE_INSTRUCTIONS, 0x0021);
323593eb94SHendrik Brueckner CPUMF_EVENT_ATTR(cf_fvn3, L1D_DIR_WRITES, 0x0004);
333593eb94SHendrik Brueckner CPUMF_EVENT_ATTR(cf_fvn3, L1D_PENALTY_CYCLES, 0x0005);
3446a984ffSThomas Richter CPUMF_EVENT_ATTR(cf_svn_12345, PRNG_FUNCTIONS, 0x0040);
3546a984ffSThomas Richter CPUMF_EVENT_ATTR(cf_svn_12345, PRNG_CYCLES, 0x0041);
3646a984ffSThomas Richter CPUMF_EVENT_ATTR(cf_svn_12345, PRNG_BLOCKED_FUNCTIONS, 0x0042);
3746a984ffSThomas Richter CPUMF_EVENT_ATTR(cf_svn_12345, PRNG_BLOCKED_CYCLES, 0x0043);
3846a984ffSThomas Richter CPUMF_EVENT_ATTR(cf_svn_12345, SHA_FUNCTIONS, 0x0044);
3946a984ffSThomas Richter CPUMF_EVENT_ATTR(cf_svn_12345, SHA_CYCLES, 0x0045);
4046a984ffSThomas Richter CPUMF_EVENT_ATTR(cf_svn_12345, SHA_BLOCKED_FUNCTIONS, 0x0046);
4146a984ffSThomas Richter CPUMF_EVENT_ATTR(cf_svn_12345, SHA_BLOCKED_CYCLES, 0x0047);
4246a984ffSThomas Richter CPUMF_EVENT_ATTR(cf_svn_12345, DEA_FUNCTIONS, 0x0048);
4346a984ffSThomas Richter CPUMF_EVENT_ATTR(cf_svn_12345, DEA_CYCLES, 0x0049);
4446a984ffSThomas Richter CPUMF_EVENT_ATTR(cf_svn_12345, DEA_BLOCKED_FUNCTIONS, 0x004a);
4546a984ffSThomas Richter CPUMF_EVENT_ATTR(cf_svn_12345, DEA_BLOCKED_CYCLES, 0x004b);
4646a984ffSThomas Richter CPUMF_EVENT_ATTR(cf_svn_12345, AES_FUNCTIONS, 0x004c);
4746a984ffSThomas Richter CPUMF_EVENT_ATTR(cf_svn_12345, AES_CYCLES, 0x004d);
4846a984ffSThomas Richter CPUMF_EVENT_ATTR(cf_svn_12345, AES_BLOCKED_FUNCTIONS, 0x004e);
4946a984ffSThomas Richter CPUMF_EVENT_ATTR(cf_svn_12345, AES_BLOCKED_CYCLES, 0x004f);
5046a984ffSThomas Richter CPUMF_EVENT_ATTR(cf_svn_6, ECC_FUNCTION_COUNT, 0x0050);
5146a984ffSThomas Richter CPUMF_EVENT_ATTR(cf_svn_6, ECC_CYCLES_COUNT, 0x0051);
5246a984ffSThomas Richter CPUMF_EVENT_ATTR(cf_svn_6, ECC_BLOCKED_FUNCTION_COUNT, 0x0052);
5346a984ffSThomas Richter CPUMF_EVENT_ATTR(cf_svn_6, ECC_BLOCKED_CYCLES_COUNT, 0x0053);
54c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z10, L1I_L2_SOURCED_WRITES, 0x0080);
55c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z10, L1D_L2_SOURCED_WRITES, 0x0081);
56c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z10, L1I_L3_LOCAL_WRITES, 0x0082);
57c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z10, L1D_L3_LOCAL_WRITES, 0x0083);
58c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z10, L1I_L3_REMOTE_WRITES, 0x0084);
59c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z10, L1D_L3_REMOTE_WRITES, 0x0085);
60c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z10, L1D_LMEM_SOURCED_WRITES, 0x0086);
61c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z10, L1I_LMEM_SOURCED_WRITES, 0x0087);
62c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z10, L1D_RO_EXCL_WRITES, 0x0088);
63c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z10, L1I_CACHELINE_INVALIDATES, 0x0089);
64c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z10, ITLB1_WRITES, 0x008a);
65c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z10, DTLB1_WRITES, 0x008b);
66c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z10, TLB2_PTE_WRITES, 0x008c);
67c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z10, TLB2_CRSTE_WRITES, 0x008d);
68c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z10, TLB2_CRSTE_HPAGE_WRITES, 0x008e);
69c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z10, ITLB1_MISSES, 0x0091);
70c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z10, DTLB1_MISSES, 0x0092);
71c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z10, L2C_STORES_SENT, 0x0093);
72c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z196, L1D_L2_SOURCED_WRITES, 0x0080);
73c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z196, L1I_L2_SOURCED_WRITES, 0x0081);
74c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z196, DTLB1_MISSES, 0x0082);
75c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z196, ITLB1_MISSES, 0x0083);
76c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z196, L2C_STORES_SENT, 0x0085);
77c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z196, L1D_OFFBOOK_L3_SOURCED_WRITES, 0x0086);
78c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z196, L1D_ONBOOK_L4_SOURCED_WRITES, 0x0087);
79c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z196, L1I_ONBOOK_L4_SOURCED_WRITES, 0x0088);
80c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z196, L1D_RO_EXCL_WRITES, 0x0089);
81c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z196, L1D_OFFBOOK_L4_SOURCED_WRITES, 0x008a);
82c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z196, L1I_OFFBOOK_L4_SOURCED_WRITES, 0x008b);
83c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z196, DTLB1_HPAGE_WRITES, 0x008c);
84c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z196, L1D_LMEM_SOURCED_WRITES, 0x008d);
85c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z196, L1I_LMEM_SOURCED_WRITES, 0x008e);
86c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z196, L1I_OFFBOOK_L3_SOURCED_WRITES, 0x008f);
87c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z196, DTLB1_WRITES, 0x0090);
88c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z196, ITLB1_WRITES, 0x0091);
89c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z196, TLB2_PTE_WRITES, 0x0092);
90c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z196, TLB2_CRSTE_HPAGE_WRITES, 0x0093);
91c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z196, TLB2_CRSTE_WRITES, 0x0094);
92c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z196, L1D_ONCHIP_L3_SOURCED_WRITES, 0x0096);
93c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z196, L1D_OFFCHIP_L3_SOURCED_WRITES, 0x0098);
94c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z196, L1I_ONCHIP_L3_SOURCED_WRITES, 0x0099);
95c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z196, L1I_OFFCHIP_L3_SOURCED_WRITES, 0x009b);
96c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_zec12, DTLB1_MISSES, 0x0080);
97c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_zec12, ITLB1_MISSES, 0x0081);
98c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_zec12, L1D_L2I_SOURCED_WRITES, 0x0082);
99c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_zec12, L1I_L2I_SOURCED_WRITES, 0x0083);
100c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_zec12, L1D_L2D_SOURCED_WRITES, 0x0084);
101c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_zec12, DTLB1_WRITES, 0x0085);
102c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_zec12, L1D_LMEM_SOURCED_WRITES, 0x0087);
103c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_zec12, L1I_LMEM_SOURCED_WRITES, 0x0089);
104c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_zec12, L1D_RO_EXCL_WRITES, 0x008a);
105c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_zec12, DTLB1_HPAGE_WRITES, 0x008b);
106c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_zec12, ITLB1_WRITES, 0x008c);
107c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_zec12, TLB2_PTE_WRITES, 0x008d);
108c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_zec12, TLB2_CRSTE_HPAGE_WRITES, 0x008e);
109c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_zec12, TLB2_CRSTE_WRITES, 0x008f);
110c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_zec12, L1D_ONCHIP_L3_SOURCED_WRITES, 0x0090);
111c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_zec12, L1D_OFFCHIP_L3_SOURCED_WRITES, 0x0091);
112c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_zec12, L1D_OFFBOOK_L3_SOURCED_WRITES, 0x0092);
113c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_zec12, L1D_ONBOOK_L4_SOURCED_WRITES, 0x0093);
114c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_zec12, L1D_OFFBOOK_L4_SOURCED_WRITES, 0x0094);
115c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_zec12, TX_NC_TEND, 0x0095);
116c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_zec12, L1D_ONCHIP_L3_SOURCED_WRITES_IV, 0x0096);
117c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_zec12, L1D_OFFCHIP_L3_SOURCED_WRITES_IV, 0x0097);
118c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_zec12, L1D_OFFBOOK_L3_SOURCED_WRITES_IV, 0x0098);
119c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_zec12, L1I_ONCHIP_L3_SOURCED_WRITES, 0x0099);
120c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_zec12, L1I_OFFCHIP_L3_SOURCED_WRITES, 0x009a);
121c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_zec12, L1I_OFFBOOK_L3_SOURCED_WRITES, 0x009b);
122c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_zec12, L1I_ONBOOK_L4_SOURCED_WRITES, 0x009c);
123c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_zec12, L1I_OFFBOOK_L4_SOURCED_WRITES, 0x009d);
124c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_zec12, TX_C_TEND, 0x009e);
125c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_zec12, L1I_ONCHIP_L3_SOURCED_WRITES_IV, 0x009f);
126c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_zec12, L1I_OFFCHIP_L3_SOURCED_WRITES_IV, 0x00a0);
127c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_zec12, L1I_OFFBOOK_L3_SOURCED_WRITES_IV, 0x00a1);
128c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_zec12, TX_NC_TABORT, 0x00b1);
129c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_zec12, TX_C_TABORT_NO_SPECIAL, 0x00b2);
130c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_zec12, TX_C_TABORT_SPECIAL, 0x00b3);
1315f3ba878SAndré Wild CPUMF_EVENT_ATTR(cf_z13, L1D_RO_EXCL_WRITES, 0x0080);
1323fc7acebSHendrik Brueckner CPUMF_EVENT_ATTR(cf_z13, DTLB1_WRITES, 0x0081);
1333fc7acebSHendrik Brueckner CPUMF_EVENT_ATTR(cf_z13, DTLB1_MISSES, 0x0082);
1343fc7acebSHendrik Brueckner CPUMF_EVENT_ATTR(cf_z13, DTLB1_HPAGE_WRITES, 0x0083);
1353fc7acebSHendrik Brueckner CPUMF_EVENT_ATTR(cf_z13, DTLB1_GPAGE_WRITES, 0x0084);
1363fc7acebSHendrik Brueckner CPUMF_EVENT_ATTR(cf_z13, L1D_L2D_SOURCED_WRITES, 0x0085);
1373fc7acebSHendrik Brueckner CPUMF_EVENT_ATTR(cf_z13, ITLB1_WRITES, 0x0086);
1383fc7acebSHendrik Brueckner CPUMF_EVENT_ATTR(cf_z13, ITLB1_MISSES, 0x0087);
1393fc7acebSHendrik Brueckner CPUMF_EVENT_ATTR(cf_z13, L1I_L2I_SOURCED_WRITES, 0x0088);
1403fc7acebSHendrik Brueckner CPUMF_EVENT_ATTR(cf_z13, TLB2_PTE_WRITES, 0x0089);
1413fc7acebSHendrik Brueckner CPUMF_EVENT_ATTR(cf_z13, TLB2_CRSTE_HPAGE_WRITES, 0x008a);
1423fc7acebSHendrik Brueckner CPUMF_EVENT_ATTR(cf_z13, TLB2_CRSTE_WRITES, 0x008b);
1433fc7acebSHendrik Brueckner CPUMF_EVENT_ATTR(cf_z13, TX_C_TEND, 0x008c);
1443fc7acebSHendrik Brueckner CPUMF_EVENT_ATTR(cf_z13, TX_NC_TEND, 0x008d);
1453fc7acebSHendrik Brueckner CPUMF_EVENT_ATTR(cf_z13, L1C_TLB1_MISSES, 0x008f);
1463fc7acebSHendrik Brueckner CPUMF_EVENT_ATTR(cf_z13, L1D_ONCHIP_L3_SOURCED_WRITES, 0x0090);
1473fc7acebSHendrik Brueckner CPUMF_EVENT_ATTR(cf_z13, L1D_ONCHIP_L3_SOURCED_WRITES_IV, 0x0091);
1483fc7acebSHendrik Brueckner CPUMF_EVENT_ATTR(cf_z13, L1D_ONNODE_L4_SOURCED_WRITES, 0x0092);
1493fc7acebSHendrik Brueckner CPUMF_EVENT_ATTR(cf_z13, L1D_ONNODE_L3_SOURCED_WRITES_IV, 0x0093);
1503fc7acebSHendrik Brueckner CPUMF_EVENT_ATTR(cf_z13, L1D_ONNODE_L3_SOURCED_WRITES, 0x0094);
1513fc7acebSHendrik Brueckner CPUMF_EVENT_ATTR(cf_z13, L1D_ONDRAWER_L4_SOURCED_WRITES, 0x0095);
1523fc7acebSHendrik Brueckner CPUMF_EVENT_ATTR(cf_z13, L1D_ONDRAWER_L3_SOURCED_WRITES_IV, 0x0096);
1533fc7acebSHendrik Brueckner CPUMF_EVENT_ATTR(cf_z13, L1D_ONDRAWER_L3_SOURCED_WRITES, 0x0097);
1543fc7acebSHendrik Brueckner CPUMF_EVENT_ATTR(cf_z13, L1D_OFFDRAWER_SCOL_L4_SOURCED_WRITES, 0x0098);
1553fc7acebSHendrik Brueckner CPUMF_EVENT_ATTR(cf_z13, L1D_OFFDRAWER_SCOL_L3_SOURCED_WRITES_IV, 0x0099);
1563fc7acebSHendrik Brueckner CPUMF_EVENT_ATTR(cf_z13, L1D_OFFDRAWER_SCOL_L3_SOURCED_WRITES, 0x009a);
1573fc7acebSHendrik Brueckner CPUMF_EVENT_ATTR(cf_z13, L1D_OFFDRAWER_FCOL_L4_SOURCED_WRITES, 0x009b);
1583fc7acebSHendrik Brueckner CPUMF_EVENT_ATTR(cf_z13, L1D_OFFDRAWER_FCOL_L3_SOURCED_WRITES_IV, 0x009c);
1593fc7acebSHendrik Brueckner CPUMF_EVENT_ATTR(cf_z13, L1D_OFFDRAWER_FCOL_L3_SOURCED_WRITES, 0x009d);
1603fc7acebSHendrik Brueckner CPUMF_EVENT_ATTR(cf_z13, L1D_ONNODE_MEM_SOURCED_WRITES, 0x009e);
1613fc7acebSHendrik Brueckner CPUMF_EVENT_ATTR(cf_z13, L1D_ONDRAWER_MEM_SOURCED_WRITES, 0x009f);
1623fc7acebSHendrik Brueckner CPUMF_EVENT_ATTR(cf_z13, L1D_OFFDRAWER_MEM_SOURCED_WRITES, 0x00a0);
1633fc7acebSHendrik Brueckner CPUMF_EVENT_ATTR(cf_z13, L1D_ONCHIP_MEM_SOURCED_WRITES, 0x00a1);
1643fc7acebSHendrik Brueckner CPUMF_EVENT_ATTR(cf_z13, L1I_ONCHIP_L3_SOURCED_WRITES, 0x00a2);
1653fc7acebSHendrik Brueckner CPUMF_EVENT_ATTR(cf_z13, L1I_ONCHIP_L3_SOURCED_WRITES_IV, 0x00a3);
1663fc7acebSHendrik Brueckner CPUMF_EVENT_ATTR(cf_z13, L1I_ONNODE_L4_SOURCED_WRITES, 0x00a4);
1673fc7acebSHendrik Brueckner CPUMF_EVENT_ATTR(cf_z13, L1I_ONNODE_L3_SOURCED_WRITES_IV, 0x00a5);
1683fc7acebSHendrik Brueckner CPUMF_EVENT_ATTR(cf_z13, L1I_ONNODE_L3_SOURCED_WRITES, 0x00a6);
1693fc7acebSHendrik Brueckner CPUMF_EVENT_ATTR(cf_z13, L1I_ONDRAWER_L4_SOURCED_WRITES, 0x00a7);
1703fc7acebSHendrik Brueckner CPUMF_EVENT_ATTR(cf_z13, L1I_ONDRAWER_L3_SOURCED_WRITES_IV, 0x00a8);
1713fc7acebSHendrik Brueckner CPUMF_EVENT_ATTR(cf_z13, L1I_ONDRAWER_L3_SOURCED_WRITES, 0x00a9);
1723fc7acebSHendrik Brueckner CPUMF_EVENT_ATTR(cf_z13, L1I_OFFDRAWER_SCOL_L4_SOURCED_WRITES, 0x00aa);
1733fc7acebSHendrik Brueckner CPUMF_EVENT_ATTR(cf_z13, L1I_OFFDRAWER_SCOL_L3_SOURCED_WRITES_IV, 0x00ab);
1743fc7acebSHendrik Brueckner CPUMF_EVENT_ATTR(cf_z13, L1I_OFFDRAWER_SCOL_L3_SOURCED_WRITES, 0x00ac);
1753fc7acebSHendrik Brueckner CPUMF_EVENT_ATTR(cf_z13, L1I_OFFDRAWER_FCOL_L4_SOURCED_WRITES, 0x00ad);
1763fc7acebSHendrik Brueckner CPUMF_EVENT_ATTR(cf_z13, L1I_OFFDRAWER_FCOL_L3_SOURCED_WRITES_IV, 0x00ae);
1773fc7acebSHendrik Brueckner CPUMF_EVENT_ATTR(cf_z13, L1I_OFFDRAWER_FCOL_L3_SOURCED_WRITES, 0x00af);
1783fc7acebSHendrik Brueckner CPUMF_EVENT_ATTR(cf_z13, L1I_ONNODE_MEM_SOURCED_WRITES, 0x00b0);
1793fc7acebSHendrik Brueckner CPUMF_EVENT_ATTR(cf_z13, L1I_ONDRAWER_MEM_SOURCED_WRITES, 0x00b1);
1803fc7acebSHendrik Brueckner CPUMF_EVENT_ATTR(cf_z13, L1I_OFFDRAWER_MEM_SOURCED_WRITES, 0x00b2);
1813fc7acebSHendrik Brueckner CPUMF_EVENT_ATTR(cf_z13, L1I_ONCHIP_MEM_SOURCED_WRITES, 0x00b3);
1823fc7acebSHendrik Brueckner CPUMF_EVENT_ATTR(cf_z13, TX_NC_TABORT, 0x00da);
1833fc7acebSHendrik Brueckner CPUMF_EVENT_ATTR(cf_z13, TX_C_TABORT_NO_SPECIAL, 0x00db);
1843fc7acebSHendrik Brueckner CPUMF_EVENT_ATTR(cf_z13, TX_C_TABORT_SPECIAL, 0x00dc);
1853fc7acebSHendrik Brueckner CPUMF_EVENT_ATTR(cf_z13, MT_DIAG_CYCLES_ONE_THR_ACTIVE, 0x01c0);
1863fc7acebSHendrik Brueckner CPUMF_EVENT_ATTR(cf_z13, MT_DIAG_CYCLES_TWO_THR_ACTIVE, 0x01c1);
1875f3ba878SAndré Wild CPUMF_EVENT_ATTR(cf_z14, L1D_RO_EXCL_WRITES, 0x0080);
1883593eb94SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z14, DTLB2_WRITES, 0x0081);
1893593eb94SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z14, DTLB2_MISSES, 0x0082);
1903593eb94SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z14, DTLB2_HPAGE_WRITES, 0x0083);
1913593eb94SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z14, DTLB2_GPAGE_WRITES, 0x0084);
1923593eb94SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z14, L1D_L2D_SOURCED_WRITES, 0x0085);
1933593eb94SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z14, ITLB2_WRITES, 0x0086);
1943593eb94SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z14, ITLB2_MISSES, 0x0087);
1953593eb94SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z14, L1I_L2I_SOURCED_WRITES, 0x0088);
1963593eb94SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z14, TLB2_PTE_WRITES, 0x0089);
1973593eb94SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z14, TLB2_CRSTE_WRITES, 0x008a);
1983593eb94SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z14, TLB2_ENGINES_BUSY, 0x008b);
1993593eb94SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z14, TX_C_TEND, 0x008c);
2003593eb94SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z14, TX_NC_TEND, 0x008d);
2013593eb94SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z14, L1C_TLB2_MISSES, 0x008f);
2023593eb94SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z14, L1D_ONCHIP_L3_SOURCED_WRITES, 0x0090);
2033593eb94SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z14, L1D_ONCHIP_MEMORY_SOURCED_WRITES, 0x0091);
2043593eb94SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z14, L1D_ONCHIP_L3_SOURCED_WRITES_IV, 0x0092);
2053593eb94SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z14, L1D_ONCLUSTER_L3_SOURCED_WRITES, 0x0093);
2063593eb94SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z14, L1D_ONCLUSTER_MEMORY_SOURCED_WRITES, 0x0094);
2073593eb94SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z14, L1D_ONCLUSTER_L3_SOURCED_WRITES_IV, 0x0095);
2083593eb94SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z14, L1D_OFFCLUSTER_L3_SOURCED_WRITES, 0x0096);
2093593eb94SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z14, L1D_OFFCLUSTER_MEMORY_SOURCED_WRITES, 0x0097);
2103593eb94SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z14, L1D_OFFCLUSTER_L3_SOURCED_WRITES_IV, 0x0098);
2113593eb94SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z14, L1D_OFFDRAWER_L3_SOURCED_WRITES, 0x0099);
2123593eb94SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z14, L1D_OFFDRAWER_MEMORY_SOURCED_WRITES, 0x009a);
2133593eb94SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z14, L1D_OFFDRAWER_L3_SOURCED_WRITES_IV, 0x009b);
2143593eb94SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z14, L1D_ONDRAWER_L4_SOURCED_WRITES, 0x009c);
2153593eb94SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z14, L1D_OFFDRAWER_L4_SOURCED_WRITES, 0x009d);
2163593eb94SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z14, L1D_ONCHIP_L3_SOURCED_WRITES_RO, 0x009e);
2173593eb94SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z14, L1I_ONCHIP_L3_SOURCED_WRITES, 0x00a2);
2183593eb94SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z14, L1I_ONCHIP_MEMORY_SOURCED_WRITES, 0x00a3);
2193593eb94SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z14, L1I_ONCHIP_L3_SOURCED_WRITES_IV, 0x00a4);
2203593eb94SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z14, L1I_ONCLUSTER_L3_SOURCED_WRITES, 0x00a5);
2213593eb94SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z14, L1I_ONCLUSTER_MEMORY_SOURCED_WRITES, 0x00a6);
2223593eb94SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z14, L1I_ONCLUSTER_L3_SOURCED_WRITES_IV, 0x00a7);
2233593eb94SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z14, L1I_OFFCLUSTER_L3_SOURCED_WRITES, 0x00a8);
2243593eb94SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z14, L1I_OFFCLUSTER_MEMORY_SOURCED_WRITES, 0x00a9);
2253593eb94SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z14, L1I_OFFCLUSTER_L3_SOURCED_WRITES_IV, 0x00aa);
2263593eb94SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z14, L1I_OFFDRAWER_L3_SOURCED_WRITES, 0x00ab);
2273593eb94SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z14, L1I_OFFDRAWER_MEMORY_SOURCED_WRITES, 0x00ac);
2283593eb94SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z14, L1I_OFFDRAWER_L3_SOURCED_WRITES_IV, 0x00ad);
2293593eb94SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z14, L1I_ONDRAWER_L4_SOURCED_WRITES, 0x00ae);
2303593eb94SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z14, L1I_OFFDRAWER_L4_SOURCED_WRITES, 0x00af);
2313593eb94SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z14, BCD_DFP_EXECUTION_SLOTS, 0x00e0);
2323593eb94SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z14, VX_BCD_EXECUTION_SLOTS, 0x00e1);
2333593eb94SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z14, DECIMAL_INSTRUCTIONS, 0x00e2);
23481507f38SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z14, LAST_HOST_TRANSLATIONS, 0x00e8);
2353593eb94SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z14, TX_NC_TABORT, 0x00f3);
2363593eb94SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z14, TX_C_TABORT_NO_SPECIAL, 0x00f4);
2373593eb94SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z14, TX_C_TABORT_SPECIAL, 0x00f5);
2383593eb94SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z14, MT_DIAG_CYCLES_ONE_THR_ACTIVE, 0x01c0);
2393593eb94SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z14, MT_DIAG_CYCLES_TWO_THR_ACTIVE, 0x01c1);
240c7168325SHendrik Brueckner 
2413593eb94SHendrik Brueckner static struct attribute *cpumcf_fvn1_pmu_event_attr[] __initdata = {
2423593eb94SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_fvn1, CPU_CYCLES),
2433593eb94SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_fvn1, INSTRUCTIONS),
2443593eb94SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_fvn1, L1I_DIR_WRITES),
2453593eb94SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_fvn1, L1I_PENALTY_CYCLES),
2463593eb94SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_fvn1, PROBLEM_STATE_CPU_CYCLES),
2473593eb94SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_fvn1, PROBLEM_STATE_INSTRUCTIONS),
2483593eb94SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_fvn1, PROBLEM_STATE_L1I_DIR_WRITES),
2493593eb94SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_fvn1, PROBLEM_STATE_L1I_PENALTY_CYCLES),
2503593eb94SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_fvn1, PROBLEM_STATE_L1D_DIR_WRITES),
2513593eb94SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_fvn1, PROBLEM_STATE_L1D_PENALTY_CYCLES),
2523593eb94SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_fvn1, L1D_DIR_WRITES),
2533593eb94SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_fvn1, L1D_PENALTY_CYCLES),
2543593eb94SHendrik Brueckner 	NULL,
2553593eb94SHendrik Brueckner };
2563593eb94SHendrik Brueckner 
2573593eb94SHendrik Brueckner static struct attribute *cpumcf_fvn3_pmu_event_attr[] __initdata = {
2583593eb94SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_fvn3, CPU_CYCLES),
2593593eb94SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_fvn3, INSTRUCTIONS),
2603593eb94SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_fvn3, L1I_DIR_WRITES),
2613593eb94SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_fvn3, L1I_PENALTY_CYCLES),
2623593eb94SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_fvn3, PROBLEM_STATE_CPU_CYCLES),
2633593eb94SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_fvn3, PROBLEM_STATE_INSTRUCTIONS),
2643593eb94SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_fvn3, L1D_DIR_WRITES),
2653593eb94SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_fvn3, L1D_PENALTY_CYCLES),
2663593eb94SHendrik Brueckner 	NULL,
2673593eb94SHendrik Brueckner };
2683593eb94SHendrik Brueckner 
26946a984ffSThomas Richter static struct attribute *cpumcf_svn_12345_pmu_event_attr[] __initdata = {
27046a984ffSThomas Richter 	CPUMF_EVENT_PTR(cf_svn_12345, PRNG_FUNCTIONS),
27146a984ffSThomas Richter 	CPUMF_EVENT_PTR(cf_svn_12345, PRNG_CYCLES),
27246a984ffSThomas Richter 	CPUMF_EVENT_PTR(cf_svn_12345, PRNG_BLOCKED_FUNCTIONS),
27346a984ffSThomas Richter 	CPUMF_EVENT_PTR(cf_svn_12345, PRNG_BLOCKED_CYCLES),
27446a984ffSThomas Richter 	CPUMF_EVENT_PTR(cf_svn_12345, SHA_FUNCTIONS),
27546a984ffSThomas Richter 	CPUMF_EVENT_PTR(cf_svn_12345, SHA_CYCLES),
27646a984ffSThomas Richter 	CPUMF_EVENT_PTR(cf_svn_12345, SHA_BLOCKED_FUNCTIONS),
27746a984ffSThomas Richter 	CPUMF_EVENT_PTR(cf_svn_12345, SHA_BLOCKED_CYCLES),
27846a984ffSThomas Richter 	CPUMF_EVENT_PTR(cf_svn_12345, DEA_FUNCTIONS),
27946a984ffSThomas Richter 	CPUMF_EVENT_PTR(cf_svn_12345, DEA_CYCLES),
28046a984ffSThomas Richter 	CPUMF_EVENT_PTR(cf_svn_12345, DEA_BLOCKED_FUNCTIONS),
28146a984ffSThomas Richter 	CPUMF_EVENT_PTR(cf_svn_12345, DEA_BLOCKED_CYCLES),
28246a984ffSThomas Richter 	CPUMF_EVENT_PTR(cf_svn_12345, AES_FUNCTIONS),
28346a984ffSThomas Richter 	CPUMF_EVENT_PTR(cf_svn_12345, AES_CYCLES),
28446a984ffSThomas Richter 	CPUMF_EVENT_PTR(cf_svn_12345, AES_BLOCKED_FUNCTIONS),
28546a984ffSThomas Richter 	CPUMF_EVENT_PTR(cf_svn_12345, AES_BLOCKED_CYCLES),
28646a984ffSThomas Richter 	NULL,
28746a984ffSThomas Richter };
28846a984ffSThomas Richter 
28946a984ffSThomas Richter static struct attribute *cpumcf_svn_6_pmu_event_attr[] __initdata = {
29046a984ffSThomas Richter 	CPUMF_EVENT_PTR(cf_svn_12345, PRNG_FUNCTIONS),
29146a984ffSThomas Richter 	CPUMF_EVENT_PTR(cf_svn_12345, PRNG_CYCLES),
29246a984ffSThomas Richter 	CPUMF_EVENT_PTR(cf_svn_12345, PRNG_BLOCKED_FUNCTIONS),
29346a984ffSThomas Richter 	CPUMF_EVENT_PTR(cf_svn_12345, PRNG_BLOCKED_CYCLES),
29446a984ffSThomas Richter 	CPUMF_EVENT_PTR(cf_svn_12345, SHA_FUNCTIONS),
29546a984ffSThomas Richter 	CPUMF_EVENT_PTR(cf_svn_12345, SHA_CYCLES),
29646a984ffSThomas Richter 	CPUMF_EVENT_PTR(cf_svn_12345, SHA_BLOCKED_FUNCTIONS),
29746a984ffSThomas Richter 	CPUMF_EVENT_PTR(cf_svn_12345, SHA_BLOCKED_CYCLES),
29846a984ffSThomas Richter 	CPUMF_EVENT_PTR(cf_svn_12345, DEA_FUNCTIONS),
29946a984ffSThomas Richter 	CPUMF_EVENT_PTR(cf_svn_12345, DEA_CYCLES),
30046a984ffSThomas Richter 	CPUMF_EVENT_PTR(cf_svn_12345, DEA_BLOCKED_FUNCTIONS),
30146a984ffSThomas Richter 	CPUMF_EVENT_PTR(cf_svn_12345, DEA_BLOCKED_CYCLES),
30246a984ffSThomas Richter 	CPUMF_EVENT_PTR(cf_svn_12345, AES_FUNCTIONS),
30346a984ffSThomas Richter 	CPUMF_EVENT_PTR(cf_svn_12345, AES_CYCLES),
30446a984ffSThomas Richter 	CPUMF_EVENT_PTR(cf_svn_12345, AES_BLOCKED_FUNCTIONS),
30546a984ffSThomas Richter 	CPUMF_EVENT_PTR(cf_svn_12345, AES_BLOCKED_CYCLES),
30646a984ffSThomas Richter 	CPUMF_EVENT_PTR(cf_svn_6, ECC_FUNCTION_COUNT),
30746a984ffSThomas Richter 	CPUMF_EVENT_PTR(cf_svn_6, ECC_CYCLES_COUNT),
30846a984ffSThomas Richter 	CPUMF_EVENT_PTR(cf_svn_6, ECC_BLOCKED_FUNCTION_COUNT),
30946a984ffSThomas Richter 	CPUMF_EVENT_PTR(cf_svn_6, ECC_BLOCKED_CYCLES_COUNT),
310c7168325SHendrik Brueckner 	NULL,
311c7168325SHendrik Brueckner };
312c7168325SHendrik Brueckner 
313c7168325SHendrik Brueckner static struct attribute *cpumcf_z10_pmu_event_attr[] __initdata = {
314c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z10, L1I_L2_SOURCED_WRITES),
315c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z10, L1D_L2_SOURCED_WRITES),
316c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z10, L1I_L3_LOCAL_WRITES),
317c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z10, L1D_L3_LOCAL_WRITES),
318c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z10, L1I_L3_REMOTE_WRITES),
319c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z10, L1D_L3_REMOTE_WRITES),
320c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z10, L1D_LMEM_SOURCED_WRITES),
321c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z10, L1I_LMEM_SOURCED_WRITES),
322c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z10, L1D_RO_EXCL_WRITES),
323c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z10, L1I_CACHELINE_INVALIDATES),
324c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z10, ITLB1_WRITES),
325c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z10, DTLB1_WRITES),
326c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z10, TLB2_PTE_WRITES),
327c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z10, TLB2_CRSTE_WRITES),
328c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z10, TLB2_CRSTE_HPAGE_WRITES),
329c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z10, ITLB1_MISSES),
330c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z10, DTLB1_MISSES),
331c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z10, L2C_STORES_SENT),
332c7168325SHendrik Brueckner 	NULL,
333c7168325SHendrik Brueckner };
334c7168325SHendrik Brueckner 
335c7168325SHendrik Brueckner static struct attribute *cpumcf_z196_pmu_event_attr[] __initdata = {
336c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z196, L1D_L2_SOURCED_WRITES),
337c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z196, L1I_L2_SOURCED_WRITES),
338c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z196, DTLB1_MISSES),
339c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z196, ITLB1_MISSES),
340c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z196, L2C_STORES_SENT),
341c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z196, L1D_OFFBOOK_L3_SOURCED_WRITES),
342c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z196, L1D_ONBOOK_L4_SOURCED_WRITES),
343c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z196, L1I_ONBOOK_L4_SOURCED_WRITES),
344c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z196, L1D_RO_EXCL_WRITES),
345c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z196, L1D_OFFBOOK_L4_SOURCED_WRITES),
346c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z196, L1I_OFFBOOK_L4_SOURCED_WRITES),
347c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z196, DTLB1_HPAGE_WRITES),
348c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z196, L1D_LMEM_SOURCED_WRITES),
349c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z196, L1I_LMEM_SOURCED_WRITES),
350c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z196, L1I_OFFBOOK_L3_SOURCED_WRITES),
351c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z196, DTLB1_WRITES),
352c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z196, ITLB1_WRITES),
353c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z196, TLB2_PTE_WRITES),
354c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z196, TLB2_CRSTE_HPAGE_WRITES),
355c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z196, TLB2_CRSTE_WRITES),
356c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z196, L1D_ONCHIP_L3_SOURCED_WRITES),
357c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z196, L1D_OFFCHIP_L3_SOURCED_WRITES),
358c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z196, L1I_ONCHIP_L3_SOURCED_WRITES),
359c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z196, L1I_OFFCHIP_L3_SOURCED_WRITES),
360c7168325SHendrik Brueckner 	NULL,
361c7168325SHendrik Brueckner };
362c7168325SHendrik Brueckner 
363c7168325SHendrik Brueckner static struct attribute *cpumcf_zec12_pmu_event_attr[] __initdata = {
364c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_zec12, DTLB1_MISSES),
365c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_zec12, ITLB1_MISSES),
366c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_zec12, L1D_L2I_SOURCED_WRITES),
367c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_zec12, L1I_L2I_SOURCED_WRITES),
368c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_zec12, L1D_L2D_SOURCED_WRITES),
369c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_zec12, DTLB1_WRITES),
370c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_zec12, L1D_LMEM_SOURCED_WRITES),
371c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_zec12, L1I_LMEM_SOURCED_WRITES),
372c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_zec12, L1D_RO_EXCL_WRITES),
373c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_zec12, DTLB1_HPAGE_WRITES),
374c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_zec12, ITLB1_WRITES),
375c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_zec12, TLB2_PTE_WRITES),
376c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_zec12, TLB2_CRSTE_HPAGE_WRITES),
377c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_zec12, TLB2_CRSTE_WRITES),
378c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_zec12, L1D_ONCHIP_L3_SOURCED_WRITES),
379c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_zec12, L1D_OFFCHIP_L3_SOURCED_WRITES),
380c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_zec12, L1D_OFFBOOK_L3_SOURCED_WRITES),
381c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_zec12, L1D_ONBOOK_L4_SOURCED_WRITES),
382c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_zec12, L1D_OFFBOOK_L4_SOURCED_WRITES),
383c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_zec12, TX_NC_TEND),
384c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_zec12, L1D_ONCHIP_L3_SOURCED_WRITES_IV),
385c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_zec12, L1D_OFFCHIP_L3_SOURCED_WRITES_IV),
386c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_zec12, L1D_OFFBOOK_L3_SOURCED_WRITES_IV),
387c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_zec12, L1I_ONCHIP_L3_SOURCED_WRITES),
388c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_zec12, L1I_OFFCHIP_L3_SOURCED_WRITES),
389c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_zec12, L1I_OFFBOOK_L3_SOURCED_WRITES),
390c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_zec12, L1I_ONBOOK_L4_SOURCED_WRITES),
391c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_zec12, L1I_OFFBOOK_L4_SOURCED_WRITES),
392c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_zec12, TX_C_TEND),
393c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_zec12, L1I_ONCHIP_L3_SOURCED_WRITES_IV),
394c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_zec12, L1I_OFFCHIP_L3_SOURCED_WRITES_IV),
395c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_zec12, L1I_OFFBOOK_L3_SOURCED_WRITES_IV),
396c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_zec12, TX_NC_TABORT),
397c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_zec12, TX_C_TABORT_NO_SPECIAL),
398c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_zec12, TX_C_TABORT_SPECIAL),
399c7168325SHendrik Brueckner 	NULL,
400c7168325SHendrik Brueckner };
401c7168325SHendrik Brueckner 
4023fc7acebSHendrik Brueckner static struct attribute *cpumcf_z13_pmu_event_attr[] __initdata = {
4035f3ba878SAndré Wild 	CPUMF_EVENT_PTR(cf_z13, L1D_RO_EXCL_WRITES),
4043fc7acebSHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z13, DTLB1_WRITES),
4053fc7acebSHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z13, DTLB1_MISSES),
4063fc7acebSHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z13, DTLB1_HPAGE_WRITES),
4073fc7acebSHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z13, DTLB1_GPAGE_WRITES),
4083fc7acebSHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z13, L1D_L2D_SOURCED_WRITES),
4093fc7acebSHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z13, ITLB1_WRITES),
4103fc7acebSHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z13, ITLB1_MISSES),
4113fc7acebSHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z13, L1I_L2I_SOURCED_WRITES),
4123fc7acebSHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z13, TLB2_PTE_WRITES),
4133fc7acebSHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z13, TLB2_CRSTE_HPAGE_WRITES),
4143fc7acebSHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z13, TLB2_CRSTE_WRITES),
4153fc7acebSHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z13, TX_C_TEND),
4163fc7acebSHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z13, TX_NC_TEND),
4173fc7acebSHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z13, L1C_TLB1_MISSES),
4183fc7acebSHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z13, L1D_ONCHIP_L3_SOURCED_WRITES),
4193fc7acebSHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z13, L1D_ONCHIP_L3_SOURCED_WRITES_IV),
4203fc7acebSHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z13, L1D_ONNODE_L4_SOURCED_WRITES),
4213fc7acebSHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z13, L1D_ONNODE_L3_SOURCED_WRITES_IV),
4223fc7acebSHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z13, L1D_ONNODE_L3_SOURCED_WRITES),
4233fc7acebSHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z13, L1D_ONDRAWER_L4_SOURCED_WRITES),
4243fc7acebSHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z13, L1D_ONDRAWER_L3_SOURCED_WRITES_IV),
4253fc7acebSHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z13, L1D_ONDRAWER_L3_SOURCED_WRITES),
4263fc7acebSHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z13, L1D_OFFDRAWER_SCOL_L4_SOURCED_WRITES),
4273fc7acebSHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z13, L1D_OFFDRAWER_SCOL_L3_SOURCED_WRITES_IV),
4283fc7acebSHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z13, L1D_OFFDRAWER_SCOL_L3_SOURCED_WRITES),
4293fc7acebSHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z13, L1D_OFFDRAWER_FCOL_L4_SOURCED_WRITES),
4303fc7acebSHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z13, L1D_OFFDRAWER_FCOL_L3_SOURCED_WRITES_IV),
4313fc7acebSHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z13, L1D_OFFDRAWER_FCOL_L3_SOURCED_WRITES),
4323fc7acebSHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z13, L1D_ONNODE_MEM_SOURCED_WRITES),
4333fc7acebSHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z13, L1D_ONDRAWER_MEM_SOURCED_WRITES),
4343fc7acebSHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z13, L1D_OFFDRAWER_MEM_SOURCED_WRITES),
4353fc7acebSHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z13, L1D_ONCHIP_MEM_SOURCED_WRITES),
4363fc7acebSHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z13, L1I_ONCHIP_L3_SOURCED_WRITES),
4373fc7acebSHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z13, L1I_ONCHIP_L3_SOURCED_WRITES_IV),
4383fc7acebSHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z13, L1I_ONNODE_L4_SOURCED_WRITES),
4393fc7acebSHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z13, L1I_ONNODE_L3_SOURCED_WRITES_IV),
4403fc7acebSHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z13, L1I_ONNODE_L3_SOURCED_WRITES),
4413fc7acebSHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z13, L1I_ONDRAWER_L4_SOURCED_WRITES),
4423fc7acebSHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z13, L1I_ONDRAWER_L3_SOURCED_WRITES_IV),
4433fc7acebSHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z13, L1I_ONDRAWER_L3_SOURCED_WRITES),
4443fc7acebSHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z13, L1I_OFFDRAWER_SCOL_L4_SOURCED_WRITES),
4453fc7acebSHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z13, L1I_OFFDRAWER_SCOL_L3_SOURCED_WRITES_IV),
4463fc7acebSHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z13, L1I_OFFDRAWER_SCOL_L3_SOURCED_WRITES),
4473fc7acebSHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z13, L1I_OFFDRAWER_FCOL_L4_SOURCED_WRITES),
4483fc7acebSHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z13, L1I_OFFDRAWER_FCOL_L3_SOURCED_WRITES_IV),
4493fc7acebSHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z13, L1I_OFFDRAWER_FCOL_L3_SOURCED_WRITES),
4503fc7acebSHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z13, L1I_ONNODE_MEM_SOURCED_WRITES),
4513fc7acebSHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z13, L1I_ONDRAWER_MEM_SOURCED_WRITES),
4523fc7acebSHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z13, L1I_OFFDRAWER_MEM_SOURCED_WRITES),
4533fc7acebSHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z13, L1I_ONCHIP_MEM_SOURCED_WRITES),
4543fc7acebSHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z13, TX_NC_TABORT),
4553fc7acebSHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z13, TX_C_TABORT_NO_SPECIAL),
4563fc7acebSHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z13, TX_C_TABORT_SPECIAL),
4573fc7acebSHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z13, MT_DIAG_CYCLES_ONE_THR_ACTIVE),
4583fc7acebSHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z13, MT_DIAG_CYCLES_TWO_THR_ACTIVE),
4593fc7acebSHendrik Brueckner 	NULL,
4603fc7acebSHendrik Brueckner };
4613fc7acebSHendrik Brueckner 
4623593eb94SHendrik Brueckner static struct attribute *cpumcf_z14_pmu_event_attr[] __initdata = {
4635f3ba878SAndré Wild 	CPUMF_EVENT_PTR(cf_z14, L1D_RO_EXCL_WRITES),
4643593eb94SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z14, DTLB2_WRITES),
4653593eb94SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z14, DTLB2_MISSES),
4663593eb94SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z14, DTLB2_HPAGE_WRITES),
4673593eb94SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z14, DTLB2_GPAGE_WRITES),
4683593eb94SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z14, L1D_L2D_SOURCED_WRITES),
4693593eb94SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z14, ITLB2_WRITES),
4703593eb94SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z14, ITLB2_MISSES),
4713593eb94SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z14, L1I_L2I_SOURCED_WRITES),
4723593eb94SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z14, TLB2_PTE_WRITES),
4733593eb94SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z14, TLB2_CRSTE_WRITES),
4743593eb94SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z14, TLB2_ENGINES_BUSY),
4753593eb94SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z14, TX_C_TEND),
4763593eb94SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z14, TX_NC_TEND),
4773593eb94SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z14, L1C_TLB2_MISSES),
4783593eb94SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z14, L1D_ONCHIP_L3_SOURCED_WRITES),
4793593eb94SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z14, L1D_ONCHIP_MEMORY_SOURCED_WRITES),
4803593eb94SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z14, L1D_ONCHIP_L3_SOURCED_WRITES_IV),
4813593eb94SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z14, L1D_ONCLUSTER_L3_SOURCED_WRITES),
4823593eb94SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z14, L1D_ONCLUSTER_MEMORY_SOURCED_WRITES),
4833593eb94SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z14, L1D_ONCLUSTER_L3_SOURCED_WRITES_IV),
4843593eb94SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z14, L1D_OFFCLUSTER_L3_SOURCED_WRITES),
4853593eb94SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z14, L1D_OFFCLUSTER_MEMORY_SOURCED_WRITES),
4863593eb94SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z14, L1D_OFFCLUSTER_L3_SOURCED_WRITES_IV),
4873593eb94SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z14, L1D_OFFDRAWER_L3_SOURCED_WRITES),
4883593eb94SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z14, L1D_OFFDRAWER_MEMORY_SOURCED_WRITES),
4893593eb94SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z14, L1D_OFFDRAWER_L3_SOURCED_WRITES_IV),
4903593eb94SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z14, L1D_ONDRAWER_L4_SOURCED_WRITES),
4913593eb94SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z14, L1D_OFFDRAWER_L4_SOURCED_WRITES),
4923593eb94SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z14, L1D_ONCHIP_L3_SOURCED_WRITES_RO),
4933593eb94SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z14, L1I_ONCHIP_L3_SOURCED_WRITES),
4943593eb94SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z14, L1I_ONCHIP_MEMORY_SOURCED_WRITES),
4953593eb94SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z14, L1I_ONCHIP_L3_SOURCED_WRITES_IV),
4963593eb94SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z14, L1I_ONCLUSTER_L3_SOURCED_WRITES),
4973593eb94SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z14, L1I_ONCLUSTER_MEMORY_SOURCED_WRITES),
4983593eb94SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z14, L1I_ONCLUSTER_L3_SOURCED_WRITES_IV),
4993593eb94SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z14, L1I_OFFCLUSTER_L3_SOURCED_WRITES),
5003593eb94SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z14, L1I_OFFCLUSTER_MEMORY_SOURCED_WRITES),
5013593eb94SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z14, L1I_OFFCLUSTER_L3_SOURCED_WRITES_IV),
5023593eb94SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z14, L1I_OFFDRAWER_L3_SOURCED_WRITES),
5033593eb94SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z14, L1I_OFFDRAWER_MEMORY_SOURCED_WRITES),
5043593eb94SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z14, L1I_OFFDRAWER_L3_SOURCED_WRITES_IV),
5053593eb94SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z14, L1I_ONDRAWER_L4_SOURCED_WRITES),
5063593eb94SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z14, L1I_OFFDRAWER_L4_SOURCED_WRITES),
5073593eb94SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z14, BCD_DFP_EXECUTION_SLOTS),
5083593eb94SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z14, VX_BCD_EXECUTION_SLOTS),
5093593eb94SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z14, DECIMAL_INSTRUCTIONS),
5103593eb94SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z14, LAST_HOST_TRANSLATIONS),
5113593eb94SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z14, TX_NC_TABORT),
5123593eb94SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z14, TX_C_TABORT_NO_SPECIAL),
5133593eb94SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z14, TX_C_TABORT_SPECIAL),
5143593eb94SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z14, MT_DIAG_CYCLES_ONE_THR_ACTIVE),
5153593eb94SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z14, MT_DIAG_CYCLES_TWO_THR_ACTIVE),
5163593eb94SHendrik Brueckner 	NULL,
5173593eb94SHendrik Brueckner };
5183593eb94SHendrik Brueckner 
519c7168325SHendrik Brueckner /* END: CPUM_CF COUNTER DEFINITIONS ===================================== */
520c7168325SHendrik Brueckner 
52166a49784SHendrik Brueckner static struct attribute_group cpumcf_pmu_events_group = {
522c7168325SHendrik Brueckner 	.name = "events",
523c7168325SHendrik Brueckner };
524c7168325SHendrik Brueckner 
525c7168325SHendrik Brueckner PMU_FORMAT_ATTR(event, "config:0-63");
526c7168325SHendrik Brueckner 
52766a49784SHendrik Brueckner static struct attribute *cpumcf_pmu_format_attr[] = {
528c7168325SHendrik Brueckner 	&format_attr_event.attr,
529c7168325SHendrik Brueckner 	NULL,
530c7168325SHendrik Brueckner };
531c7168325SHendrik Brueckner 
53266a49784SHendrik Brueckner static struct attribute_group cpumcf_pmu_format_group = {
533c7168325SHendrik Brueckner 	.name = "format",
53466a49784SHendrik Brueckner 	.attrs = cpumcf_pmu_format_attr,
535c7168325SHendrik Brueckner };
536c7168325SHendrik Brueckner 
53766a49784SHendrik Brueckner static const struct attribute_group *cpumcf_pmu_attr_groups[] = {
53866a49784SHendrik Brueckner 	&cpumcf_pmu_events_group,
53966a49784SHendrik Brueckner 	&cpumcf_pmu_format_group,
540c7168325SHendrik Brueckner 	NULL,
541c7168325SHendrik Brueckner };
542c7168325SHendrik Brueckner 
543c7168325SHendrik Brueckner 
544c7168325SHendrik Brueckner static __init struct attribute **merge_attr(struct attribute **a,
5453593eb94SHendrik Brueckner 					    struct attribute **b,
5463593eb94SHendrik Brueckner 					    struct attribute **c)
547c7168325SHendrik Brueckner {
548c7168325SHendrik Brueckner 	struct attribute **new;
549c7168325SHendrik Brueckner 	int j, i;
550c7168325SHendrik Brueckner 
551c7168325SHendrik Brueckner 	for (j = 0; a[j]; j++)
552c7168325SHendrik Brueckner 		;
553c7168325SHendrik Brueckner 	for (i = 0; b[i]; i++)
554c7168325SHendrik Brueckner 		j++;
5553593eb94SHendrik Brueckner 	for (i = 0; c[i]; i++)
5563593eb94SHendrik Brueckner 		j++;
557c7168325SHendrik Brueckner 	j++;
558c7168325SHendrik Brueckner 
5596da2ec56SKees Cook 	new = kmalloc_array(j, sizeof(struct attribute *), GFP_KERNEL);
560c7168325SHendrik Brueckner 	if (!new)
561c7168325SHendrik Brueckner 		return NULL;
562c7168325SHendrik Brueckner 	j = 0;
563c7168325SHendrik Brueckner 	for (i = 0; a[i]; i++)
564c7168325SHendrik Brueckner 		new[j++] = a[i];
565c7168325SHendrik Brueckner 	for (i = 0; b[i]; i++)
566c7168325SHendrik Brueckner 		new[j++] = b[i];
5673593eb94SHendrik Brueckner 	for (i = 0; c[i]; i++)
5683593eb94SHendrik Brueckner 		new[j++] = c[i];
569c7168325SHendrik Brueckner 	new[j] = NULL;
570c7168325SHendrik Brueckner 
571c7168325SHendrik Brueckner 	return new;
572c7168325SHendrik Brueckner }
573c7168325SHendrik Brueckner 
574c7168325SHendrik Brueckner __init const struct attribute_group **cpumf_cf_event_group(void)
575c7168325SHendrik Brueckner {
5763593eb94SHendrik Brueckner 	struct attribute **combined, **model, **cfvn, **csvn;
5773fc7acebSHendrik Brueckner 	struct attribute *none[] = { NULL };
5783593eb94SHendrik Brueckner 	struct cpumf_ctr_info ci;
579c7168325SHendrik Brueckner 	struct cpuid cpu_id;
580c7168325SHendrik Brueckner 
5813593eb94SHendrik Brueckner 	/* Determine generic counters set(s) */
5823593eb94SHendrik Brueckner 	qctri(&ci);
5833593eb94SHendrik Brueckner 	switch (ci.cfvn) {
5843593eb94SHendrik Brueckner 	case 1:
5853593eb94SHendrik Brueckner 		cfvn = cpumcf_fvn1_pmu_event_attr;
5863593eb94SHendrik Brueckner 		break;
5873593eb94SHendrik Brueckner 	case 3:
5883593eb94SHendrik Brueckner 		cfvn = cpumcf_fvn3_pmu_event_attr;
5893593eb94SHendrik Brueckner 		break;
5903593eb94SHendrik Brueckner 	default:
5913593eb94SHendrik Brueckner 		cfvn = none;
5923593eb94SHendrik Brueckner 	}
59346a984ffSThomas Richter 
59446a984ffSThomas Richter 	/* Determine version specific crypto set */
59546a984ffSThomas Richter 	switch (ci.csvn) {
59646a984ffSThomas Richter 	case 1 ... 5:
59746a984ffSThomas Richter 		csvn = cpumcf_svn_12345_pmu_event_attr;
59846a984ffSThomas Richter 		break;
59946a984ffSThomas Richter 	case 6:
60046a984ffSThomas Richter 		csvn = cpumcf_svn_6_pmu_event_attr;
60146a984ffSThomas Richter 		break;
60246a984ffSThomas Richter 	default:
60346a984ffSThomas Richter 		csvn = none;
60446a984ffSThomas Richter 	}
6053593eb94SHendrik Brueckner 
6063593eb94SHendrik Brueckner 	/* Determine model-specific counter set(s) */
607c7168325SHendrik Brueckner 	get_cpu_id(&cpu_id);
608c7168325SHendrik Brueckner 	switch (cpu_id.machine) {
609c7168325SHendrik Brueckner 	case 0x2097:
610c7168325SHendrik Brueckner 	case 0x2098:
611c7168325SHendrik Brueckner 		model = cpumcf_z10_pmu_event_attr;
612c7168325SHendrik Brueckner 		break;
613c7168325SHendrik Brueckner 	case 0x2817:
614c7168325SHendrik Brueckner 	case 0x2818:
615c7168325SHendrik Brueckner 		model = cpumcf_z196_pmu_event_attr;
616c7168325SHendrik Brueckner 		break;
617c7168325SHendrik Brueckner 	case 0x2827:
618c7168325SHendrik Brueckner 	case 0x2828:
619c7168325SHendrik Brueckner 		model = cpumcf_zec12_pmu_event_attr;
620c7168325SHendrik Brueckner 		break;
6213fc7acebSHendrik Brueckner 	case 0x2964:
6223fc7acebSHendrik Brueckner 	case 0x2965:
6233fc7acebSHendrik Brueckner 		model = cpumcf_z13_pmu_event_attr;
6243fc7acebSHendrik Brueckner 		break;
6253593eb94SHendrik Brueckner 	case 0x3906:
626451239ebSHeiko Carstens 	case 0x3907:
627*820bace7SThomas Richter 	case 0x8561:
628*820bace7SThomas Richter 	case 0x8562:
6293593eb94SHendrik Brueckner 		model = cpumcf_z14_pmu_event_attr;
6303593eb94SHendrik Brueckner 		break;
631c7168325SHendrik Brueckner 	default:
6323fc7acebSHendrik Brueckner 		model = none;
633c7168325SHendrik Brueckner 		break;
6340b925159SHeiko Carstens 	}
635c7168325SHendrik Brueckner 
6363593eb94SHendrik Brueckner 	combined = merge_attr(cfvn, csvn, model);
637c7168325SHendrik Brueckner 	if (combined)
63866a49784SHendrik Brueckner 		cpumcf_pmu_events_group.attrs = combined;
63966a49784SHendrik Brueckner 	return cpumcf_pmu_attr_groups;
640c7168325SHendrik Brueckner }
641