Merge branch 'intel-sst' of https://github.com/spandruvada/linux-kernel into for-next
This commit is contained in:
@@ -16,7 +16,7 @@ struct process_cmd_struct {
|
||||
int arg;
|
||||
};
|
||||
|
||||
static const char *version_str = "v1.22";
|
||||
static const char *version_str = "v1.23";
|
||||
|
||||
static const int supported_api_ver = 3;
|
||||
static struct isst_if_platform_info isst_platform_info;
|
||||
@@ -26,6 +26,7 @@ static FILE *outf;
|
||||
|
||||
static int cpu_model;
|
||||
static int cpu_stepping;
|
||||
static int extended_family;
|
||||
|
||||
#define MAX_CPUS_IN_ONE_REQ 512
|
||||
static short max_target_cpus;
|
||||
@@ -143,6 +144,14 @@ int is_icx_platform(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int is_dmr_plus_platform(void)
|
||||
{
|
||||
if (extended_family == 0x04)
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int update_cpu_model(void)
|
||||
{
|
||||
unsigned int ebx, ecx, edx;
|
||||
@@ -150,6 +159,7 @@ static int update_cpu_model(void)
|
||||
|
||||
__cpuid(1, fms, ebx, ecx, edx);
|
||||
family = (fms >> 8) & 0xf;
|
||||
extended_family = (fms >> 20) & 0x0f;
|
||||
cpu_model = (fms >> 4) & 0xf;
|
||||
if (family == 6 || family == 0xf)
|
||||
cpu_model += ((fms >> 16) & 0xf) << 4;
|
||||
@@ -1517,7 +1527,8 @@ display_result:
|
||||
usleep(2000);
|
||||
|
||||
/* Adjusting uncore freq */
|
||||
isst_adjust_uncore_freq(id, tdp_level, &ctdp_level);
|
||||
if (!is_dmr_plus_platform())
|
||||
isst_adjust_uncore_freq(id, tdp_level, &ctdp_level);
|
||||
|
||||
fprintf(stderr, "Option is set to online/offline\n");
|
||||
ctdp_level.core_cpumask_size =
|
||||
|
||||
@@ -227,6 +227,7 @@ static int tpmi_get_ctdp_control(struct isst_id *id, int config_index,
|
||||
static int tpmi_get_tdp_info(struct isst_id *id, int config_index,
|
||||
struct isst_pkg_ctdp_level_info *ctdp_level)
|
||||
{
|
||||
struct isst_perf_level_fabric_info fabric_info;
|
||||
struct isst_perf_level_data_info info;
|
||||
int ret;
|
||||
|
||||
@@ -253,6 +254,17 @@ static int tpmi_get_tdp_info(struct isst_id *id, int config_index,
|
||||
ctdp_level->uncore_p1 = info.p1_fabric_freq_mhz;
|
||||
ctdp_level->uncore_pm = info.pm_fabric_freq_mhz;
|
||||
|
||||
fabric_info.socket_id = id->pkg;
|
||||
fabric_info.power_domain_id = id->punit;
|
||||
fabric_info.level = config_index;
|
||||
|
||||
ret = tpmi_process_ioctl(ISST_IF_GET_PERF_LEVEL_FABRIC_INFO, &fabric_info);
|
||||
if (ret != -1) {
|
||||
ctdp_level->uncore1_p0 = fabric_info.p0_fabric_freq_mhz[1];
|
||||
ctdp_level->uncore1_p1 = fabric_info.p1_fabric_freq_mhz[1];
|
||||
ctdp_level->uncore1_pm = fabric_info.pm_fabric_freq_mhz[1];
|
||||
}
|
||||
|
||||
debug_printf
|
||||
("cpu:%d ctdp:%d CONFIG_TDP_GET_TDP_INFO tdp_ratio:%d pkg_tdp:%d ctdp_level->t_proc_hot:%d\n",
|
||||
id->cpu, config_index, ctdp_level->tdp_ratio, ctdp_level->pkg_tdp,
|
||||
|
||||
@@ -460,6 +460,26 @@ void isst_ctdp_display_information(struct isst_id *id, FILE *outf, int tdp_level
|
||||
format_and_print(outf, level + 2, header, value);
|
||||
}
|
||||
|
||||
if (ctdp_level->uncore1_p1) {
|
||||
snprintf(header, sizeof(header), "uncore-1-frequency-base(MHz)");
|
||||
snprintf(value, sizeof(value), "%d",
|
||||
ctdp_level->uncore1_p1 * isst_get_disp_freq_multiplier());
|
||||
format_and_print(outf, level + 2, header, value);
|
||||
}
|
||||
if (ctdp_level->uncore1_pm) {
|
||||
snprintf(header, sizeof(header), "uncore-1-frequency-min(MHz)");
|
||||
snprintf(value, sizeof(value), "%d",
|
||||
ctdp_level->uncore1_pm * isst_get_disp_freq_multiplier());
|
||||
format_and_print(outf, level + 2, header, value);
|
||||
}
|
||||
|
||||
if (ctdp_level->uncore1_p0) {
|
||||
snprintf(header, sizeof(header), "uncore-1-frequency-max(MHz)");
|
||||
snprintf(value, sizeof(value), "%d",
|
||||
ctdp_level->uncore1_p0 * isst_get_disp_freq_multiplier());
|
||||
format_and_print(outf, level + 2, header, value);
|
||||
}
|
||||
|
||||
if (ctdp_level->mem_freq) {
|
||||
snprintf(header, sizeof(header), "max-mem-frequency(MHz)");
|
||||
snprintf(value, sizeof(value), "%d",
|
||||
|
||||
@@ -147,6 +147,9 @@ struct isst_pkg_ctdp_level_info {
|
||||
int uncore_p0;
|
||||
int uncore_p1;
|
||||
int uncore_pm;
|
||||
int uncore1_p0;
|
||||
int uncore1_p1;
|
||||
int uncore1_pm;
|
||||
int sse_p1;
|
||||
int avx2_p1;
|
||||
int avx512_p1;
|
||||
|
||||
Reference in New Issue
Block a user