<feed xmlns='http://www.w3.org/2005/Atom'>
<title>talos-obmc-linux/drivers/cpufreq, branch v2.6.25</title>
<subtitle>Talos™ II Linux sources for OpenBMC</subtitle>
<id>https://git.raptorcs.com/git/talos-obmc-linux/atom?h=v2.6.25</id>
<link rel='self' href='https://git.raptorcs.com/git/talos-obmc-linux/atom?h=v2.6.25'/>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-obmc-linux/'/>
<updated>2008-03-05T19:45:31+00:00</updated>
<entry>
<title>[CPUFREQ] fix section mismatch warnings</title>
<updated>2008-03-05T19:45:31+00:00</updated>
<author>
<name>Sam Ravnborg</name>
<email>sam@ravnborg.org</email>
</author>
<published>2008-02-17T12:22:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-obmc-linux/commit/?id=f6ebef30e21638417f8f5443ba393d63a0c27e2b'/>
<id>urn:sha1:f6ebef30e21638417f8f5443ba393d63a0c27e2b</id>
<content type='text'>
Fix the following warnings:
WARNING: vmlinux.o(.text+0xfe6711): Section mismatch in reference from the function cpufreq_unregister_driver() to the variable .cpuinit.data:cpufreq_cpu_notifier
WARNING: vmlinux.o(.text+0xfe68af): Section mismatch in reference from the function cpufreq_register_driver() to the variable .cpuinit.data:cpufreq_cpu_notifier
WARNING: vmlinux.o(.exit.text+0xc4fa): Section mismatch in reference from the function cpufreq_stats_exit() to the variable .cpuinit.data:cpufreq_stat_cpu_notifier

The warnings were casued by references to unregister_hotcpu_notifier()
from normal functions or exit functions.
This is flagged by modpost as a potential error because
it does not know that for the non HOTPLUG_CPU
scenario the unregister_hotcpu_notifier() is a nop.
Silence the warning by replacing the __initdata
annotation with a __refdata annotation.

Signed-off-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
Signed-off-by: Dave Jones &lt;davej@codemonkey.org.uk&gt;
</content>
</entry>
<entry>
<title>[CPUFREQ] Fix missing cpufreq_cpu_put() call in -&gt;store</title>
<updated>2008-03-05T19:45:31+00:00</updated>
<author>
<name>Dave Jones</name>
<email>davej@redhat.com</email>
</author>
<published>2008-03-05T19:22:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-obmc-linux/commit/?id=a07530b44547a892dae59f4e0f141f4e6f5e2e40'/>
<id>urn:sha1:a07530b44547a892dae59f4e0f141f4e6f5e2e40</id>
<content type='text'>
refactor to use gotos instead of explicit exit paths

Signed-off-by: Dave Jones &lt;davej@redhat.com&gt;
</content>
</entry>
<entry>
<title>[CPUFREQ] Fix missing cpufreq_cpu_put() call in -&gt;show</title>
<updated>2008-03-05T19:45:31+00:00</updated>
<author>
<name>Dave Jones</name>
<email>davej@redhat.com</email>
</author>
<published>2008-03-05T19:20:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-obmc-linux/commit/?id=0db4a8a99f6a8534c526e8c9d4b13d098400d485'/>
<id>urn:sha1:0db4a8a99f6a8534c526e8c9d4b13d098400d485</id>
<content type='text'>
refactor to use gotos instead of explicit exit paths

Signed-off-by: Dave Jones &lt;davej@redhat.com&gt;
</content>
</entry>
<entry>
<title>cpufreq: fix kobject reference count handling</title>
<updated>2008-02-21T23:27:06+00:00</updated>
<author>
<name>Balaji Rao</name>
<email>balajirrao@gmail.com</email>
</author>
<published>2008-02-08T19:22:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-obmc-linux/commit/?id=7ab47050453c10da13940114dea9c7f1c6ad323f'/>
<id>urn:sha1:7ab47050453c10da13940114dea9c7f1c6ad323f</id>
<content type='text'>
The cpufreq core should not take an extra kobject reference count for no
reason, and then refuse to release it.  This has been reported as
keeping machines from properly powering down all the way.


Signed-off-by: Balaji Rao &lt;balajirrao@gmail.com&gt;
Cc: Dave Jones &lt;davej@codemonkey.org.uk&gt;
Cc: Yi Yang &lt;yi.y.yang@intel.com&gt;
Cc: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Cc: Frans Pop &lt;elendil@planet.nl&gt;
Cc: Yinghai Lu &lt;yhlu.kernel@gmail.com&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>[CPUFREQ] fix configuration help message</title>
<updated>2008-02-07T03:57:58+00:00</updated>
<author>
<name>Stefano Brivio</name>
<email>stefano.brivio@polimi.it</email>
</author>
<published>2007-11-29T18:37:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-obmc-linux/commit/?id=232e8884cb62f865d69383e42ef333215da504d4'/>
<id>urn:sha1:232e8884cb62f865d69383e42ef333215da504d4</id>
<content type='text'>
cpufreq support can't be built as a module. Fix the related configuration
help message.

Signed-off-by: Stefano Brivio &lt;stefano.brivio@polimi.it&gt;
Signed-off-by: Dave Jones &lt;davej@redhat.com&gt;
</content>
</entry>
<entry>
<title>[CPUFREQ] Eliminate cpufreq_userspace scaling_setspeed deadlock</title>
<updated>2008-02-07T03:57:58+00:00</updated>
<author>
<name>Venki Pallipadi</name>
<email>venkatesh.pallipadi@intel.com</email>
</author>
<published>2007-10-26T17:18:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-obmc-linux/commit/?id=9e76988e9390a4ff4d171f690586d0c58186b47e'/>
<id>urn:sha1:9e76988e9390a4ff4d171f690586d0c58186b47e</id>
<content type='text'>
Eliminate cpufreq_userspace scaling_setspeed deadlock.

Luming Yu recently uncovered yet another cpufreq related deadlock.
One thread that continuously switches the governors and the other thread that
repeatedly cats the contents of cpufreq directory causes both these threads to
go into a deadlock.

Detailed examination of the deadlock showed the exact flow before the deadlock
as:

Thread 1			Thread 2
________			________
				cats files under /sys/devices/.../cpufreq/
Set governor to userspace
  Adds a new sysfs entry for
  scaling_setspeed
				cats files under /sys/devices/.../cpufreq/

Set governor to performance
  Holds cpufreq_rw_sem in write
  mode
  Sends a STOP notify to
  userspace governor
				cat /sys/devices/.../cpufreq/scaling_setspeed
				  Gets a handle on the above sysfs entry with
				  sysfs_get_active
				  Blocks while trying to get cpufreq_rw_sem
				  in read mode
  Remove a sysfs entry for
  scaling_setspeed
    Blocks on sysfs_deactivate
    while waiting for earlier
    get_active (on other thread)
    to drain

At this point both threads go into deadlock and any other thread that tries to
do anything with sysfs cpufreq will also block.

There seems to be no easy way to avoid this deadlock as long as
cpufreq_userspace adds/removes the sysfs entry under same kobject as cpufreq.
Below patch moves scaling_setspeed to cpufreq.c, keeping it always and calling
back the governor on read/write. This is the cleanest fix I could think of,
even though adding two callbacks in governor structure just for this seems
unnecessary.

Note that the change makes scaling_setspeed under /sys/.../cpufreq permanent
and returns &lt;unsupported&gt; when governor is not userspace.

Signed-off-by: Venkatesh Pallipadi &lt;venkatesh.pallipadi@intel.com&gt;
Signed-off-by: Dave Jones &lt;davej@redhat.com&gt;
</content>
</entry>
<entry>
<title>[CPUFREQ] fix incorrect comment on show_available_freqs() in freq_table.c</title>
<updated>2008-02-07T03:57:58+00:00</updated>
<author>
<name>Fenghua Yu</name>
<email>fenghua.yu@intel.com</email>
</author>
<published>2007-11-21T22:52:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-obmc-linux/commit/?id=e32d22f77666312648735f7cda0a114a8242b9d8'/>
<id>urn:sha1:e32d22f77666312648735f7cda0a114a8242b9d8</id>
<content type='text'>
In freq_table.c, show_available_freqs()'s comment is oberviously wrong.
Change the comment to a new one to avoid confusion.

Signed-off-by: Fenghua Yu &lt;fenghua.yu@intel.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Dave Jones &lt;davej@redhat.com&gt;
</content>
</entry>
<entry>
<title>[CPUFREQ] drivers/cpufreq: Add missing "space"</title>
<updated>2008-02-07T03:57:57+00:00</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2007-11-20T01:48:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-obmc-linux/commit/?id=a4a9df5825bf8fc69618807436bf927aeb1e1c27'/>
<id>urn:sha1:a4a9df5825bf8fc69618807436bf927aeb1e1c27</id>
<content type='text'>
Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Signed-off-by: Dave Jones &lt;davej@redhat.com&gt;
</content>
</entry>
<entry>
<title>cpufreq: fix obvious condition statement error</title>
<updated>2008-01-30T12:33:34+00:00</updated>
<author>
<name>Yi Yang</name>
<email>yi.y.yang@intel.com</email>
</author>
<published>2008-01-30T12:33:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-obmc-linux/commit/?id=53391fa20cab6df6b476a5a0ad6be653c9de0c46'/>
<id>urn:sha1:53391fa20cab6df6b476a5a0ad6be653c9de0c46</id>
<content type='text'>
The function __cpufreq_set_policy in file drivers/cpufreq/cpufreq.c
has a very obvious error:

        if (policy-&gt;min &gt; data-&gt;min &amp;&amp; policy-&gt;min &gt; policy-&gt;max) {
                ret = -EINVAL;
                goto error_out;
        }

This condtion statement is wrong because it returns -EINVAL only if
policy-&gt;min is greater than policy-&gt;max (in this case,
"policy-&gt;min &gt; data-&gt;min" is true for ever.). In fact, it should
return -EINVAL as well if policy-&gt;max is less than data-&gt;min.

The correct condition should be:

	if (policy-&gt;min &gt; data-&gt;max || policy-&gt;max &lt; data-&gt;min) {

The following test result testifies the above conclusion:

Before applying this patch:

[root@yangyi-dev /]# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies
2394000 1596000
[root@yangyi-dev /]# echo 1596000 &gt; /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
[root@yangyi-dev /]# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
1596000
[root@yangyi-dev /]# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
1596000
[root@yangyi-dev /]# echo "2000000" &gt; /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
-bash: echo: write error: Invalid argument
[root@yangyi-dev /]# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
1596000
[root@yangyi-dev /]# echo "0" &gt; /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
[root@yangyi-dev /]# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
1596000
[root@yangyi-dev /]# echo "1595000" &gt; /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
[root@yangyi-dev /]# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
1596000
[root@yangyi-dev /]#

After applying this patch:

[root@yangyi-dev /]# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies
2394000 1596000
[root@yangyi-dev /]# echo 1596000 &gt; /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
[root@yangyi-dev /]# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
1596000
[root@yangyi-dev /]# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
1596000
[root@localhost /]# echo "2000000" &gt; /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
-bash: echo: write error: Invalid argument
[root@localhost /]# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
1596000
[root@localhost /]# echo "0" &gt; /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
-bash: echo: write error: Invalid argument
[root@localhost /]# echo "1595000" &gt; /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
-bash: echo: write error: Invalid argument
[root@localhost /]# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
1596000
[root@localhost /]# echo "1596000" &gt; /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
[root@localhost /]# echo "2394000" &gt; /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
[root@localhost /]# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
2394000
[root@localhost /]

Signed-off-by: Yi Yang &lt;yi.y.yang@intel.com&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
</content>
</entry>
<entry>
<title>Kobject: convert drivers/* from kobject_unregister() to kobject_put()</title>
<updated>2008-01-25T04:40:40+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@suse.de</email>
</author>
<published>2007-12-20T16:13:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-obmc-linux/commit/?id=c10997f6575f476ff38442fa18fd4a0d80345f9d'/>
<id>urn:sha1:c10997f6575f476ff38442fa18fd4a0d80345f9d</id>
<content type='text'>
There is no need for kobject_unregister() anymore, thanks to Kay's
kobject cleanup changes, so replace all instances of it with
kobject_put().


Cc: Kay Sievers &lt;kay.sievers@vrfy.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
</feed>
