xref: /linux/arch/s390/kernel/perf_cpum_cf_events.c (revision 3fc7acebaecf940697ea9a5a927cf10766d4b00e)
1c7168325SHendrik Brueckner /*
2c7168325SHendrik Brueckner  * Perf PMU sysfs events attributes for available CPU-measurement counters
3c7168325SHendrik Brueckner  *
4c7168325SHendrik Brueckner  */
5c7168325SHendrik Brueckner 
6c7168325SHendrik Brueckner #include <linux/slab.h>
7c7168325SHendrik Brueckner #include <linux/perf_event.h>
8c7168325SHendrik Brueckner 
9c7168325SHendrik Brueckner 
10c7168325SHendrik Brueckner /* BEGIN: CPUM_CF COUNTER DEFINITIONS =================================== */
11c7168325SHendrik Brueckner 
12c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf, CPU_CYCLES, 0x0000);
13c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf, INSTRUCTIONS, 0x0001);
14c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf, L1I_DIR_WRITES, 0x0002);
15c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf, L1I_PENALTY_CYCLES, 0x0003);
16c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf, PROBLEM_STATE_CPU_CYCLES, 0x0020);
17c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf, PROBLEM_STATE_INSTRUCTIONS, 0x0021);
18c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf, PROBLEM_STATE_L1I_DIR_WRITES, 0x0022);
19c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf, PROBLEM_STATE_L1I_PENALTY_CYCLES, 0x0023);
20c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf, PROBLEM_STATE_L1D_DIR_WRITES, 0x0024);
21c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf, PROBLEM_STATE_L1D_PENALTY_CYCLES, 0x0025);
22c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf, L1D_DIR_WRITES, 0x0004);
23c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf, L1D_PENALTY_CYCLES, 0x0005);
24c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf, PRNG_FUNCTIONS, 0x0040);
25c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf, PRNG_CYCLES, 0x0041);
26c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf, PRNG_BLOCKED_FUNCTIONS, 0x0042);
27c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf, PRNG_BLOCKED_CYCLES, 0x0043);
28c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf, SHA_FUNCTIONS, 0x0044);
29c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf, SHA_CYCLES, 0x0045);
30c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf, SHA_BLOCKED_FUNCTIONS, 0x0046);
31c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf, SHA_BLOCKED_CYCLES, 0x0047);
32c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf, DEA_FUNCTIONS, 0x0048);
33c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf, DEA_CYCLES, 0x0049);
34c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf, DEA_BLOCKED_FUNCTIONS, 0x004a);
35c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf, DEA_BLOCKED_CYCLES, 0x004b);
36c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf, AES_FUNCTIONS, 0x004c);
37c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf, AES_CYCLES, 0x004d);
38c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf, AES_BLOCKED_FUNCTIONS, 0x004e);
39c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf, AES_BLOCKED_CYCLES, 0x004f);
40c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z10, L1I_L2_SOURCED_WRITES, 0x0080);
41c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z10, L1D_L2_SOURCED_WRITES, 0x0081);
42c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z10, L1I_L3_LOCAL_WRITES, 0x0082);
43c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z10, L1D_L3_LOCAL_WRITES, 0x0083);
44c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z10, L1I_L3_REMOTE_WRITES, 0x0084);
45c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z10, L1D_L3_REMOTE_WRITES, 0x0085);
46c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z10, L1D_LMEM_SOURCED_WRITES, 0x0086);
47c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z10, L1I_LMEM_SOURCED_WRITES, 0x0087);
48c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z10, L1D_RO_EXCL_WRITES, 0x0088);
49c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z10, L1I_CACHELINE_INVALIDATES, 0x0089);
50c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z10, ITLB1_WRITES, 0x008a);
51c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z10, DTLB1_WRITES, 0x008b);
52c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z10, TLB2_PTE_WRITES, 0x008c);
53c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z10, TLB2_CRSTE_WRITES, 0x008d);
54c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z10, TLB2_CRSTE_HPAGE_WRITES, 0x008e);
55c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z10, ITLB1_MISSES, 0x0091);
56c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z10, DTLB1_MISSES, 0x0092);
57c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z10, L2C_STORES_SENT, 0x0093);
58c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z196, L1D_L2_SOURCED_WRITES, 0x0080);
59c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z196, L1I_L2_SOURCED_WRITES, 0x0081);
60c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z196, DTLB1_MISSES, 0x0082);
61c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z196, ITLB1_MISSES, 0x0083);
62c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z196, L2C_STORES_SENT, 0x0085);
63c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z196, L1D_OFFBOOK_L3_SOURCED_WRITES, 0x0086);
64c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z196, L1D_ONBOOK_L4_SOURCED_WRITES, 0x0087);
65c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z196, L1I_ONBOOK_L4_SOURCED_WRITES, 0x0088);
66c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z196, L1D_RO_EXCL_WRITES, 0x0089);
67c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z196, L1D_OFFBOOK_L4_SOURCED_WRITES, 0x008a);
68c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z196, L1I_OFFBOOK_L4_SOURCED_WRITES, 0x008b);
69c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z196, DTLB1_HPAGE_WRITES, 0x008c);
70c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z196, L1D_LMEM_SOURCED_WRITES, 0x008d);
71c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z196, L1I_LMEM_SOURCED_WRITES, 0x008e);
72c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z196, L1I_OFFBOOK_L3_SOURCED_WRITES, 0x008f);
73c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z196, DTLB1_WRITES, 0x0090);
74c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z196, ITLB1_WRITES, 0x0091);
75c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z196, TLB2_PTE_WRITES, 0x0092);
76c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z196, TLB2_CRSTE_HPAGE_WRITES, 0x0093);
77c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z196, TLB2_CRSTE_WRITES, 0x0094);
78c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z196, L1D_ONCHIP_L3_SOURCED_WRITES, 0x0096);
79c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z196, L1D_OFFCHIP_L3_SOURCED_WRITES, 0x0098);
80c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z196, L1I_ONCHIP_L3_SOURCED_WRITES, 0x0099);
81c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_z196, L1I_OFFCHIP_L3_SOURCED_WRITES, 0x009b);
82c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_zec12, DTLB1_MISSES, 0x0080);
83c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_zec12, ITLB1_MISSES, 0x0081);
84c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_zec12, L1D_L2I_SOURCED_WRITES, 0x0082);
85c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_zec12, L1I_L2I_SOURCED_WRITES, 0x0083);
86c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_zec12, L1D_L2D_SOURCED_WRITES, 0x0084);
87c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_zec12, DTLB1_WRITES, 0x0085);
88c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_zec12, L1D_LMEM_SOURCED_WRITES, 0x0087);
89c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_zec12, L1I_LMEM_SOURCED_WRITES, 0x0089);
90c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_zec12, L1D_RO_EXCL_WRITES, 0x008a);
91c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_zec12, DTLB1_HPAGE_WRITES, 0x008b);
92c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_zec12, ITLB1_WRITES, 0x008c);
93c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_zec12, TLB2_PTE_WRITES, 0x008d);
94c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_zec12, TLB2_CRSTE_HPAGE_WRITES, 0x008e);
95c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_zec12, TLB2_CRSTE_WRITES, 0x008f);
96c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_zec12, L1D_ONCHIP_L3_SOURCED_WRITES, 0x0090);
97c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_zec12, L1D_OFFCHIP_L3_SOURCED_WRITES, 0x0091);
98c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_zec12, L1D_OFFBOOK_L3_SOURCED_WRITES, 0x0092);
99c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_zec12, L1D_ONBOOK_L4_SOURCED_WRITES, 0x0093);
100c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_zec12, L1D_OFFBOOK_L4_SOURCED_WRITES, 0x0094);
101c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_zec12, TX_NC_TEND, 0x0095);
102c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_zec12, L1D_ONCHIP_L3_SOURCED_WRITES_IV, 0x0096);
103c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_zec12, L1D_OFFCHIP_L3_SOURCED_WRITES_IV, 0x0097);
104c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_zec12, L1D_OFFBOOK_L3_SOURCED_WRITES_IV, 0x0098);
105c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_zec12, L1I_ONCHIP_L3_SOURCED_WRITES, 0x0099);
106c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_zec12, L1I_OFFCHIP_L3_SOURCED_WRITES, 0x009a);
107c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_zec12, L1I_OFFBOOK_L3_SOURCED_WRITES, 0x009b);
108c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_zec12, L1I_ONBOOK_L4_SOURCED_WRITES, 0x009c);
109c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_zec12, L1I_OFFBOOK_L4_SOURCED_WRITES, 0x009d);
110c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_zec12, TX_C_TEND, 0x009e);
111c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_zec12, L1I_ONCHIP_L3_SOURCED_WRITES_IV, 0x009f);
112c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_zec12, L1I_OFFCHIP_L3_SOURCED_WRITES_IV, 0x00a0);
113c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_zec12, L1I_OFFBOOK_L3_SOURCED_WRITES_IV, 0x00a1);
114c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_zec12, TX_NC_TABORT, 0x00b1);
115c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_zec12, TX_C_TABORT_NO_SPECIAL, 0x00b2);
116c7168325SHendrik Brueckner CPUMF_EVENT_ATTR(cf_zec12, TX_C_TABORT_SPECIAL, 0x00b3);
117*3fc7acebSHendrik Brueckner CPUMF_EVENT_ATTR(cf_z13, L1D_WRITES_RO_EXCL, 0x0080);
118*3fc7acebSHendrik Brueckner CPUMF_EVENT_ATTR(cf_z13, DTLB1_WRITES, 0x0081);
119*3fc7acebSHendrik Brueckner CPUMF_EVENT_ATTR(cf_z13, DTLB1_MISSES, 0x0082);
120*3fc7acebSHendrik Brueckner CPUMF_EVENT_ATTR(cf_z13, DTLB1_HPAGE_WRITES, 0x0083);
121*3fc7acebSHendrik Brueckner CPUMF_EVENT_ATTR(cf_z13, DTLB1_GPAGE_WRITES, 0x0084);
122*3fc7acebSHendrik Brueckner CPUMF_EVENT_ATTR(cf_z13, L1D_L2D_SOURCED_WRITES, 0x0085);
123*3fc7acebSHendrik Brueckner CPUMF_EVENT_ATTR(cf_z13, ITLB1_WRITES, 0x0086);
124*3fc7acebSHendrik Brueckner CPUMF_EVENT_ATTR(cf_z13, ITLB1_MISSES, 0x0087);
125*3fc7acebSHendrik Brueckner CPUMF_EVENT_ATTR(cf_z13, L1I_L2I_SOURCED_WRITES, 0x0088);
126*3fc7acebSHendrik Brueckner CPUMF_EVENT_ATTR(cf_z13, TLB2_PTE_WRITES, 0x0089);
127*3fc7acebSHendrik Brueckner CPUMF_EVENT_ATTR(cf_z13, TLB2_CRSTE_HPAGE_WRITES, 0x008a);
128*3fc7acebSHendrik Brueckner CPUMF_EVENT_ATTR(cf_z13, TLB2_CRSTE_WRITES, 0x008b);
129*3fc7acebSHendrik Brueckner CPUMF_EVENT_ATTR(cf_z13, TX_C_TEND, 0x008c);
130*3fc7acebSHendrik Brueckner CPUMF_EVENT_ATTR(cf_z13, TX_NC_TEND, 0x008d);
131*3fc7acebSHendrik Brueckner CPUMF_EVENT_ATTR(cf_z13, L1C_TLB1_MISSES, 0x008f);
132*3fc7acebSHendrik Brueckner CPUMF_EVENT_ATTR(cf_z13, L1D_ONCHIP_L3_SOURCED_WRITES, 0x0090);
133*3fc7acebSHendrik Brueckner CPUMF_EVENT_ATTR(cf_z13, L1D_ONCHIP_L3_SOURCED_WRITES_IV, 0x0091);
134*3fc7acebSHendrik Brueckner CPUMF_EVENT_ATTR(cf_z13, L1D_ONNODE_L4_SOURCED_WRITES, 0x0092);
135*3fc7acebSHendrik Brueckner CPUMF_EVENT_ATTR(cf_z13, L1D_ONNODE_L3_SOURCED_WRITES_IV, 0x0093);
136*3fc7acebSHendrik Brueckner CPUMF_EVENT_ATTR(cf_z13, L1D_ONNODE_L3_SOURCED_WRITES, 0x0094);
137*3fc7acebSHendrik Brueckner CPUMF_EVENT_ATTR(cf_z13, L1D_ONDRAWER_L4_SOURCED_WRITES, 0x0095);
138*3fc7acebSHendrik Brueckner CPUMF_EVENT_ATTR(cf_z13, L1D_ONDRAWER_L3_SOURCED_WRITES_IV, 0x0096);
139*3fc7acebSHendrik Brueckner CPUMF_EVENT_ATTR(cf_z13, L1D_ONDRAWER_L3_SOURCED_WRITES, 0x0097);
140*3fc7acebSHendrik Brueckner CPUMF_EVENT_ATTR(cf_z13, L1D_OFFDRAWER_SCOL_L4_SOURCED_WRITES, 0x0098);
141*3fc7acebSHendrik Brueckner CPUMF_EVENT_ATTR(cf_z13, L1D_OFFDRAWER_SCOL_L3_SOURCED_WRITES_IV, 0x0099);
142*3fc7acebSHendrik Brueckner CPUMF_EVENT_ATTR(cf_z13, L1D_OFFDRAWER_SCOL_L3_SOURCED_WRITES, 0x009a);
143*3fc7acebSHendrik Brueckner CPUMF_EVENT_ATTR(cf_z13, L1D_OFFDRAWER_FCOL_L4_SOURCED_WRITES, 0x009b);
144*3fc7acebSHendrik Brueckner CPUMF_EVENT_ATTR(cf_z13, L1D_OFFDRAWER_FCOL_L3_SOURCED_WRITES_IV, 0x009c);
145*3fc7acebSHendrik Brueckner CPUMF_EVENT_ATTR(cf_z13, L1D_OFFDRAWER_FCOL_L3_SOURCED_WRITES, 0x009d);
146*3fc7acebSHendrik Brueckner CPUMF_EVENT_ATTR(cf_z13, L1D_ONNODE_MEM_SOURCED_WRITES, 0x009e);
147*3fc7acebSHendrik Brueckner CPUMF_EVENT_ATTR(cf_z13, L1D_ONDRAWER_MEM_SOURCED_WRITES, 0x009f);
148*3fc7acebSHendrik Brueckner CPUMF_EVENT_ATTR(cf_z13, L1D_OFFDRAWER_MEM_SOURCED_WRITES, 0x00a0);
149*3fc7acebSHendrik Brueckner CPUMF_EVENT_ATTR(cf_z13, L1D_ONCHIP_MEM_SOURCED_WRITES, 0x00a1);
150*3fc7acebSHendrik Brueckner CPUMF_EVENT_ATTR(cf_z13, L1I_ONCHIP_L3_SOURCED_WRITES, 0x00a2);
151*3fc7acebSHendrik Brueckner CPUMF_EVENT_ATTR(cf_z13, L1I_ONCHIP_L3_SOURCED_WRITES_IV, 0x00a3);
152*3fc7acebSHendrik Brueckner CPUMF_EVENT_ATTR(cf_z13, L1I_ONNODE_L4_SOURCED_WRITES, 0x00a4);
153*3fc7acebSHendrik Brueckner CPUMF_EVENT_ATTR(cf_z13, L1I_ONNODE_L3_SOURCED_WRITES_IV, 0x00a5);
154*3fc7acebSHendrik Brueckner CPUMF_EVENT_ATTR(cf_z13, L1I_ONNODE_L3_SOURCED_WRITES, 0x00a6);
155*3fc7acebSHendrik Brueckner CPUMF_EVENT_ATTR(cf_z13, L1I_ONDRAWER_L4_SOURCED_WRITES, 0x00a7);
156*3fc7acebSHendrik Brueckner CPUMF_EVENT_ATTR(cf_z13, L1I_ONDRAWER_L3_SOURCED_WRITES_IV, 0x00a8);
157*3fc7acebSHendrik Brueckner CPUMF_EVENT_ATTR(cf_z13, L1I_ONDRAWER_L3_SOURCED_WRITES, 0x00a9);
158*3fc7acebSHendrik Brueckner CPUMF_EVENT_ATTR(cf_z13, L1I_OFFDRAWER_SCOL_L4_SOURCED_WRITES, 0x00aa);
159*3fc7acebSHendrik Brueckner CPUMF_EVENT_ATTR(cf_z13, L1I_OFFDRAWER_SCOL_L3_SOURCED_WRITES_IV, 0x00ab);
160*3fc7acebSHendrik Brueckner CPUMF_EVENT_ATTR(cf_z13, L1I_OFFDRAWER_SCOL_L3_SOURCED_WRITES, 0x00ac);
161*3fc7acebSHendrik Brueckner CPUMF_EVENT_ATTR(cf_z13, L1I_OFFDRAWER_FCOL_L4_SOURCED_WRITES, 0x00ad);
162*3fc7acebSHendrik Brueckner CPUMF_EVENT_ATTR(cf_z13, L1I_OFFDRAWER_FCOL_L3_SOURCED_WRITES_IV, 0x00ae);
163*3fc7acebSHendrik Brueckner CPUMF_EVENT_ATTR(cf_z13, L1I_OFFDRAWER_FCOL_L3_SOURCED_WRITES, 0x00af);
164*3fc7acebSHendrik Brueckner CPUMF_EVENT_ATTR(cf_z13, L1I_ONNODE_MEM_SOURCED_WRITES, 0x00b0);
165*3fc7acebSHendrik Brueckner CPUMF_EVENT_ATTR(cf_z13, L1I_ONDRAWER_MEM_SOURCED_WRITES, 0x00b1);
166*3fc7acebSHendrik Brueckner CPUMF_EVENT_ATTR(cf_z13, L1I_OFFDRAWER_MEM_SOURCED_WRITES, 0x00b2);
167*3fc7acebSHendrik Brueckner CPUMF_EVENT_ATTR(cf_z13, L1I_ONCHIP_MEM_SOURCED_WRITES, 0x00b3);
168*3fc7acebSHendrik Brueckner CPUMF_EVENT_ATTR(cf_z13, TX_NC_TABORT, 0x00da);
169*3fc7acebSHendrik Brueckner CPUMF_EVENT_ATTR(cf_z13, TX_C_TABORT_NO_SPECIAL, 0x00db);
170*3fc7acebSHendrik Brueckner CPUMF_EVENT_ATTR(cf_z13, TX_C_TABORT_SPECIAL, 0x00dc);
171*3fc7acebSHendrik Brueckner CPUMF_EVENT_ATTR(cf_z13, MT_DIAG_CYCLES_ONE_THR_ACTIVE, 0x01c0);
172*3fc7acebSHendrik Brueckner CPUMF_EVENT_ATTR(cf_z13, MT_DIAG_CYCLES_TWO_THR_ACTIVE, 0x01c1);
173c7168325SHendrik Brueckner 
174*3fc7acebSHendrik Brueckner static struct attribute *cpumcf_pmu_event_attr[] __initdata = {
175c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf, CPU_CYCLES),
176c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf, INSTRUCTIONS),
177c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf, L1I_DIR_WRITES),
178c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf, L1I_PENALTY_CYCLES),
179c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf, PROBLEM_STATE_CPU_CYCLES),
180c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf, PROBLEM_STATE_INSTRUCTIONS),
181c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf, PROBLEM_STATE_L1I_DIR_WRITES),
182c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf, PROBLEM_STATE_L1I_PENALTY_CYCLES),
183c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf, PROBLEM_STATE_L1D_DIR_WRITES),
184c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf, PROBLEM_STATE_L1D_PENALTY_CYCLES),
185c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf, L1D_DIR_WRITES),
186c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf, L1D_PENALTY_CYCLES),
187c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf, PRNG_FUNCTIONS),
188c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf, PRNG_CYCLES),
189c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf, PRNG_BLOCKED_FUNCTIONS),
190c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf, PRNG_BLOCKED_CYCLES),
191c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf, SHA_FUNCTIONS),
192c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf, SHA_CYCLES),
193c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf, SHA_BLOCKED_FUNCTIONS),
194c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf, SHA_BLOCKED_CYCLES),
195c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf, DEA_FUNCTIONS),
196c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf, DEA_CYCLES),
197c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf, DEA_BLOCKED_FUNCTIONS),
198c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf, DEA_BLOCKED_CYCLES),
199c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf, AES_FUNCTIONS),
200c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf, AES_CYCLES),
201c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf, AES_BLOCKED_FUNCTIONS),
202c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf, AES_BLOCKED_CYCLES),
203c7168325SHendrik Brueckner 	NULL,
204c7168325SHendrik Brueckner };
205c7168325SHendrik Brueckner 
206c7168325SHendrik Brueckner static struct attribute *cpumcf_z10_pmu_event_attr[] __initdata = {
207c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z10, L1I_L2_SOURCED_WRITES),
208c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z10, L1D_L2_SOURCED_WRITES),
209c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z10, L1I_L3_LOCAL_WRITES),
210c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z10, L1D_L3_LOCAL_WRITES),
211c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z10, L1I_L3_REMOTE_WRITES),
212c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z10, L1D_L3_REMOTE_WRITES),
213c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z10, L1D_LMEM_SOURCED_WRITES),
214c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z10, L1I_LMEM_SOURCED_WRITES),
215c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z10, L1D_RO_EXCL_WRITES),
216c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z10, L1I_CACHELINE_INVALIDATES),
217c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z10, ITLB1_WRITES),
218c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z10, DTLB1_WRITES),
219c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z10, TLB2_PTE_WRITES),
220c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z10, TLB2_CRSTE_WRITES),
221c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z10, TLB2_CRSTE_HPAGE_WRITES),
222c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z10, ITLB1_MISSES),
223c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z10, DTLB1_MISSES),
224c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z10, L2C_STORES_SENT),
225c7168325SHendrik Brueckner 	NULL,
226c7168325SHendrik Brueckner };
227c7168325SHendrik Brueckner 
228c7168325SHendrik Brueckner static struct attribute *cpumcf_z196_pmu_event_attr[] __initdata = {
229c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z196, L1D_L2_SOURCED_WRITES),
230c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z196, L1I_L2_SOURCED_WRITES),
231c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z196, DTLB1_MISSES),
232c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z196, ITLB1_MISSES),
233c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z196, L2C_STORES_SENT),
234c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z196, L1D_OFFBOOK_L3_SOURCED_WRITES),
235c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z196, L1D_ONBOOK_L4_SOURCED_WRITES),
236c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z196, L1I_ONBOOK_L4_SOURCED_WRITES),
237c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z196, L1D_RO_EXCL_WRITES),
238c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z196, L1D_OFFBOOK_L4_SOURCED_WRITES),
239c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z196, L1I_OFFBOOK_L4_SOURCED_WRITES),
240c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z196, DTLB1_HPAGE_WRITES),
241c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z196, L1D_LMEM_SOURCED_WRITES),
242c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z196, L1I_LMEM_SOURCED_WRITES),
243c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z196, L1I_OFFBOOK_L3_SOURCED_WRITES),
244c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z196, DTLB1_WRITES),
245c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z196, ITLB1_WRITES),
246c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z196, TLB2_PTE_WRITES),
247c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z196, TLB2_CRSTE_HPAGE_WRITES),
248c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z196, TLB2_CRSTE_WRITES),
249c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z196, L1D_ONCHIP_L3_SOURCED_WRITES),
250c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z196, L1D_OFFCHIP_L3_SOURCED_WRITES),
251c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z196, L1I_ONCHIP_L3_SOURCED_WRITES),
252c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z196, L1I_OFFCHIP_L3_SOURCED_WRITES),
253c7168325SHendrik Brueckner 	NULL,
254c7168325SHendrik Brueckner };
255c7168325SHendrik Brueckner 
256c7168325SHendrik Brueckner static struct attribute *cpumcf_zec12_pmu_event_attr[] __initdata = {
257c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_zec12, DTLB1_MISSES),
258c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_zec12, ITLB1_MISSES),
259c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_zec12, L1D_L2I_SOURCED_WRITES),
260c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_zec12, L1I_L2I_SOURCED_WRITES),
261c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_zec12, L1D_L2D_SOURCED_WRITES),
262c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_zec12, DTLB1_WRITES),
263c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_zec12, L1D_LMEM_SOURCED_WRITES),
264c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_zec12, L1I_LMEM_SOURCED_WRITES),
265c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_zec12, L1D_RO_EXCL_WRITES),
266c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_zec12, DTLB1_HPAGE_WRITES),
267c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_zec12, ITLB1_WRITES),
268c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_zec12, TLB2_PTE_WRITES),
269c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_zec12, TLB2_CRSTE_HPAGE_WRITES),
270c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_zec12, TLB2_CRSTE_WRITES),
271c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_zec12, L1D_ONCHIP_L3_SOURCED_WRITES),
272c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_zec12, L1D_OFFCHIP_L3_SOURCED_WRITES),
273c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_zec12, L1D_OFFBOOK_L3_SOURCED_WRITES),
274c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_zec12, L1D_ONBOOK_L4_SOURCED_WRITES),
275c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_zec12, L1D_OFFBOOK_L4_SOURCED_WRITES),
276c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_zec12, TX_NC_TEND),
277c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_zec12, L1D_ONCHIP_L3_SOURCED_WRITES_IV),
278c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_zec12, L1D_OFFCHIP_L3_SOURCED_WRITES_IV),
279c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_zec12, L1D_OFFBOOK_L3_SOURCED_WRITES_IV),
280c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_zec12, L1I_ONCHIP_L3_SOURCED_WRITES),
281c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_zec12, L1I_OFFCHIP_L3_SOURCED_WRITES),
282c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_zec12, L1I_OFFBOOK_L3_SOURCED_WRITES),
283c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_zec12, L1I_ONBOOK_L4_SOURCED_WRITES),
284c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_zec12, L1I_OFFBOOK_L4_SOURCED_WRITES),
285c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_zec12, TX_C_TEND),
286c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_zec12, L1I_ONCHIP_L3_SOURCED_WRITES_IV),
287c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_zec12, L1I_OFFCHIP_L3_SOURCED_WRITES_IV),
288c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_zec12, L1I_OFFBOOK_L3_SOURCED_WRITES_IV),
289c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_zec12, TX_NC_TABORT),
290c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_zec12, TX_C_TABORT_NO_SPECIAL),
291c7168325SHendrik Brueckner 	CPUMF_EVENT_PTR(cf_zec12, TX_C_TABORT_SPECIAL),
292c7168325SHendrik Brueckner 	NULL,
293c7168325SHendrik Brueckner };
294c7168325SHendrik Brueckner 
295*3fc7acebSHendrik Brueckner static struct attribute *cpumcf_z13_pmu_event_attr[] __initdata = {
296*3fc7acebSHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z13, L1D_WRITES_RO_EXCL),
297*3fc7acebSHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z13, DTLB1_WRITES),
298*3fc7acebSHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z13, DTLB1_MISSES),
299*3fc7acebSHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z13, DTLB1_HPAGE_WRITES),
300*3fc7acebSHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z13, DTLB1_GPAGE_WRITES),
301*3fc7acebSHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z13, L1D_L2D_SOURCED_WRITES),
302*3fc7acebSHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z13, ITLB1_WRITES),
303*3fc7acebSHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z13, ITLB1_MISSES),
304*3fc7acebSHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z13, L1I_L2I_SOURCED_WRITES),
305*3fc7acebSHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z13, TLB2_PTE_WRITES),
306*3fc7acebSHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z13, TLB2_CRSTE_HPAGE_WRITES),
307*3fc7acebSHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z13, TLB2_CRSTE_WRITES),
308*3fc7acebSHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z13, TX_C_TEND),
309*3fc7acebSHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z13, TX_NC_TEND),
310*3fc7acebSHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z13, L1C_TLB1_MISSES),
311*3fc7acebSHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z13, L1D_ONCHIP_L3_SOURCED_WRITES),
312*3fc7acebSHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z13, L1D_ONCHIP_L3_SOURCED_WRITES_IV),
313*3fc7acebSHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z13, L1D_ONNODE_L4_SOURCED_WRITES),
314*3fc7acebSHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z13, L1D_ONNODE_L3_SOURCED_WRITES_IV),
315*3fc7acebSHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z13, L1D_ONNODE_L3_SOURCED_WRITES),
316*3fc7acebSHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z13, L1D_ONDRAWER_L4_SOURCED_WRITES),
317*3fc7acebSHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z13, L1D_ONDRAWER_L3_SOURCED_WRITES_IV),
318*3fc7acebSHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z13, L1D_ONDRAWER_L3_SOURCED_WRITES),
319*3fc7acebSHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z13, L1D_OFFDRAWER_SCOL_L4_SOURCED_WRITES),
320*3fc7acebSHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z13, L1D_OFFDRAWER_SCOL_L3_SOURCED_WRITES_IV),
321*3fc7acebSHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z13, L1D_OFFDRAWER_SCOL_L3_SOURCED_WRITES),
322*3fc7acebSHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z13, L1D_OFFDRAWER_FCOL_L4_SOURCED_WRITES),
323*3fc7acebSHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z13, L1D_OFFDRAWER_FCOL_L3_SOURCED_WRITES_IV),
324*3fc7acebSHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z13, L1D_OFFDRAWER_FCOL_L3_SOURCED_WRITES),
325*3fc7acebSHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z13, L1D_ONNODE_MEM_SOURCED_WRITES),
326*3fc7acebSHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z13, L1D_ONDRAWER_MEM_SOURCED_WRITES),
327*3fc7acebSHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z13, L1D_OFFDRAWER_MEM_SOURCED_WRITES),
328*3fc7acebSHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z13, L1D_ONCHIP_MEM_SOURCED_WRITES),
329*3fc7acebSHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z13, L1I_ONCHIP_L3_SOURCED_WRITES),
330*3fc7acebSHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z13, L1I_ONCHIP_L3_SOURCED_WRITES_IV),
331*3fc7acebSHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z13, L1I_ONNODE_L4_SOURCED_WRITES),
332*3fc7acebSHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z13, L1I_ONNODE_L3_SOURCED_WRITES_IV),
333*3fc7acebSHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z13, L1I_ONNODE_L3_SOURCED_WRITES),
334*3fc7acebSHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z13, L1I_ONDRAWER_L4_SOURCED_WRITES),
335*3fc7acebSHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z13, L1I_ONDRAWER_L3_SOURCED_WRITES_IV),
336*3fc7acebSHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z13, L1I_ONDRAWER_L3_SOURCED_WRITES),
337*3fc7acebSHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z13, L1I_OFFDRAWER_SCOL_L4_SOURCED_WRITES),
338*3fc7acebSHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z13, L1I_OFFDRAWER_SCOL_L3_SOURCED_WRITES_IV),
339*3fc7acebSHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z13, L1I_OFFDRAWER_SCOL_L3_SOURCED_WRITES),
340*3fc7acebSHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z13, L1I_OFFDRAWER_FCOL_L4_SOURCED_WRITES),
341*3fc7acebSHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z13, L1I_OFFDRAWER_FCOL_L3_SOURCED_WRITES_IV),
342*3fc7acebSHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z13, L1I_OFFDRAWER_FCOL_L3_SOURCED_WRITES),
343*3fc7acebSHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z13, L1I_ONNODE_MEM_SOURCED_WRITES),
344*3fc7acebSHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z13, L1I_ONDRAWER_MEM_SOURCED_WRITES),
345*3fc7acebSHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z13, L1I_OFFDRAWER_MEM_SOURCED_WRITES),
346*3fc7acebSHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z13, L1I_ONCHIP_MEM_SOURCED_WRITES),
347*3fc7acebSHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z13, TX_NC_TABORT),
348*3fc7acebSHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z13, TX_C_TABORT_NO_SPECIAL),
349*3fc7acebSHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z13, TX_C_TABORT_SPECIAL),
350*3fc7acebSHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z13, MT_DIAG_CYCLES_ONE_THR_ACTIVE),
351*3fc7acebSHendrik Brueckner 	CPUMF_EVENT_PTR(cf_z13, MT_DIAG_CYCLES_TWO_THR_ACTIVE),
352*3fc7acebSHendrik Brueckner 	NULL,
353*3fc7acebSHendrik Brueckner };
354*3fc7acebSHendrik Brueckner 
355c7168325SHendrik Brueckner /* END: CPUM_CF COUNTER DEFINITIONS ===================================== */
356c7168325SHendrik Brueckner 
357c7168325SHendrik Brueckner static struct attribute_group cpumsf_pmu_events_group = {
358c7168325SHendrik Brueckner 	.name = "events",
359c7168325SHendrik Brueckner };
360c7168325SHendrik Brueckner 
361c7168325SHendrik Brueckner PMU_FORMAT_ATTR(event, "config:0-63");
362c7168325SHendrik Brueckner 
363c7168325SHendrik Brueckner static struct attribute *cpumsf_pmu_format_attr[] = {
364c7168325SHendrik Brueckner 	&format_attr_event.attr,
365c7168325SHendrik Brueckner 	NULL,
366c7168325SHendrik Brueckner };
367c7168325SHendrik Brueckner 
368c7168325SHendrik Brueckner static struct attribute_group cpumsf_pmu_format_group = {
369c7168325SHendrik Brueckner 	.name = "format",
370c7168325SHendrik Brueckner 	.attrs = cpumsf_pmu_format_attr,
371c7168325SHendrik Brueckner };
372c7168325SHendrik Brueckner 
373c7168325SHendrik Brueckner static const struct attribute_group *cpumsf_pmu_attr_groups[] = {
374c7168325SHendrik Brueckner 	&cpumsf_pmu_events_group,
375c7168325SHendrik Brueckner 	&cpumsf_pmu_format_group,
376c7168325SHendrik Brueckner 	NULL,
377c7168325SHendrik Brueckner };
378c7168325SHendrik Brueckner 
379c7168325SHendrik Brueckner 
380c7168325SHendrik Brueckner static __init struct attribute **merge_attr(struct attribute **a,
381c7168325SHendrik Brueckner 					    struct attribute **b)
382c7168325SHendrik Brueckner {
383c7168325SHendrik Brueckner 	struct attribute **new;
384c7168325SHendrik Brueckner 	int j, i;
385c7168325SHendrik Brueckner 
386c7168325SHendrik Brueckner 	for (j = 0; a[j]; j++)
387c7168325SHendrik Brueckner 		;
388c7168325SHendrik Brueckner 	for (i = 0; b[i]; i++)
389c7168325SHendrik Brueckner 		j++;
390c7168325SHendrik Brueckner 	j++;
391c7168325SHendrik Brueckner 
392c7168325SHendrik Brueckner 	new = kmalloc(sizeof(struct attribute *) * j, GFP_KERNEL);
393c7168325SHendrik Brueckner 	if (!new)
394c7168325SHendrik Brueckner 		return NULL;
395c7168325SHendrik Brueckner 	j = 0;
396c7168325SHendrik Brueckner 	for (i = 0; a[i]; i++)
397c7168325SHendrik Brueckner 		new[j++] = a[i];
398c7168325SHendrik Brueckner 	for (i = 0; b[i]; i++)
399c7168325SHendrik Brueckner 		new[j++] = b[i];
400c7168325SHendrik Brueckner 	new[j] = NULL;
401c7168325SHendrik Brueckner 
402c7168325SHendrik Brueckner 	return new;
403c7168325SHendrik Brueckner }
404c7168325SHendrik Brueckner 
405c7168325SHendrik Brueckner __init const struct attribute_group **cpumf_cf_event_group(void)
406c7168325SHendrik Brueckner {
407c7168325SHendrik Brueckner 	struct attribute **combined, **model;
408*3fc7acebSHendrik Brueckner 	struct attribute *none[] = { NULL };
409c7168325SHendrik Brueckner 	struct cpuid cpu_id;
410c7168325SHendrik Brueckner 
411c7168325SHendrik Brueckner 	get_cpu_id(&cpu_id);
412c7168325SHendrik Brueckner 	switch (cpu_id.machine) {
413c7168325SHendrik Brueckner 	case 0x2097:
414c7168325SHendrik Brueckner 	case 0x2098:
415c7168325SHendrik Brueckner 		model = cpumcf_z10_pmu_event_attr;
416c7168325SHendrik Brueckner 		break;
417c7168325SHendrik Brueckner 	case 0x2817:
418c7168325SHendrik Brueckner 	case 0x2818:
419c7168325SHendrik Brueckner 		model = cpumcf_z196_pmu_event_attr;
420c7168325SHendrik Brueckner 		break;
421c7168325SHendrik Brueckner 	case 0x2827:
422c7168325SHendrik Brueckner 	case 0x2828:
423c7168325SHendrik Brueckner 		model = cpumcf_zec12_pmu_event_attr;
424c7168325SHendrik Brueckner 		break;
425*3fc7acebSHendrik Brueckner 	case 0x2964:
426*3fc7acebSHendrik Brueckner 	case 0x2965:
427*3fc7acebSHendrik Brueckner 		model = cpumcf_z13_pmu_event_attr;
428*3fc7acebSHendrik Brueckner 		break;
429c7168325SHendrik Brueckner 	default:
430*3fc7acebSHendrik Brueckner 		model = none;
431c7168325SHendrik Brueckner 		break;
4320b925159SHeiko Carstens 	}
433c7168325SHendrik Brueckner 
434c7168325SHendrik Brueckner 	combined = merge_attr(cpumcf_pmu_event_attr, model);
435c7168325SHendrik Brueckner 	if (combined)
436c7168325SHendrik Brueckner 		cpumsf_pmu_events_group.attrs = combined;
437c7168325SHendrik Brueckner 	return cpumsf_pmu_attr_groups;
438c7168325SHendrik Brueckner }
439