All of lore.kernel.org
 help / color / mirror / Atom feed
* turbostat: fix Skylake server package
@ 2017-08-04 15:42 Artem Bityutskiy
  2017-08-05  7:07 ` Len Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Artem Bityutskiy @ 2017-08-04 15:42 UTC (permalink / raw)
  To: Len Brown; +Cc: linux-pm

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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: turbostat: fix Skylake server package
  2017-08-04 15:42 turbostat: fix Skylake server package Artem Bityutskiy
@ 2017-08-05  7:07 ` Len Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Len Brown @ 2017-08-05  7:07 UTC (permalink / raw)
  To: Artem Bityutskiy; +Cc: Len Brown, Linux PM list

Applied!

thanks,
-Len

On Fri, Aug 4, 2017 at 11:42 AM, Artem Bityutskiy
<artem.bityutskiy@linux.intel.com> wrote:
> 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



-- 
Len Brown, Intel Open Source Technology Center

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-08-05  7:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-04 15:42 turbostat: fix Skylake server package Artem Bityutskiy
2017-08-05  7:07 ` Len Brown

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.