diff options
author | Prarit Bhargava <prarit@redhat.com> | 2019-09-05 08:03:05 -0400 |
---|---|---|
committer | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2019-09-07 21:19:13 +0300 |
commit | 3ec2aef1b03eefeffe93817bd04068d3805d4a98 (patch) | |
tree | 91dc1c54c772726f2f93da8ad97fdeb5f52ba709 /tools/power/x86 | |
parent | 43774c0dccb405a0b63a10829d45db4b74c29e40 (diff) |
tools/power/x86/intel-speed-select: Fix cpu-count output
I have a system with 28 threads/socket but intel-speed-select reports
a cpu-count of 29.
Fix an off-by-one error in the cpu_count() function.
Signed-off-by: Prarit Bhargava <prarit@redhat.com>
Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Cc: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Cc: David Arcari <darcari@redhat.com>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Diffstat (limited to 'tools/power/x86')
-rw-r--r-- | tools/power/x86/intel-speed-select/isst-config.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/power/x86/intel-speed-select/isst-config.c b/tools/power/x86/intel-speed-select/isst-config.c index d32af8210427..f81a28c6b586 100644 --- a/tools/power/x86/intel-speed-select/isst-config.c +++ b/tools/power/x86/intel-speed-select/isst-config.c @@ -304,7 +304,7 @@ static void set_cpu_present_cpu_mask(void) int get_cpu_count(int pkg_id, int die_id) { if (pkg_id < MAX_PACKAGE_COUNT && die_id < MAX_DIE_PER_PACKAGE) - return cpu_cnt[pkg_id][die_id] + 1; + return cpu_cnt[pkg_id][die_id]; return 0; } |