Commit 8defcaa6 authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq

* 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq:
  [CPUFREQ] Fix ondemand to not request targets outside policy limits
  [CPUFREQ] Fix use after free of struct powernow_k8_data
  [CPUFREQ] fix default value for ondemand governor
parents 08c4f1b0 1dbf5888
...@@ -145,8 +145,8 @@ show_sampling_rate_max: THIS INTERFACE IS DEPRECATED, DON'T USE IT. ...@@ -145,8 +145,8 @@ show_sampling_rate_max: THIS INTERFACE IS DEPRECATED, DON'T USE IT.
up_threshold: defines what the average CPU usage between the samplings up_threshold: defines what the average CPU usage between the samplings
of 'sampling_rate' needs to be for the kernel to make a decision on of 'sampling_rate' needs to be for the kernel to make a decision on
whether it should increase the frequency. For example when it is set whether it should increase the frequency. For example when it is set
to its default value of '80' it means that between the checking to its default value of '95' it means that between the checking
intervals the CPU needs to be on average more than 80% in use to then intervals the CPU needs to be on average more than 95% in use to then
decide that the CPU frequency needs to be increased. decide that the CPU frequency needs to be increased.
ignore_nice_load: this parameter takes a value of '0' or '1'. When ignore_nice_load: this parameter takes a value of '0' or '1'. When
......
...@@ -1356,6 +1356,7 @@ static int __devexit powernowk8_cpu_exit(struct cpufreq_policy *pol) ...@@ -1356,6 +1356,7 @@ static int __devexit powernowk8_cpu_exit(struct cpufreq_policy *pol)
kfree(data->powernow_table); kfree(data->powernow_table);
kfree(data); kfree(data);
per_cpu(powernow_data, pol->cpu) = NULL;
return 0; return 0;
} }
...@@ -1375,7 +1376,7 @@ static unsigned int powernowk8_get(unsigned int cpu) ...@@ -1375,7 +1376,7 @@ static unsigned int powernowk8_get(unsigned int cpu)
int err; int err;
if (!data) if (!data)
return -EINVAL; return 0;
smp_call_function_single(cpu, query_values_on_cpu, &err, true); smp_call_function_single(cpu, query_values_on_cpu, &err, true);
if (err) if (err)
......
...@@ -554,6 +554,9 @@ static void dbs_check_cpu(struct cpu_dbs_info_s *this_dbs_info) ...@@ -554,6 +554,9 @@ static void dbs_check_cpu(struct cpu_dbs_info_s *this_dbs_info)
(dbs_tuners_ins.up_threshold - (dbs_tuners_ins.up_threshold -
dbs_tuners_ins.down_differential); dbs_tuners_ins.down_differential);
if (freq_next < policy->min)
freq_next = policy->min;
if (!dbs_tuners_ins.powersave_bias) { if (!dbs_tuners_ins.powersave_bias) {
__cpufreq_driver_target(policy, freq_next, __cpufreq_driver_target(policy, freq_next,
CPUFREQ_RELATION_L); CPUFREQ_RELATION_L);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment