linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Prarit Bhargava <prarit@redhat.com>
To: platform-driver-x86@vger.kernel.org
Cc: Prarit Bhargava <prarit@redhat.com>,
	Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>,
	David Arcari <darcari@redhat.com>,
	linux-kernel@vger.kernel.org
Subject: [PATCH 3/8] tools/power/x86/intel-speed-select: Fix cpu-count output
Date: Tue,  3 Sep 2019 11:37:29 -0400	[thread overview]
Message-ID: <20190903153734.11904-4-prarit@redhat.com> (raw)
In-Reply-To: <20190903153734.11904-1-prarit@redhat.com>

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>
Cc: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Cc: David Arcari <darcari@redhat.com>
Cc: linux-kernel@vger.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


  parent reply	other threads:[~2019-09-03 15:38 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-03 15:37 [PATCH 0/8] tools-power-x86-intel-speed-select: Fixes and updates for output Prarit Bhargava
2019-09-03 15:37 ` [PATCH 1/8] tools/power/x86/intel-speed-select: Fix package typo Prarit Bhargava
2019-09-03 15:37 ` [PATCH 2/8] tools/power/x86/intel-speed-select: Fix help option typo Prarit Bhargava
2019-09-03 15:37 ` Prarit Bhargava [this message]
2019-09-03 15:37 ` [PATCH 4/8] tools/power/x86/intel-speed-select: Simplify output for turbo-freq and base-freq Prarit Bhargava
2019-09-03 15:37 ` [PATCH 5/8] tools/power/x86/intel-speed-select: Switch output to MHz Prarit Bhargava
2019-09-03 15:37 ` [PATCH 6/8] tools/power/x86/intel-speed-select: Change turbo ratio output to maximum turbo frequency Prarit Bhargava
2019-09-03 15:37 ` [PATCH 7/8] tools/power/x86/intel-speed-select: Output human readable CPU list Prarit Bhargava
2019-09-03 15:37 ` [PATCH 8/8] tools/power/x86/intel-speed-select: Output success/failed for command output Prarit Bhargava
2019-09-03 22:18   ` Srinivas Pandruvada
2019-09-04 20:06 ` [PATCH 0/8] tools-power-x86-intel-speed-select: Fixes and updates for output Srinivas Pandruvada
2019-09-04 20:55   ` Prarit Bhargava
2019-09-04 20:59     ` Srinivas Pandruvada

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190903153734.11904-4-prarit@redhat.com \
    --to=prarit@redhat.com \
    --cc=darcari@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=srinivas.pandruvada@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).