diff options
author | Zhang Rui <rui.zhang@intel.com> | 2022-08-20 18:58:21 +0300 |
---|---|---|
committer | Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> | 2022-09-15 21:16:05 +0300 |
commit | 56d6469291f8b1e1ab2f78e401c564163d3ee0f0 (patch) | |
tree | 81183ed198373c6489c1c34674ef1e4171be08f1 /tools/power/x86/intel-speed-select/isst-display.c | |
parent | 30e0600e2f849434e9a86824e2eced6a6c534723 (diff) | |
download | linux-56d6469291f8b1e1ab2f78e401c564163d3ee0f0.tar.xz |
tools/power/x86/intel-speed-select: Cleanup get_physical_id usage
struct isst_id already contains package and die id information, thus
there is no need to get the package and die id information, when struct
isst_id is already available.
Remove unneeded get_physical_package_id/get_physical_die_id usage.
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Diffstat (limited to 'tools/power/x86/intel-speed-select/isst-display.c')
-rw-r--r-- | tools/power/x86/intel-speed-select/isst-display.c | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/tools/power/x86/intel-speed-select/isst-display.c b/tools/power/x86/intel-speed-select/isst-display.c index 2b282eea1024..b19f57d30f55 100644 --- a/tools/power/x86/intel-speed-select/isst-display.c +++ b/tools/power/x86/intel-speed-select/isst-display.c @@ -172,15 +172,13 @@ static int print_package_info(struct isst_id *id, FILE *outf) if (out_format_is_json()) { snprintf(header, sizeof(header), "package-%d:die-%d:cpu-%d", - get_physical_package_id(id->cpu), get_physical_die_id(id->cpu), - id->cpu); + id->pkg, id->die, id->cpu); format_and_print(outf, 1, header, NULL); return 1; } - snprintf(header, sizeof(header), "package-%d", - get_physical_package_id(id->cpu)); + snprintf(header, sizeof(header), "package-%d", id->pkg); format_and_print(outf, 1, header, NULL); - snprintf(header, sizeof(header), "die-%d", get_physical_die_id(id->cpu)); + snprintf(header, sizeof(header), "die-%d", id->die); format_and_print(outf, 2, header, NULL); snprintf(header, sizeof(header), "cpu-%d", id->cpu); format_and_print(outf, 3, header, NULL); @@ -328,15 +326,12 @@ void isst_ctdp_display_core_info(struct isst_id *id, FILE *outf, char *prefix, if (out_format_is_json()) { snprintf(header, sizeof(header), "package-%d:die-%d:cpu-%d", - get_physical_package_id(id->cpu), get_physical_die_id(id->cpu), - id->cpu); + id->pkg, id->die, id->cpu); format_and_print(outf, level++, header, NULL); } else { - snprintf(header, sizeof(header), "package-%d", - get_physical_package_id(id->cpu)); + snprintf(header, sizeof(header), "package-%d", id->pkg); format_and_print(outf, level++, header, NULL); - snprintf(header, sizeof(header), "die-%d", - get_physical_die_id(id->cpu)); + snprintf(header, sizeof(header), "die-%d", id->die); format_and_print(outf, level++, header, NULL); snprintf(header, sizeof(header), "cpu-%d", id->cpu); format_and_print(outf, level++, header, NULL); |