Commit 30a44f7b authored by Andy Shevchenko's avatar Andy Shevchenko

Merge branch 'for-next'

Merge branch 'for-next' of
git@github.com:spandruvada/linux-kernel.git
to update Intel SST tools.
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
parents 7b91f156 873e391f
......@@ -25,7 +25,7 @@ static FILE *outf;
static int cpu_model;
static int cpu_stepping;
#define MAX_CPUS_IN_ONE_REQ 64
#define MAX_CPUS_IN_ONE_REQ 256
static short max_target_cpus;
static unsigned short target_cpus[MAX_CPUS_IN_ONE_REQ];
......@@ -653,7 +653,7 @@ void set_cpu_mask_from_punit_coremask(int cpu, unsigned long long core_mask,
pkg_id = get_physical_package_id(cpu);
for (i = 0; i < 64; ++i) {
if (core_mask & BIT(i)) {
if (core_mask & BIT_ULL(i)) {
int j;
for (j = 0; j < topo_max_cpus; ++j) {
......
......@@ -316,21 +316,31 @@ void isst_ctdp_display_core_info(int cpu, FILE *outf, char *prefix,
{
char header[256];
char value[256];
int level = 1;
if (out_format_is_json()) {
snprintf(header, sizeof(header), "package-%d:die-%d:cpu-%d",
get_physical_package_id(cpu), get_physical_die_id(cpu),
cpu);
format_and_print(outf, level++, header, NULL);
} else {
snprintf(header, sizeof(header), "package-%d",
get_physical_package_id(cpu));
format_and_print(outf, level++, header, NULL);
snprintf(header, sizeof(header), "die-%d",
get_physical_die_id(cpu));
format_and_print(outf, level++, header, NULL);
snprintf(header, sizeof(header), "cpu-%d", cpu);
format_and_print(outf, level++, header, NULL);
}
snprintf(header, sizeof(header), "package-%d",
get_physical_package_id(cpu));
format_and_print(outf, 1, header, NULL);
snprintf(header, sizeof(header), "die-%d", get_physical_die_id(cpu));
format_and_print(outf, 2, header, NULL);
snprintf(header, sizeof(header), "cpu-%d", cpu);
format_and_print(outf, 3, header, NULL);
if (str0 && !val)
snprintf(value, sizeof(value), "%s", str0);
else if (str1 && val)
snprintf(value, sizeof(value), "%s", str1);
else
snprintf(value, sizeof(value), "%u", val);
format_and_print(outf, 4, prefix, value);
format_and_print(outf, level, prefix, value);
format_and_print(outf, 1, NULL, NULL);
}
......
......@@ -29,6 +29,7 @@
#include <sys/ioctl.h>
#define BIT(x) (1 << (x))
#define BIT_ULL(nr) (1ULL << (nr))
#define GENMASK(h, l) (((~0UL) << (l)) & (~0UL >> (sizeof(long) * 8 - 1 - (h))))
#define GENMASK_ULL(h, l) \
(((~0ULL) << (l)) & (~0ULL >> (sizeof(long long) * 8 - 1 - (h))))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment