[<prev] [next>] [day] [month] [year] [list]
Message-ID: <1567217998-4356-1-git-send-email-puwen@hygon.cn>
Date: Sat, 31 Aug 2019 10:19:58 +0800
From: Pu Wen <puwen@...on.cn>
To: <lenb@...nel.org>, <calvin.walton@...stin.ca>
CC: <linux-pm@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<stable@...r.kernel.org>, Pu Wen <puwen@...on.cn>
Subject: [RFC PATCH v2] tools/power turbostat: Fix caller parameter of get_tdp_amd()
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@...r.kernel.org> # v5.1+
Signed-off-by: Pu Wen <puwen@...on.cn>
Reviewed-by: Calvin Walton <calvin.walton@...stin.ca>
---
tools/power/x86/turbostat/turbostat.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/power/x86/turbostat/turbostat.c b/tools/power/x86/turbostat/turbostat.c
index 75fc4fb..1cd28eb 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)
--
2.7.4
Powered by blists - more mailing lists