diff options
author | Sanjay Chandrashekara <sanjayc@nvidia.com> | 2023-04-18 14:34:54 +0300 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2023-04-18 18:45:28 +0300 |
commit | 44295af5019f1997d038ad2611086a2d1e2af167 (patch) | |
tree | 4da12390ce5bbf6fc0e9d11527cacf1f3e2c0f9b /tools/perf/scripts/python/export-to-postgresql.py | |
parent | 684952212ca639bce124e673f9f644a09895359c (diff) | |
download | linux-44295af5019f1997d038ad2611086a2d1e2af167.tar.xz |
cpufreq: use correct unit when verify cur freq
cpufreq_verify_current_freq checks() if the frequency returned by
the hardware has a slight delta with the valid frequency value
last set and returns "policy->cur" if the delta is within "1 MHz".
In the comparison, "policy->cur" is in "kHz" but it's compared
against HZ_PER_MHZ. So, the comparison range becomes "1 GHz".
Fix this by comparing against KHZ_PER_MHZ instead of HZ_PER_MHZ.
Fixes: f55ae08c8987 ("cpufreq: Avoid unnecessary frequency updates due to mismatch")
Signed-off-by: Sanjay Chandrashekara <sanjayc@nvidia.com>
[ sumit gupta: Commit message update ]
Signed-off-by: Sumit Gupta <sumitg@nvidia.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions