return error when failing to set minfreq
Subsystems (2)
PATCH 1/1 return error when failing to set minfreq
Hello,
I'm resending this patch that probably has been lost in deep space. It got the signed-off by Dominik before:
http://lists.linux.org.uk/mailman/private/cpufreq/2006-June/005916.html
The same message contains a detailed explanation of the problem it fixes.
Rediffed against 2.6.17-mm6.
Description:
return -EINVAL if trying to increase frequencies starting from scaling_min_freq and documents the correct ordering of writes.
Signature · 2 lines
mattia :wq!
Documentation/cpu-freq/user-guide.txt +4 -1
@@ -153,10 +153,13 @@ scaling_governor, and by "echoing" the that some governors won't load - they only work on some specific architectures or processors. -scaling_min_freq and +scaling_min_freq and scaling_max_freq show the current "policy limits" (in kHz). By echoing new values into these files, you can change these limits. + NOTE: when setting a policy you need to + first set scaling_max_freq, then + scaling_min_freq. If you have selected the "userspace" governor which allows you to
drivers/cpufreq/cpufreq.c +5 -0
@@ -1348,6 +1348,11 @@ static int __cpufreq_set_policy(struct cmemcpy (&policy->cpuinfo, &data->cpuinfo,sizeof (struct cpufreq_cpuinfo )); +if (policy->min > data->min && policy->min > policy->max) { + ret = -EINVAL ; + goto error_out; + } +/* verify the cpu speed can be set within this limit */ ret = cpufreq_driver->verify (policy);if (ret)
_______________________________________________
Cpufreq mailing list
[email protected]
http://lists.linux.org.uk/mailman/listinfo/cpufreq
Quoted 6 lines · Mattia Dongili
I'm resending this patch that probably has been lost in deep space. It got the signed-off by Dominik before:
http://lists.linux.org.uk/mailman/private/cpufreq/2006-June/005916.html
The same message contains a detailed explanation of the problem it fixes.
Rediffed against 2.6.17-mm6.
Applied.
(After de-MIME'ing your mail by hand, which is possibly why it got
dropped last time, though I usually send out grumbles when that happens as git-applymbox barfs on MIMEs.)
Dave
Signature · 1 line
http://www.codemonkey.org.uk