Skip to content

Commit 30a44f7

Browse files
committed
Merge branch 'for-next'
Merge branch 'for-next' of [email protected]:spandruvada/linux-kernel.git to update Intel SST tools. Signed-off-by: Andy Shevchenko <[email protected]>
2 parents 7b91f15 + 873e391 commit 30a44f7

File tree

3 files changed

+21
-10
lines changed

3 files changed

+21
-10
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ static FILE *outf;
2525
static int cpu_model;
2626
static int cpu_stepping;
2727

28-
#define MAX_CPUS_IN_ONE_REQ 64
28+
#define MAX_CPUS_IN_ONE_REQ 256
2929
static short max_target_cpus;
3030
static unsigned short target_cpus[MAX_CPUS_IN_ONE_REQ];
3131

@@ -653,7 +653,7 @@ void set_cpu_mask_from_punit_coremask(int cpu, unsigned long long core_mask,
653653
pkg_id = get_physical_package_id(cpu);
654654

655655
for (i = 0; i < 64; ++i) {
656-
if (core_mask & BIT(i)) {
656+
if (core_mask & BIT_ULL(i)) {
657657
int j;
658658

659659
for (j = 0; j < topo_max_cpus; ++j) {

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

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -316,21 +316,31 @@ void isst_ctdp_display_core_info(int cpu, FILE *outf, char *prefix,
316316
{
317317
char header[256];
318318
char value[256];
319+
int level = 1;
320+
321+
if (out_format_is_json()) {
322+
snprintf(header, sizeof(header), "package-%d:die-%d:cpu-%d",
323+
get_physical_package_id(cpu), get_physical_die_id(cpu),
324+
cpu);
325+
format_and_print(outf, level++, header, NULL);
326+
} else {
327+
snprintf(header, sizeof(header), "package-%d",
328+
get_physical_package_id(cpu));
329+
format_and_print(outf, level++, header, NULL);
330+
snprintf(header, sizeof(header), "die-%d",
331+
get_physical_die_id(cpu));
332+
format_and_print(outf, level++, header, NULL);
333+
snprintf(header, sizeof(header), "cpu-%d", cpu);
334+
format_and_print(outf, level++, header, NULL);
335+
}
319336

320-
snprintf(header, sizeof(header), "package-%d",
321-
get_physical_package_id(cpu));
322-
format_and_print(outf, 1, header, NULL);
323-
snprintf(header, sizeof(header), "die-%d", get_physical_die_id(cpu));
324-
format_and_print(outf, 2, header, NULL);
325-
snprintf(header, sizeof(header), "cpu-%d", cpu);
326-
format_and_print(outf, 3, header, NULL);
327337
if (str0 && !val)
328338
snprintf(value, sizeof(value), "%s", str0);
329339
else if (str1 && val)
330340
snprintf(value, sizeof(value), "%s", str1);
331341
else
332342
snprintf(value, sizeof(value), "%u", val);
333-
format_and_print(outf, 4, prefix, value);
343+
format_and_print(outf, level, prefix, value);
334344

335345
format_and_print(outf, 1, NULL, NULL);
336346
}

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
#include <sys/ioctl.h>
3030

3131
#define BIT(x) (1 << (x))
32+
#define BIT_ULL(nr) (1ULL << (nr))
3233
#define GENMASK(h, l) (((~0UL) << (l)) & (~0UL >> (sizeof(long) * 8 - 1 - (h))))
3334
#define GENMASK_ULL(h, l) \
3435
(((~0ULL) << (l)) & (~0ULL >> (sizeof(long long) * 8 - 1 - (h))))

0 commit comments

Comments
 (0)