lkml.org 
[lkml]   [2019]   [Aug]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC PATCH] tools/power turbostat: Fix caller parameter of get_tdp_amd()
From
Date
On Fri, 2019-08-30 at 17:22 +0800, Pu Wen wrote:
> Commit 9392bd98bba760be96ee ("tools/power turbostat: Add support for
> AMD
> Fam 17h (Zen) RAPL") add a function get_tdp_amd(), the parameter is
> CPU
> family. But the rapl_probe_amd() function use wrong model parameter.
> Fix the wrong caller parameter of get_tdp_amd() to use family.

Whoops, good catch. Before, this code was only working because the
switch statement in get_tdp_amd() has a default case.

That said, this patch is effectively a no-op, since the get_tdp_amd()
function returns the value "250" no matter what argument is passed. The
only reason the function exists in the first place is that I thought
there might be a way to read the configured TDP from the CPU, but I
couldn't find any documentation on how to do that at the time.

Reviewed-by: Calvin Walton <calvin.walton@kepstin.ca>

--
Calvin Walton <calvin.walton@kepstin.ca>

\
 
 \ /
  Last update: 2019-08-30 17:02    [W:5.011 / U:0.316 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site