summaryrefslogtreecommitdiff
path: root/drivers/cpufreq
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2024-04-08 15:27:21 +0200
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2024-04-08 15:27:21 +0200
commit5196123d4b3e9c70fcc9be800d797dc8e76372de (patch)
treeb43b64a83d70c6eddd0b72e816b0f7f54154bb24 /drivers/cpufreq
parent8c556541a53848d6611ff8b5f9bf52e96c56f48e (diff)
parentdb9ea3b22315b74fd682d0c381a6e2ad09a105e3 (diff)
Merge back earlier core cpufreq material for 6.10.
Diffstat (limited to 'drivers/cpufreq')
-rw-r--r--drivers/cpufreq/freq_table.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/cpufreq/freq_table.c b/drivers/cpufreq/freq_table.c
index c17dc51a5a02..40e146942f3e 100644
--- a/drivers/cpufreq/freq_table.c
+++ b/drivers/cpufreq/freq_table.c
@@ -70,7 +70,7 @@ int cpufreq_frequency_table_verify(struct cpufreq_policy_data *policy,
struct cpufreq_frequency_table *table)
{
struct cpufreq_frequency_table *pos;
- unsigned int freq, next_larger = ~0;
+ unsigned int freq, prev_smaller = 0;
bool found = false;
pr_debug("request for verification of policy (%u - %u kHz) for cpu %u\n",
@@ -86,12 +86,12 @@ int cpufreq_frequency_table_verify(struct cpufreq_policy_data *policy,
break;
}
- if ((next_larger > freq) && (freq > policy->max))
- next_larger = freq;
+ if ((prev_smaller < freq) && (freq <= policy->max))
+ prev_smaller = freq;
}
if (!found) {
- policy->max = next_larger;
+ policy->max = prev_smaller;
cpufreq_verify_within_cpu_limits(policy);
}