Skip to content

Commit b2028e5

Browse files
committed
Merge branch 'fixes' into linux-next
* fixes: cpufreq: intel_pstate: Fix crash during turbo disable
2 parents 150bfb6 + 8b4537a commit b2028e5

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

drivers/cpufreq/intel_pstate.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1476,13 +1476,13 @@ static void __intel_pstate_update_max_freq(struct cpufreq_policy *policy,
14761476
refresh_frequency_limits(policy);
14771477
}
14781478

1479-
static bool intel_pstate_update_max_freq(struct cpudata *cpudata)
1479+
static bool intel_pstate_update_max_freq(int cpu)
14801480
{
1481-
struct cpufreq_policy *policy __free(put_cpufreq_policy) = cpufreq_cpu_get(cpudata->cpu);
1481+
struct cpufreq_policy *policy __free(put_cpufreq_policy) = cpufreq_cpu_get(cpu);
14821482
if (!policy)
14831483
return false;
14841484

1485-
__intel_pstate_update_max_freq(policy, cpudata);
1485+
__intel_pstate_update_max_freq(policy, all_cpu_data[cpu]);
14861486

14871487
return true;
14881488
}
@@ -1501,7 +1501,7 @@ static void intel_pstate_update_limits_for_all(void)
15011501
int cpu;
15021502

15031503
for_each_possible_cpu(cpu)
1504-
intel_pstate_update_max_freq(all_cpu_data[cpu]);
1504+
intel_pstate_update_max_freq(cpu);
15051505

15061506
mutex_lock(&hybrid_capacity_lock);
15071507

@@ -1910,7 +1910,7 @@ static void intel_pstate_notify_work(struct work_struct *work)
19101910
struct cpudata *cpudata =
19111911
container_of(to_delayed_work(work), struct cpudata, hwp_notify_work);
19121912

1913-
if (intel_pstate_update_max_freq(cpudata)) {
1913+
if (intel_pstate_update_max_freq(cpudata->cpu)) {
19141914
/*
19151915
* The driver will not be unregistered while this function is
19161916
* running, so update the capacity without acquiring the driver

0 commit comments

Comments
 (0)