diff options
Diffstat (limited to 'kernel/drivers/cpufreq/powernv-cpufreq.c')
-rw-r--r-- | kernel/drivers/cpufreq/powernv-cpufreq.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/kernel/drivers/cpufreq/powernv-cpufreq.c b/kernel/drivers/cpufreq/powernv-cpufreq.c index cb501386e..c4b0ef659 100644 --- a/kernel/drivers/cpufreq/powernv-cpufreq.c +++ b/kernel/drivers/cpufreq/powernv-cpufreq.c @@ -373,8 +373,14 @@ static int powernv_cpufreq_target_index(struct cpufreq_policy *policy, if (unlikely(rebooting) && new_index != get_nominal_index()) return 0; - if (!throttled) + if (!throttled) { + /* we don't want to be preempted while + * checking if the CPU frequency has been throttled + */ + preempt_disable(); powernv_cpufreq_throttle_check(NULL); + preempt_enable(); + } freq_data.pstate_id = powernv_freqs[new_index].driver_data; |