Skip to content

Commit b39c8eb

Browse files
committed
Merge: platform/x86: ISST: and tools/power/x86/intel-speed-select: updates
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-10/-/merge_requests/776 Description: updates for platform/x86 ISST and tools/power/x86/intel-speed-select JIRA: https://issues.redhat.com/browse/RHEL-74190 Build Info: 67386645 Tested: Successful platform test results on Intel (intel-eaglestream-emr-03) system. Signed-off-by: Steve Best <sbest@redhat.com> Approved-by: David Arcari <darcari@redhat.com> Approved-by: Tony Camuso <tcamuso@redhat.com> Approved-by: CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com> Merged-by: Julio Faracco <jfaracco@redhat.com>
2 parents b0be51c + 0d2762d commit b39c8eb

File tree

5 files changed

+27
-11
lines changed

5 files changed

+27
-11
lines changed

drivers/platform/x86/intel/speed_select_if/isst_if_common.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ static DECLARE_HASHTABLE(isst_hash, 8);
8484
static DEFINE_MUTEX(isst_hash_lock);
8585

8686
static int isst_store_new_cmd(int cmd, u32 cpu, int mbox_cmd_type, u32 param,
87-
u32 data)
87+
u64 data)
8888
{
8989
struct isst_cmd *sst_cmd;
9090

drivers/platform/x86/intel/tpmi_power_domains.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ static const struct x86_cpu_id tpmi_cpu_ids[] = {
8181
X86_MATCH_VFM(INTEL_GRANITERAPIDS_X, NULL),
8282
X86_MATCH_VFM(INTEL_ATOM_CRESTMONT_X, NULL),
8383
X86_MATCH_VFM(INTEL_ATOM_CRESTMONT, NULL),
84+
X86_MATCH_VFM(INTEL_ATOM_DARKMONT_X, NULL),
8485
X86_MATCH_VFM(INTEL_GRANITERAPIDS_D, NULL),
8586
X86_MATCH_VFM(INTEL_PANTHERCOVE_X, NULL),
8687
{}

tools/power/x86/intel-speed-select/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ endif
1313
# Do not use make's built-in rules
1414
# (this improves performance and avoids hard-to-debug behaviour);
1515
MAKEFLAGS += -r
16-
override CFLAGS += -O2 -Wall -g -D_GNU_SOURCE -I$(OUTPUT)include -I/usr/include/libnl3
16+
override CFLAGS += -O2 -Wall -g -D_GNU_SOURCE -I$(OUTPUT)include -I$(shell $(CC) -print-sysroot)/usr/include/libnl3
1717
override LDFLAGS += -lnl-genl-3 -lnl-3
1818

1919
ALL_TARGETS := intel-speed-select

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

Lines changed: 15 additions & 7 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.21";
19+
static const char *version_str = "v1.22";
2020

2121
static const int supported_api_ver = 3;
2222
static struct isst_if_platform_info isst_platform_info;
@@ -46,8 +46,9 @@ static int force_online_offline;
4646
static int auto_mode;
4747
static int fact_enable_fail;
4848
static int cgroupv2;
49+
static int max_pkg_id;
4950
static int max_die_id;
50-
static int max_punit_id;
51+
static int max_die_id_package_0;
5152

5253
/* clos related */
5354
static int current_clos = -1;
@@ -557,18 +558,20 @@ void for_each_online_power_domain_in_set(void (*callback)(struct isst_id *, void
557558
if (id.pkg < 0 || id.die < 0 || id.punit < 0)
558559
continue;
559560

561+
id.die = id.die % (max_die_id_package_0 + 1);
562+
560563
valid_mask[id.pkg][id.die] = 1;
561564

562565
if (cpus[id.pkg][id.die][id.punit] == -1)
563566
cpus[id.pkg][id.die][id.punit] = i;
564567
}
565568

566569
for (i = 0; i < MAX_PACKAGE_COUNT; i++) {
567-
if (max_die_id == max_punit_id) {
570+
if (max_die_id > max_pkg_id) {
568571
for (k = 0; k < MAX_PUNIT_PER_DIE && k < MAX_DIE_PER_PACKAGE; k++) {
569572
id.cpu = cpus[i][k][k];
570573
id.pkg = i;
571-
id.die = k;
574+
id.die = get_physical_die_id(id.cpu);
572575
id.punit = k;
573576
if (isst_is_punit_valid(&id))
574577
callback(&id, arg1, arg2, arg3, arg4);
@@ -586,7 +589,10 @@ void for_each_online_power_domain_in_set(void (*callback)(struct isst_id *, void
586589
for (k = 0; k < MAX_PUNIT_PER_DIE; k++) {
587590
id.cpu = cpus[i][j][k];
588591
id.pkg = i;
589-
id.die = j;
592+
if (id.cpu >= 0)
593+
id.die = get_physical_die_id(id.cpu);
594+
else
595+
id.die = id.pkg;
590596
id.punit = k;
591597
if (isst_is_punit_valid(&id))
592598
callback(&id, arg1, arg2, arg3, arg4);
@@ -788,6 +794,8 @@ static void create_cpu_map(void)
788794
cpu_map[i].die_id = die_id;
789795
cpu_map[i].core_id = core_id;
790796

797+
if (max_pkg_id < pkg_id)
798+
max_pkg_id = pkg_id;
791799

792800
punit_id = 0;
793801

@@ -812,8 +820,8 @@ static void create_cpu_map(void)
812820
if (max_die_id < die_id)
813821
max_die_id = die_id;
814822

815-
if (max_punit_id < cpu_map[i].punit_id)
816-
max_punit_id = cpu_map[i].punit_id;
823+
if (!pkg_id && max_die_id_package_0 < die_id)
824+
max_die_id_package_0 = die_id;
817825

818826
debug_printf(
819827
"map logical_cpu:%d core: %d die:%d pkg:%d punit:%d punit_cpu:%d punit_core:%d\n",

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

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,11 @@ static int print_package_info(struct isst_id *id, FILE *outf)
173173

174174
if (out_format_is_json()) {
175175
if (api_version() > 1) {
176-
if (id->cpu < 0)
176+
if (id->die < 0 && id->cpu < 0)
177+
snprintf(header, sizeof(header),
178+
"package-%d:die-IO:powerdomain-%d:cpu-None",
179+
id->pkg, id->punit);
180+
else if (id->cpu < 0)
177181
snprintf(header, sizeof(header),
178182
"package-%d:die-%d:powerdomain-%d:cpu-None",
179183
id->pkg, id->die, id->punit);
@@ -190,7 +194,10 @@ static int print_package_info(struct isst_id *id, FILE *outf)
190194
}
191195
snprintf(header, sizeof(header), "package-%d", id->pkg);
192196
format_and_print(outf, level++, header, NULL);
193-
snprintf(header, sizeof(header), "die-%d", id->die);
197+
if (id->die < 0)
198+
snprintf(header, sizeof(header), "die-IO");
199+
else
200+
snprintf(header, sizeof(header), "die-%d", id->die);
194201
format_and_print(outf, level++, header, NULL);
195202
if (api_version() > 1) {
196203
snprintf(header, sizeof(header), "powerdomain-%d", id->punit);

0 commit comments

Comments
 (0)