diff options
author | Pu Wen <puwen@hygon.cn> | 2019-08-31 10:19:58 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-09-06 10:23:41 +0200 |
commit | 3698cd854f436b02ca2db6cf1a8d5a0221dcb03d (patch) | |
tree | 90b745d6c586834c7062a0ba44723bfc0bf49ef1 /tools | |
parent | 2d26f7f401e736ab886f73acb48ff47e95e1f7af (diff) | |
download | linux-stable-3698cd854f436b02ca2db6cf1a8d5a0221dcb03d.tar.gz linux-stable-3698cd854f436b02ca2db6cf1a8d5a0221dcb03d.tar.bz2 linux-stable-3698cd854f436b02ca2db6cf1a8d5a0221dcb03d.zip |
tools/power turbostat: Fix caller parameter of get_tdp_amd()
commit 9cfa8e042f7cbb1994cc5923e46c78b36f6054f4 upstream.
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.
Cc: <stable@vger.kernel.org> # v5.1+
Signed-off-by: Pu Wen <puwen@hygon.cn>
Reviewed-by: Calvin Walton <calvin.walton@kepstin.ca>
Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/power/x86/turbostat/turbostat.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/power/x86/turbostat/turbostat.c b/tools/power/x86/turbostat/turbostat.c index 75fc4fb9901c..1cd28ebf8443 100644 --- a/tools/power/x86/turbostat/turbostat.c +++ b/tools/power/x86/turbostat/turbostat.c @@ -4002,7 +4002,7 @@ void rapl_probe_amd(unsigned int family, unsigned int model) rapl_energy_units = ldexp(1.0, -(msr >> 8 & 0x1f)); rapl_power_units = ldexp(1.0, -(msr & 0xf)); - tdp = get_tdp_amd(model); + tdp = get_tdp_amd(family); rapl_joule_counter_range = 0xFFFFFFFF * rapl_energy_units / tdp; if (!quiet) |