Skip to content

Commit 7ad9373

Browse files
committed
tools/power/x86/intel-speed-select: Die ID for IO dies
Instead of displaying "-1" for IO dies, display "IO". Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
1 parent c49e805 commit 7ad9373

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

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)