Sanjay Chandrashekara
2f51bac276
cpufreq: use correct unit when verify cur freq
...
[ Upstream commit 44295af501 ]
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: f55ae08c89 ("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 >
Signed-off-by: Sasha Levin <sashal@kernel.org >
2023-05-11 23:03:16 +09:00
..
2022-06-29 20:14:39 +02:00
2022-12-31 13:31:58 +01:00
2021-12-30 18:51:39 +01:00
2022-03-09 19:53:01 +01:00
2022-10-05 11:05:18 -06:00
2023-01-18 11:58:12 +01:00
2020-12-07 13:02:37 +05:30
2023-02-01 08:34:31 +01:00
2022-08-30 13:49:23 +05:30
2021-01-18 12:23:43 +05:30
2023-02-01 08:34:28 +01:00
2022-03-10 19:55:05 +01:00
2022-02-04 19:22:34 +01:00
2022-04-13 15:22:41 +02:00
2022-04-13 15:22:41 +02:00
2022-07-25 20:38:01 +02:00
2019-06-19 17:09:55 +02:00
2020-11-10 18:31:17 +01:00
2020-11-10 18:31:17 +01:00
2021-06-07 13:47:57 +02:00
2020-07-02 13:03:30 +02:00
2023-02-01 08:34:29 +01:00
2022-10-18 16:22:25 +05:30
2020-03-12 15:43:52 +05:30
2020-01-27 10:33:33 +01:00
2023-05-11 23:03:16 +09:00
2023-03-10 09:33:01 +01:00
2020-10-27 18:42:54 +01:00
2020-03-24 21:31:27 +01:00
2021-03-26 17:43:48 +01:00
2020-01-27 10:33:33 +01:00
2022-09-26 11:15:04 +05:30
2021-03-19 17:26:20 +01:00
2022-10-18 16:22:25 +05:30
2022-07-08 11:27:48 +05:30
2022-10-25 15:09:23 +02:00
2022-07-25 20:34:56 +02:00
2022-09-24 14:54:38 +02:00
2019-11-29 11:52:02 +01:00
2022-11-22 19:57:15 +01:00
2020-01-07 13:29:58 +05:30
2022-02-04 19:31:49 +01:00
2019-05-30 11:26:39 -07:00
2020-03-24 21:31:27 +01:00
2021-02-04 19:23:20 +01:00
2021-06-07 17:43:52 +02:00
2022-10-05 11:05:17 -06:00
2019-07-18 09:49:30 +02:00
2022-07-15 19:17:30 +02:00
2023-05-11 23:03:12 +09:00
2022-06-10 14:51:35 +02:00
2021-08-12 09:54:07 +05:30
2020-08-23 17:36:59 -05:00
2022-04-13 17:18:45 +02:00
2020-07-15 15:17:06 +02:00
2022-06-28 13:34:51 +05:30
2022-04-13 17:18:45 +02:00
2020-03-24 21:31:27 +01:00
2020-03-24 21:31:27 +01:00
2019-05-30 11:26:39 -07:00
2022-03-17 14:54:11 +01:00
2019-06-05 17:37:08 +02:00
2021-10-05 16:33:05 +02:00
2019-05-30 11:26:32 -07:00
2022-04-13 17:18:45 +02:00
2022-04-13 17:18:45 +02:00
2019-08-26 10:02:01 +02:00
2022-05-07 22:55:49 +02:00
2022-05-07 22:55:49 +02:00
2023-05-11 23:03:12 +09:00
2022-10-18 16:22:26 +05:30
2022-06-28 13:34:45 +05:30
2019-06-13 08:58:22 +05:30
2020-08-20 17:52:05 +02:00
2021-02-04 19:23:20 +01:00
2019-10-23 08:53:23 +05:30
2020-08-20 17:53:22 +02:00
2020-08-20 17:53:22 +02:00
2020-01-07 13:31:01 +05:30
2021-10-04 11:43:14 +05:30
2021-10-05 16:33:05 +02:00
2021-02-04 19:23:20 +01:00
2021-02-04 19:23:20 +01:00
2021-05-21 18:52:13 +02:00
2022-07-15 19:17:30 +02:00
2022-06-10 14:51:36 +02:00
2021-09-02 18:04:17 +02:00
2019-05-21 10:50:45 +02:00
2019-05-21 10:50:45 +02:00
2021-02-04 19:23:20 +01:00
2020-03-24 21:31:27 +01:00
2020-03-24 21:31:27 +01:00
2020-10-28 18:04:07 +01:00
2019-05-30 11:26:39 -07:00
2020-03-24 21:31:27 +01:00
2022-09-26 11:15:04 +05:30
2022-10-18 16:22:26 +05:30
2022-07-08 11:27:48 +05:30
2019-10-29 13:25:29 +01:00
2021-10-04 12:31:36 +05:30
2022-10-18 16:22:25 +05:30
2022-09-26 11:15:04 +05:30
2021-10-04 11:25:21 +05:30