All of lore.kernel.org
 help / color / mirror / Atom feed
From: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
To: Len Brown <len.brown@intel.com>
Cc: linux-pm@vger.kernel.org
Subject: turbostat: fix Skylake server package
Date: Fri,  4 Aug 2017 18:42:23 +0300	[thread overview]
Message-ID: <20170804154223.16223-1-artem.bityutskiy@linux.intel.com> (raw)

This patch fixes the problem of turbostat not reporting any package C-states on
Skylake Xeon processor when the deepest package C-stated is configured as "no
limit" in the UEFI firmware configuration menu.

The lowest 3 bits of the MSR_PKG_CST_CONFIG_CONTROL (0x000000e2) register
contain 7 in this case, meaning "No Package C state limits" (see Intel SDM, vol
4, Table 2-41 - MSRs Supported by Intel® Xeon® Processor Scalable Family with
DisplayFamily_DisplayModel 06_55H).

The problem was that turbostat's internal array of supported package C-sates
(skx_pkg_cstate_limits) marked position #7 as "PCLRSV" (reserved), instead of
"PCLUNL" (not limited). Instead, position #8 was incorrectly marked as "PCLUNL"
(probably due to a typo).

This patch fixes the issue by marking position #7 as "not limited", and
position #8 as "reserved".

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
---
 turbostat.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/turbostat.c b/turbostat.c
index 6c185a9..1c4d3e2 100644
--- a/turbostat.c
+++ b/turbostat.c
@@ -1816,7 +1816,7 @@ int slv_pkg_cstate_limits[16] = {PCL__0, PCL__1, PCLRSV, PCLRSV, PCL__4, PCLRSV,
 int amt_pkg_cstate_limits[16] = {PCLUNL, PCL__1, PCL__2, PCLRSV, PCLRSV, PCLRSV, PCL__6, PCL__7, PCLRSV, PCLRSV, PCLRSV, PCLRSV, PCLRSV, PCLRSV, PCLRSV, PCLRSV};
 int phi_pkg_cstate_limits[16] = {PCL__0, PCL__2, PCL_6N, PCL_6R, PCLRSV, PCLRSV, PCLRSV, PCLUNL, PCLRSV, PCLRSV, PCLRSV, PCLRSV, PCLRSV, PCLRSV, PCLRSV, PCLRSV};
 int bxt_pkg_cstate_limits[16] = {PCL__0, PCL__2, PCLUNL, PCLRSV, PCLRSV, PCLRSV, PCLRSV, PCLRSV, PCLRSV, PCLRSV, PCLRSV, PCLRSV, PCLRSV, PCLRSV, PCLRSV, PCLRSV};
-int skx_pkg_cstate_limits[16] = {PCL__0, PCL__2, PCL_6N, PCL_6R, PCLRSV, PCLRSV, PCLRSV, PCLRSV, PCLUNL, PCLRSV, PCLRSV, PCLRSV, PCLRSV, PCLRSV, PCLRSV, PCLRSV};
+int skx_pkg_cstate_limits[16] = {PCL__0, PCL__2, PCL_6N, PCL_6R, PCLRSV, PCLRSV, PCLRSV, PCLUNL, PCLRSV, PCLRSV, PCLRSV, PCLRSV, PCLRSV, PCLRSV, PCLRSV, PCLRSV};
 
 
 static void
-- 
2.9.3

             reply	other threads:[~2017-08-04 15:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-04 15:42 Artem Bityutskiy [this message]
2017-08-05  7:07 ` turbostat: fix Skylake server package Len Brown

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=20170804154223.16223-1-artem.bityutskiy@linux.intel.com \
    --to=artem.bityutskiy@linux.intel.com \
    --cc=len.brown@intel.com \
    --cc=linux-pm@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.