Skip to content

Commit 9cfa8e0

Browse files
Pu Wenlenb
authored andcommitted
tools/power turbostat: Fix caller parameter of get_tdp_amd()
Commit 9392bd9 ("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: <[email protected]> # v5.1+ Signed-off-by: Pu Wen <[email protected]> Reviewed-by: Calvin Walton <[email protected]> Signed-off-by: Len Brown <[email protected]>
1 parent 1e9042b commit 9cfa8e0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/power/x86/turbostat/turbostat.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4031,7 +4031,7 @@ void rapl_probe_amd(unsigned int family, unsigned int model)
40314031
rapl_energy_units = ldexp(1.0, -(msr >> 8 & 0x1f));
40324032
rapl_power_units = ldexp(1.0, -(msr & 0xf));
40334033

4034-
tdp = get_tdp_amd(model);
4034+
tdp = get_tdp_amd(family);
40354035

40364036
rapl_joule_counter_range = 0xFFFFFFFF * rapl_energy_units / tdp;
40374037
if (!quiet)

0 commit comments

Comments
 (0)