Skip to content

Commit 9ce9308

Browse files
committed
Merge remote-tracking branch 'intel-speed-select/intel-sst' into review-hans
2 parents b77b75f + 7244720 commit 9ce9308

File tree

2 files changed

+43
-13
lines changed

2 files changed

+43
-13
lines changed

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

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ struct process_cmd_struct {
1515
int arg;
1616
};
1717

18-
static const char *version_str = "v1.15";
18+
static const char *version_str = "v1.16";
1919

2020
static const int supported_api_ver = 2;
2121
static struct isst_if_platform_info isst_platform_info;
@@ -2113,7 +2113,6 @@ static void set_fact_enable(int arg)
21132113
else
21142114
for_each_online_power_domain_in_set(set_fact_for_cpu, NULL, NULL,
21152115
NULL, &enable);
2116-
isst_ctdp_display_information_end(outf);
21172116

21182117
if (!fact_enable_fail && enable && auto_mode) {
21192118
/*
@@ -2192,10 +2191,13 @@ static void set_fact_enable(int arg)
21922191
isst_display_result(&id, outf, "turbo-freq --auto", "enable", 0);
21932192
}
21942193

2194+
isst_ctdp_display_information_end(outf);
2195+
21952196
return;
21962197

21972198
error_disp:
21982199
isst_display_result(&id, outf, "turbo-freq --auto", "enable", ret);
2200+
isst_ctdp_display_information_end(outf);
21992201

22002202
}
22012203

@@ -2261,9 +2263,6 @@ static void dump_clos_config_for_cpu(struct isst_id *id, void *arg1, void *arg2,
22612263
struct isst_clos_config clos_config;
22622264
int ret;
22632265

2264-
if (id->cpu < 0)
2265-
return;
2266-
22672266
ret = isst_pm_get_clos(id, current_clos, &clos_config);
22682267
if (ret)
22692268
isst_display_error_info_message(1, "isst_pm_get_clos failed", 0, 0);
@@ -2437,12 +2436,16 @@ static void set_clos_assoc(int arg)
24372436
isst_display_error_info_message(1, "Invalid clos id\n", 0, 0);
24382437
exit(0);
24392438
}
2439+
2440+
isst_ctdp_display_information_start(outf);
2441+
24402442
if (max_target_cpus)
24412443
for_each_online_target_cpu_in_set(set_clos_assoc_for_cpu, NULL,
24422444
NULL, NULL, NULL);
24432445
else {
24442446
isst_display_error_info_message(1, "Invalid target cpu. Specify with [-c|--cpu]", 0, 0);
24452447
}
2448+
isst_ctdp_display_information_end(outf);
24462449
}
24472450

24482451
static void get_clos_assoc_for_cpu(struct isst_id *id, void *arg1, void *arg2, void *arg3,

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

Lines changed: 35 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -641,16 +641,30 @@ static int tpmi_pm_qos_config(struct isst_id *id, int enable_clos,
641641
int priority_type)
642642
{
643643
struct isst_core_power info;
644-
int ret;
644+
int i, ret, saved_punit;
645645

646646
info.get_set = 1;
647647
info.socket_id = id->pkg;
648648
info.power_domain_id = id->punit;
649649
info.enable = enable_clos;
650650
info.priority_type = priority_type;
651-
ret = tpmi_process_ioctl(ISST_IF_CORE_POWER_STATE, &info);
652-
if (ret == -1)
653-
return ret;
651+
652+
saved_punit = id->punit;
653+
654+
/* Set for all other dies also. This is per package setting */
655+
for (i = 0; i < MAX_PUNIT_PER_DIE; i++) {
656+
id->punit = i;
657+
if (isst_is_punit_valid(id)) {
658+
info.power_domain_id = i;
659+
ret = tpmi_process_ioctl(ISST_IF_CORE_POWER_STATE, &info);
660+
if (ret == -1) {
661+
id->punit = saved_punit;
662+
return ret;
663+
}
664+
}
665+
}
666+
667+
id->punit = saved_punit;
654668

655669
return 0;
656670
}
@@ -686,7 +700,7 @@ int tpmi_set_clos(struct isst_id *id, int clos,
686700
struct isst_clos_config *clos_config)
687701
{
688702
struct isst_clos_param info;
689-
int ret;
703+
int i, ret, saved_punit;
690704

691705
info.get_set = 1;
692706
info.socket_id = id->pkg;
@@ -702,9 +716,22 @@ int tpmi_set_clos(struct isst_id *id, int clos,
702716
if (info.max_freq_mhz <= 0xff)
703717
info.max_freq_mhz *= 100;
704718

705-
ret = tpmi_process_ioctl(ISST_IF_CLOS_PARAM, &info);
706-
if (ret == -1)
707-
return ret;
719+
saved_punit = id->punit;
720+
721+
/* Set for all other dies also. This is per package setting */
722+
for (i = 0; i < MAX_PUNIT_PER_DIE; i++) {
723+
id->punit = i;
724+
if (isst_is_punit_valid(id)) {
725+
info.power_domain_id = i;
726+
ret = tpmi_process_ioctl(ISST_IF_CLOS_PARAM, &info);
727+
if (ret == -1) {
728+
id->punit = saved_punit;
729+
return ret;
730+
}
731+
}
732+
}
733+
734+
id->punit = saved_punit;
708735

709736
debug_printf("set cpu:%d clos:%d min:%d max:%d\n", id->cpu, clos,
710737
clos_config->clos_min, clos_config->clos_max);

0 commit comments

Comments
 (0)