|
8 | 8 |
|
9 | 9 | #define DISP_FREQ_MULTIPLIER 100
|
10 | 10 |
|
| 11 | +static void printcpulist(int str_len, char *str, int mask_size, |
| 12 | + cpu_set_t *cpu_mask) |
| 13 | +{ |
| 14 | + int i, first, curr_index, index; |
| 15 | + |
| 16 | + if (!CPU_COUNT_S(mask_size, cpu_mask)) { |
| 17 | + snprintf(str, str_len, "none"); |
| 18 | + return; |
| 19 | + } |
| 20 | + |
| 21 | + curr_index = 0; |
| 22 | + first = 1; |
| 23 | + for (i = 0; i < get_topo_max_cpus(); ++i) { |
| 24 | + if (!CPU_ISSET_S(i, mask_size, cpu_mask)) |
| 25 | + continue; |
| 26 | + if (!first) { |
| 27 | + index = snprintf(&str[curr_index], |
| 28 | + str_len - curr_index, ","); |
| 29 | + curr_index += index; |
| 30 | + } |
| 31 | + index = snprintf(&str[curr_index], str_len - curr_index, "%d", |
| 32 | + i); |
| 33 | + curr_index += index; |
| 34 | + first = 0; |
| 35 | + } |
| 36 | +} |
| 37 | + |
11 | 38 | static void printcpumask(int str_len, char *str, int mask_size,
|
12 | 39 | cpu_set_t *cpu_mask)
|
13 | 40 | {
|
@@ -166,6 +193,12 @@ static void _isst_pbf_display_information(int cpu, FILE *outf, int level,
|
166 | 193 | pbf_info->core_cpumask);
|
167 | 194 | format_and_print(outf, disp_level + 1, header, value);
|
168 | 195 |
|
| 196 | + snprintf(header, sizeof(header), "high-priority-cpu-list"); |
| 197 | + printcpulist(sizeof(value), value, |
| 198 | + pbf_info->core_cpumask_size, |
| 199 | + pbf_info->core_cpumask); |
| 200 | + format_and_print(outf, disp_level + 1, header, value); |
| 201 | + |
169 | 202 | snprintf(header, sizeof(header), "low-priority-base-frequency(MHz)");
|
170 | 203 | snprintf(value, sizeof(value), "%d",
|
171 | 204 | pbf_info->p1_low * DISP_FREQ_MULTIPLIER);
|
@@ -287,6 +320,12 @@ void isst_ctdp_display_information(int cpu, FILE *outf, int tdp_level,
|
287 | 320 | ctdp_level->core_cpumask);
|
288 | 321 | format_and_print(outf, base_level + 4, header, value);
|
289 | 322 |
|
| 323 | + snprintf(header, sizeof(header), "enable-cpu-list"); |
| 324 | + printcpulist(sizeof(value), value, |
| 325 | + ctdp_level->core_cpumask_size, |
| 326 | + ctdp_level->core_cpumask); |
| 327 | + format_and_print(outf, base_level + 4, header, value); |
| 328 | + |
290 | 329 | snprintf(header, sizeof(header), "thermal-design-power-ratio");
|
291 | 330 | snprintf(value, sizeof(value), "%d", ctdp_level->tdp_ratio);
|
292 | 331 | format_and_print(outf, base_level + 4, header, value);
|
|
0 commit comments