Lines Matching +full:extended +full:- +full:range +full:- +full:enable

1 /* SPDX-License-Identifier: GPL-2.0 */
3 * CPU-measurement facilities
13 #include <linux/kmsan-checks.h>
14 #include <asm/asm-extable.h>
18 asm(".include \"asm/cpu_mf-insn.h\"\n");
61 unsigned int b0_13:14; /* 0-13: zeros */
62 unsigned int as:1; /* 14: basic-sampling authorization */
63 unsigned int ad:1; /* 15: diag-sampling authorization */
64 unsigned int b16_21:6; /* 16-21: zeros */
65 unsigned int es:1; /* 22: basic-sampling enable control */
66 unsigned int ed:1; /* 23: diag-sampling enable control */
67 unsigned int b24_29:6; /* 24-29: zeros */
68 unsigned int cs:1; /* 30: basic-sampling activation control */
69 unsigned int cd:1; /* 31: diag-sampling activation control */
70 unsigned int bsdes:16; /* 4-5: size of basic sampling entry */
71 unsigned int dsdes:16; /* 6-7: size of diagnostic sampling entry */
72 unsigned long min_sampl_rate; /* 8-15: minimum sampling interval */
73 unsigned long max_sampl_rate; /* 16-23: maximum sampling interval*/
74 unsigned long tear; /* 24-31: TEAR contents */
75 unsigned long dear; /* 32-39: DEAR contents */
76 unsigned int rsvrd0:24; /* 40-42: reserved */
78 unsigned int cpu_speed; /* 44-47: CPU speed */
79 unsigned long long rsvrd1; /* 48-55: reserved */
80 unsigned long long rsvrd2; /* 56-63: reserved */
87 unsigned long long b2_53:52;/* 2-53: zeros */
88 unsigned int es:1; /* 54: basic-sampling enable control */
89 unsigned int ed:1; /* 55: diag-sampling enable control */
90 unsigned int b56_61:6; /* 56-61: - zeros */
91 unsigned int cs:1; /* 62: basic-sampling activation control */
92 unsigned int cd:1; /* 63: diag-sampling activation control */
93 unsigned long interval; /* 8-15: sampling interval */
94 unsigned long tear; /* 16-23: TEAR contents */
95 unsigned long dear; /* 24-31: DEAR contents */
96 /* 32-63: */
104 unsigned int def:16; /* 0-15 Data Entry Format */
105 unsigned int R:4; /* 16-19 reserved */
106 unsigned int U:4; /* 20-23 Number of unique instruct. */
111 unsigned int AS:2; /* 29-30 PSW address-space control */
113 unsigned int CL:2; /* 32-33 Configuration Level */
124 unsigned int def:16; /* 0-15 Data Entry Format */
125 unsigned int R:15; /* 16-19 and 20-30 reserved */
127 u8 data[]; /* Machine-dependent sample data */
131 struct hws_basic_entry basic; /* Basic-sampling data entry */
132 struct hws_diag_entry diag; /* Diagnostic-sampling data entry */
137 unsigned int f:1; /* 0 - Block Full Indicator */
138 unsigned int a:1; /* 1 - Alert request control */
139 unsigned int t:1; /* 2 - Timestamp format */
140 unsigned int :29; /* 3 - 31: Reserved */
141 unsigned int bsdes:16; /* 32-47: size of basic SDE */
142 unsigned int dsdes:16; /* 48-63: size of diagnostic SDE */
143 unsigned long long overflow; /* 64 - Overflow Count */
149 union hws_trailer_header header; /* 0 - 15 Flags + Overflow Count */
150 unsigned char timestamp[16]; /* 16 - 31 timestamp */
151 unsigned long long reserved1; /* 32 -Reserved */
153 union { /* 48 - reserved for programming use */
172 int rc = -EINVAL; in qctri()
183 /* Load CPU-counter-set controls */
227 EXTENDED = 0, enumerator
232 MT_DIAG_CLEARING = 9, /* clears loss-of-MT-ctr-data alert */
235 static __always_inline int stcctm(enum stcctm_ctr_set set, u64 range, u64 *dest) in stcctm() argument
240 " STCCTM %[range],%[set],%[dest]\n" in stcctm()
243 : [dest] "Q" (*dest), [range] "d" (range), [set] "i" (set) in stcctm()
246 * If cc == 2, less than RANGE counters are stored, but it's not easy in stcctm()
247 * to tell how many. Always unpoison the whole range for simplicity. in stcctm()
249 kmsan_unpoison_memory(dest, range * sizeof(u64)); in stcctm()
264 return cc ? -EINVAL : 0; in qsi()
283 return -EINVAL; in lsctl()