id->cpu, i, level, resp);
for (j = 0; j < 4; ++j) {
- bucket_info[j + (i * 4)].high_priority_cores_count =
+ bucket_info[j + (i * 4)].hp_cores =
(resp >> (j * 8)) & 0xff;
}
}
id->cpu, i, level, k, resp);
for (j = 0; j < 4; ++j) {
- switch (k) {
- case 0:
- bucket_info[j + (i * 4)].sse_trl =
- (resp >> (j * 8)) & 0xff;
- break;
- case 1:
- bucket_info[j + (i * 4)].avx_trl =
- (resp >> (j * 8)) & 0xff;
- break;
- case 2:
- bucket_info[j + (i * 4)].avx512_trl =
- (resp >> (j * 8)) & 0xff;
- break;
- default:
- break;
- }
+ bucket_info[j + (i * 4)].hp_ratios[k] =
+ (resp >> (j * 8)) & 0xff;
}
}
}
debug_printf("cpu:%d CONFIG_TDP_GET_FACT_LP_CLIPPING_RATIO resp:%x\n",
id->cpu, resp);
- fact_info->lp_clipping_ratio_license_sse = resp & 0xff;
- fact_info->lp_clipping_ratio_license_avx2 = (resp >> 8) & 0xff;
- fact_info->lp_clipping_ratio_license_avx512 = (resp >> 16) & 0xff;
+ fact_info->lp_ratios[0] = resp & 0xff;
+ fact_info->lp_ratios[1] = (resp >> 8) & 0xff;
+ fact_info->lp_ratios[2] = (resp >> 16) & 0xff;
ret = isst_get_fact_bucket_info(id, level, fact_info->bucket_info);
if (ret)
if (fact_bucket != 0xff && fact_bucket != j)
continue;
- if (!fact_info->bucket_info[j].high_priority_cores_count)
+ if (!fact_info->bucket_info[j].hp_cores)
break;
print = 1;
int base_level)
{
struct isst_fact_bucket_info *bucket_info = fact_info->bucket_info;
+ int trl_max_levels = isst_get_trl_max_levels();
char header[256];
char value[256];
int print = 0, j;
if (fact_bucket != 0xff && fact_bucket != j)
continue;
- if (!bucket_info[j].high_priority_cores_count)
+ if (!bucket_info[j].hp_cores)
break;
print = 1;
snprintf(header, sizeof(header), "speed-select-turbo-freq-properties");
format_and_print(outf, base_level, header, NULL);
for (j = 0; j < ISST_FACT_MAX_BUCKETS; ++j) {
+ int i;
+
if (fact_bucket != 0xff && fact_bucket != j)
continue;
- if (!bucket_info[j].high_priority_cores_count)
+ if (!bucket_info[j].hp_cores)
break;
snprintf(header, sizeof(header), "bucket-%d", j);
snprintf(header, sizeof(header), "high-priority-cores-count");
snprintf(value, sizeof(value), "%d",
- bucket_info[j].high_priority_cores_count);
+ bucket_info[j].hp_cores);
format_and_print(outf, base_level + 2, header, value);
-
- if (fact_avx & 0x01) {
- snprintf(header, sizeof(header),
- "high-priority-max-frequency(MHz)");
- snprintf(value, sizeof(value), "%d",
- bucket_info[j].sse_trl * DISP_FREQ_MULTIPLIER);
- format_and_print(outf, base_level + 2, header, value);
- }
-
- if (fact_avx & 0x02) {
- snprintf(header, sizeof(header),
- "high-priority-max-avx2-frequency(MHz)");
- snprintf(value, sizeof(value), "%d",
- bucket_info[j].avx_trl * DISP_FREQ_MULTIPLIER);
- format_and_print(outf, base_level + 2, header, value);
- }
-
- if (fact_avx & 0x04) {
- snprintf(header, sizeof(header),
- "high-priority-max-avx512-frequency(MHz)");
+ for (i = 0; i < trl_max_levels; i++) {
+ if (fact_avx != 0xFF && !(fact_avx & (1 << i)))
+ continue;
+ if (i == 0)
+ snprintf(header, sizeof(header),
+ "high-priority-max-frequency(MHz)");
+ else
+ snprintf(header, sizeof(header),
+ "high-priority-max-%s-frequency(MHz)", isst_get_trl_level_name(i));
snprintf(value, sizeof(value), "%d",
- bucket_info[j].avx512_trl *
- DISP_FREQ_MULTIPLIER);
+ bucket_info[j].hp_ratios[i] * DISP_FREQ_MULTIPLIER);
format_and_print(outf, base_level + 2, header, value);
}
}
snprintf(header, sizeof(header),
"speed-select-turbo-freq-clip-frequencies");
format_and_print(outf, base_level + 1, header, NULL);
- snprintf(header, sizeof(header), "low-priority-max-frequency(MHz)");
- snprintf(value, sizeof(value), "%d",
- fact_info->lp_clipping_ratio_license_sse *
- DISP_FREQ_MULTIPLIER);
- format_and_print(outf, base_level + 2, header, value);
- snprintf(header, sizeof(header),
- "low-priority-max-avx2-frequency(MHz)");
- snprintf(value, sizeof(value), "%d",
- fact_info->lp_clipping_ratio_license_avx2 *
- DISP_FREQ_MULTIPLIER);
- format_and_print(outf, base_level + 2, header, value);
- snprintf(header, sizeof(header),
- "low-priority-max-avx512-frequency(MHz)");
- snprintf(value, sizeof(value), "%d",
- fact_info->lp_clipping_ratio_license_avx512 *
- DISP_FREQ_MULTIPLIER);
- format_and_print(outf, base_level + 2, header, value);
+
+ for (j = 0; j < trl_max_levels; j++) {
+ /* No AVX level name for SSE to be consistent with previous formatting */
+ if (j == 0)
+ snprintf(header, sizeof(header), "low-priority-max-frequency(MHz)");
+ else
+ snprintf(header, sizeof(header), "low-priority-max-%s-frequency(MHz)",
+ isst_get_trl_level_name(j));
+ snprintf(value, sizeof(value), "%d",
+ fact_info->lp_ratios[j] * DISP_FREQ_MULTIPLIER);
+ format_and_print(outf, base_level + 2, header, value);
+ }
}
void isst_ctdp_display_core_info(struct isst_id *id, FILE *outf, char *prefix,