[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190903153734.11904-4-prarit@redhat.com>
Date: Tue, 3 Sep 2019 11:37:29 -0400
From: Prarit Bhargava <prarit@...hat.com>
To: platform-driver-x86@...r.kernel.org
Cc: Prarit Bhargava <prarit@...hat.com>,
Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>,
David Arcari <darcari@...hat.com>, linux-kernel@...r.kernel.org
Subject: [PATCH 3/8] 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@...hat.com>
Cc: Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>
Cc: David Arcari <darcari@...hat.com>
Cc: linux-kernel@...r.kernel.org
---
tools/power/x86/intel-speed-select/isst-config.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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;
}
--
2.21.0
Powered by blists - more mailing lists