|
@@ -664,8 +664,14 @@ static int powernv_cpufreq_target_index(struct cpufreq_policy *policy,
|
|
if (unlikely(rebooting) && new_index != get_nominal_index())
|
|
if (unlikely(rebooting) && new_index != get_nominal_index())
|
|
return 0;
|
|
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);
|
|
powernv_cpufreq_throttle_check(NULL);
|
|
|
|
+ preempt_enable();
|
|
|
|
+ }
|
|
|
|
|
|
cur_msec = jiffies_to_msecs(get_jiffies_64());
|
|
cur_msec = jiffies_to_msecs(get_jiffies_64());
|
|
|
|
|