Skip to content

Commit 751bcc0

Browse files
committed
Merge branch 'intel-sst' of https://github.com/spandruvada/linux-kernel into for-next
2 parents 9f080c9 + 6dfe26c commit 751bcc0

File tree

4 files changed

+48
-2
lines changed

4 files changed

+48
-2
lines changed

tools/power/x86/intel-speed-select/isst-config.c

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ struct process_cmd_struct {
1616
int arg;
1717
};
1818

19-
static const char *version_str = "v1.22";
19+
static const char *version_str = "v1.23";
2020

2121
static const int supported_api_ver = 3;
2222
static struct isst_if_platform_info isst_platform_info;
@@ -26,6 +26,7 @@ static FILE *outf;
2626

2727
static int cpu_model;
2828
static int cpu_stepping;
29+
static int extended_family;
2930

3031
#define MAX_CPUS_IN_ONE_REQ 512
3132
static short max_target_cpus;
@@ -143,13 +144,22 @@ int is_icx_platform(void)
143144
return 0;
144145
}
145146

147+
static int is_dmr_plus_platform(void)
148+
{
149+
if (extended_family == 0x04)
150+
return 1;
151+
152+
return 0;
153+
}
154+
146155
static int update_cpu_model(void)
147156
{
148157
unsigned int ebx, ecx, edx;
149158
unsigned int fms, family;
150159

151160
__cpuid(1, fms, ebx, ecx, edx);
152161
family = (fms >> 8) & 0xf;
162+
extended_family = (fms >> 20) & 0x0f;
153163
cpu_model = (fms >> 4) & 0xf;
154164
if (family == 6 || family == 0xf)
155165
cpu_model += ((fms >> 16) & 0xf) << 4;
@@ -1517,7 +1527,8 @@ static void set_tdp_level_for_cpu(struct isst_id *id, void *arg1, void *arg2, vo
15171527
usleep(2000);
15181528

15191529
/* Adjusting uncore freq */
1520-
isst_adjust_uncore_freq(id, tdp_level, &ctdp_level);
1530+
if (!is_dmr_plus_platform())
1531+
isst_adjust_uncore_freq(id, tdp_level, &ctdp_level);
15211532

15221533
fprintf(stderr, "Option is set to online/offline\n");
15231534
ctdp_level.core_cpumask_size =

tools/power/x86/intel-speed-select/isst-core-tpmi.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,7 @@ static int tpmi_get_ctdp_control(struct isst_id *id, int config_index,
227227
static int tpmi_get_tdp_info(struct isst_id *id, int config_index,
228228
struct isst_pkg_ctdp_level_info *ctdp_level)
229229
{
230+
struct isst_perf_level_fabric_info fabric_info;
230231
struct isst_perf_level_data_info info;
231232
int ret;
232233

@@ -253,6 +254,17 @@ static int tpmi_get_tdp_info(struct isst_id *id, int config_index,
253254
ctdp_level->uncore_p1 = info.p1_fabric_freq_mhz;
254255
ctdp_level->uncore_pm = info.pm_fabric_freq_mhz;
255256

257+
fabric_info.socket_id = id->pkg;
258+
fabric_info.power_domain_id = id->punit;
259+
fabric_info.level = config_index;
260+
261+
ret = tpmi_process_ioctl(ISST_IF_GET_PERF_LEVEL_FABRIC_INFO, &fabric_info);
262+
if (ret != -1) {
263+
ctdp_level->uncore1_p0 = fabric_info.p0_fabric_freq_mhz[1];
264+
ctdp_level->uncore1_p1 = fabric_info.p1_fabric_freq_mhz[1];
265+
ctdp_level->uncore1_pm = fabric_info.pm_fabric_freq_mhz[1];
266+
}
267+
256268
debug_printf
257269
("cpu:%d ctdp:%d CONFIG_TDP_GET_TDP_INFO tdp_ratio:%d pkg_tdp:%d ctdp_level->t_proc_hot:%d\n",
258270
id->cpu, config_index, ctdp_level->tdp_ratio, ctdp_level->pkg_tdp,

tools/power/x86/intel-speed-select/isst-display.c

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -460,6 +460,26 @@ void isst_ctdp_display_information(struct isst_id *id, FILE *outf, int tdp_level
460460
format_and_print(outf, level + 2, header, value);
461461
}
462462

463+
if (ctdp_level->uncore1_p1) {
464+
snprintf(header, sizeof(header), "uncore-1-frequency-base(MHz)");
465+
snprintf(value, sizeof(value), "%d",
466+
ctdp_level->uncore1_p1 * isst_get_disp_freq_multiplier());
467+
format_and_print(outf, level + 2, header, value);
468+
}
469+
if (ctdp_level->uncore1_pm) {
470+
snprintf(header, sizeof(header), "uncore-1-frequency-min(MHz)");
471+
snprintf(value, sizeof(value), "%d",
472+
ctdp_level->uncore1_pm * isst_get_disp_freq_multiplier());
473+
format_and_print(outf, level + 2, header, value);
474+
}
475+
476+
if (ctdp_level->uncore1_p0) {
477+
snprintf(header, sizeof(header), "uncore-1-frequency-max(MHz)");
478+
snprintf(value, sizeof(value), "%d",
479+
ctdp_level->uncore1_p0 * isst_get_disp_freq_multiplier());
480+
format_and_print(outf, level + 2, header, value);
481+
}
482+
463483
if (ctdp_level->mem_freq) {
464484
snprintf(header, sizeof(header), "max-mem-frequency(MHz)");
465485
snprintf(value, sizeof(value), "%d",

tools/power/x86/intel-speed-select/isst.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,9 @@ struct isst_pkg_ctdp_level_info {
147147
int uncore_p0;
148148
int uncore_p1;
149149
int uncore_pm;
150+
int uncore1_p0;
151+
int uncore1_p1;
152+
int uncore1_pm;
150153
int sse_p1;
151154
int avx2_p1;
152155
int avx512_p1;

0 commit comments

Comments
 (0)