Re: [RFC PATCH] tools/power turbostat: Fix caller parameter of get_tdp_amd()
From: Calvin Walton
Date: Fri Aug 30 2019 - 11:01:29 EST
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@xxxxxxxxxx>
--
Calvin Walton <calvin.walton@xxxxxxxxxx>