Skip to content

Commit 8defcaa

Browse files
committed
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
2 parents 08c4f1b + 1dbf588 commit 8defcaa

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

Documentation/cpu-freq/governors.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,8 @@ show_sampling_rate_max: THIS INTERFACE IS DEPRECATED, DON'T USE IT.
145145
up_threshold: defines what the average CPU usage between the samplings
146146
of 'sampling_rate' needs to be for the kernel to make a decision on
147147
whether it should increase the frequency. For example when it is set
148-
to its default value of '80' it means that between the checking
149-
intervals the CPU needs to be on average more than 80% in use to then
148+
to its default value of '95' it means that between the checking
149+
intervals the CPU needs to be on average more than 95% in use to then
150150
decide that the CPU frequency needs to be increased.
151151

152152
ignore_nice_load: this parameter takes a value of '0' or '1'. When

arch/x86/kernel/cpu/cpufreq/powernow-k8.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1356,6 +1356,7 @@ static int __devexit powernowk8_cpu_exit(struct cpufreq_policy *pol)
13561356

13571357
kfree(data->powernow_table);
13581358
kfree(data);
1359+
per_cpu(powernow_data, pol->cpu) = NULL;
13591360

13601361
return 0;
13611362
}
@@ -1375,7 +1376,7 @@ static unsigned int powernowk8_get(unsigned int cpu)
13751376
int err;
13761377

13771378
if (!data)
1378-
return -EINVAL;
1379+
return 0;
13791380

13801381
smp_call_function_single(cpu, query_values_on_cpu, &err, true);
13811382
if (err)

drivers/cpufreq/cpufreq_ondemand.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -554,6 +554,9 @@ static void dbs_check_cpu(struct cpu_dbs_info_s *this_dbs_info)
554554
(dbs_tuners_ins.up_threshold -
555555
dbs_tuners_ins.down_differential);
556556

557+
if (freq_next < policy->min)
558+
freq_next = policy->min;
559+
557560
if (!dbs_tuners_ins.powersave_bias) {
558561
__cpufreq_driver_target(policy, freq_next,
559562
CPUFREQ_RELATION_L);

0 commit comments

Comments
 (0)