diff options
-rw-r--r-- | drivers/cpufreq/cpufreq.c | 3 | ||||
-rw-r--r-- | drivers/cpufreq/intel_pstate.c | 4 |
2 files changed, 7 insertions, 0 deletions
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index b87596b591b3..e93405f0eac4 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c | |||
@@ -1491,6 +1491,9 @@ static unsigned int cpufreq_update_current_freq(struct cpufreq_policy *policy) | |||
1491 | { | 1491 | { |
1492 | unsigned int new_freq; | 1492 | unsigned int new_freq; |
1493 | 1493 | ||
1494 | if (cpufreq_suspended) | ||
1495 | return 0; | ||
1496 | |||
1494 | new_freq = cpufreq_driver->get(policy->cpu); | 1497 | new_freq = cpufreq_driver->get(policy->cpu); |
1495 | if (!new_freq) | 1498 | if (!new_freq) |
1496 | return 0; | 1499 | return 0; |
diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c index 8b5a415ee14a..30fe323c4551 100644 --- a/drivers/cpufreq/intel_pstate.c +++ b/drivers/cpufreq/intel_pstate.c | |||
@@ -1130,6 +1130,10 @@ static inline int32_t get_target_pstate_use_performance(struct cpudata *cpu) | |||
1130 | sample_ratio = div_fp(int_tofp(pid_params.sample_rate_ns), | 1130 | sample_ratio = div_fp(int_tofp(pid_params.sample_rate_ns), |
1131 | int_tofp(duration_ns)); | 1131 | int_tofp(duration_ns)); |
1132 | core_busy = mul_fp(core_busy, sample_ratio); | 1132 | core_busy = mul_fp(core_busy, sample_ratio); |
1133 | } else { | ||
1134 | sample_ratio = div_fp(100 * cpu->sample.mperf, cpu->sample.tsc); | ||
1135 | if (sample_ratio < int_tofp(1)) | ||
1136 | core_busy = 0; | ||
1133 | } | 1137 | } |
1134 | 1138 | ||
1135 | cpu->sample.busy_scaled = core_busy; | 1139 | cpu->sample.busy_scaled = core_busy; |