<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/cpufreq, branch v2.6.26.3</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>cpufreq acpi: only call _PPC after cpufreq ACPI init funcs got called already</title>
<updated>2008-08-01T19:43:12+00:00</updated>
<author>
<name>Thomas Renninger</name>
<email>trenn@suse.de</email>
</author>
<published>2008-07-30T18:20:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=04f496871e8af87a1e40c504371a206fd7389193'/>
<id>04f496871e8af87a1e40c504371a206fd7389193</id>
<content type='text'>
commit a1531acd43310a7e4571d52e8846640667f4c74b upstream

Ingo Molnar provided a fix to not call _PPC at processor driver
initialization time in "[PATCH] ACPI: fix cpufreq regression" (git
commit e4233dec749a3519069d9390561b5636a75c7579)

But it can still happen that _PPC is called at processor driver
initialization time.

This patch should make sure that this is not possible anymore.

Signed-off-by: Thomas Renninger &lt;trenn@suse.de&gt;
Cc: Andi Kleen &lt;andi@firstfloor.org&gt;
Cc: Len Brown &lt;lenb@kernel.org&gt;
Cc: Dave Jones &lt;davej@codemonkey.org.uk&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: Venkatesh Pallipadi &lt;venkatesh.pallipadi@intel.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit a1531acd43310a7e4571d52e8846640667f4c74b upstream

Ingo Molnar provided a fix to not call _PPC at processor driver
initialization time in "[PATCH] ACPI: fix cpufreq regression" (git
commit e4233dec749a3519069d9390561b5636a75c7579)

But it can still happen that _PPC is called at processor driver
initialization time.

This patch should make sure that this is not possible anymore.

Signed-off-by: Thomas Renninger &lt;trenn@suse.de&gt;
Cc: Andi Kleen &lt;andi@firstfloor.org&gt;
Cc: Len Brown &lt;lenb@kernel.org&gt;
Cc: Dave Jones &lt;davej@codemonkey.org.uk&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: Venkatesh Pallipadi &lt;venkatesh.pallipadi@intel.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq</title>
<updated>2008-06-09T18:27:55+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2008-06-09T18:27:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=cc55875e26e2b85484b196edbada6caf84eb7765'/>
<id>cc55875e26e2b85484b196edbada6caf84eb7765</id>
<content type='text'>
* 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq:
  [CPUFREQ] Fix format string bug.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq:
  [CPUFREQ] Fix format string bug.
</pre>
</div>
</content>
</entry>
<entry>
<title>[CPUFREQ] Fix format string bug.</title>
<updated>2008-06-09T17:24:55+00:00</updated>
<author>
<name>Chris Wright</name>
<email>chrisw@sous-sol.org</email>
</author>
<published>2008-06-07T04:26:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=326f6a5c9c9e1a62aec37bdc0c3f8d53adabe77b'/>
<id>326f6a5c9c9e1a62aec37bdc0c3f8d53adabe77b</id>
<content type='text'>
Format string bug.  Not exploitable, as this is only writable by root,
but worth fixing all the same.

Spotted-by: Ilja van Sprundel &lt;ilja@netric.org&gt;
Signed-off-by: Dave Jones &lt;davej@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Format string bug.  Not exploitable, as this is only writable by root,
but worth fixing all the same.

Spotted-by: Ilja van Sprundel &lt;ilja@netric.org&gt;
Signed-off-by: Dave Jones &lt;davej@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cpufreq: fix null object access on Transmeta CPU</title>
<updated>2008-06-06T18:29:11+00:00</updated>
<author>
<name>CHIKAMA masaki</name>
<email>masaki.chikama@gmail.com</email>
</author>
<published>2008-06-06T05:46:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=879000f94442860e72c934f9e568989bc7fb8ec4'/>
<id>879000f94442860e72c934f9e568989bc7fb8ec4</id>
<content type='text'>
If cpu specific cpufreq driver(i.e.  longrun) has "setpolicy" function,
governor object isn't set into cpufreq_policy object at "__cpufreq_set_policy"
function in driver/cpufreq/cpufreq.c .

This causes a null object access at "store_scaling_setspeed" and
"show_scaling_setspeed" function in driver/cpufreq/cpufreq.c when reading or
writing through /sys interface (ex.  cat
/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed)

Addresses:
	http://bugzilla.kernel.org/show_bug.cgi?id=10654
	https://bugzilla.redhat.com/show_bug.cgi?id=443354

Signed-off-by: CHIKAMA Masaki &lt;masaki.chikama@gmail.com&gt;
Cc: Dave Jones &lt;davej@codemonkey.org.uk&gt;
Cc: Chuck Ebbert &lt;cebbert@redhat.com&gt;
Acked-by: Dominik Brodowski &lt;linux@dominikbrodowski.net&gt;
Cc: &lt;stable@kernel.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If cpu specific cpufreq driver(i.e.  longrun) has "setpolicy" function,
governor object isn't set into cpufreq_policy object at "__cpufreq_set_policy"
function in driver/cpufreq/cpufreq.c .

This causes a null object access at "store_scaling_setspeed" and
"show_scaling_setspeed" function in driver/cpufreq/cpufreq.c when reading or
writing through /sys interface (ex.  cat
/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed)

Addresses:
	http://bugzilla.kernel.org/show_bug.cgi?id=10654
	https://bugzilla.redhat.com/show_bug.cgi?id=443354

Signed-off-by: CHIKAMA Masaki &lt;masaki.chikama@gmail.com&gt;
Cc: Dave Jones &lt;davej@codemonkey.org.uk&gt;
Cc: Chuck Ebbert &lt;cebbert@redhat.com&gt;
Acked-by: Dominik Brodowski &lt;linux@dominikbrodowski.net&gt;
Cc: &lt;stable@kernel.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[CPUFREQ] fix double unlock of cpu_policy_rwsem in drivers/cpufreq/cpufreq.c</title>
<updated>2008-05-29T16:10:12+00:00</updated>
<author>
<name>Lothar Waßmann</name>
<email>LW@KARO-electronics.de</email>
</author>
<published>2008-05-29T15:54:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=dca026139317dcbc642a30320d551f559692182f'/>
<id>dca026139317dcbc642a30320d551f559692182f</id>
<content type='text'>
In drivers/cpufreq/cpufreq.c the function cpufreq_add_dev() takes the
error exit 'err_out_unregister' from different places once with the
'cpu_policy_rwsem' lock held, once with the lock released:
|		if (ret)
|			goto err_out_unregister;
|	}
|
|	policy-&gt;governor = NULL; /* to assure that the starting sequence is
|				  * run in cpufreq_set_policy */
|
|	/* set default policy */
|	ret = __cpufreq_set_policy(policy, &amp;new_policy);
|	policy-&gt;user_policy.policy = policy-&gt;policy;
|	policy-&gt;user_policy.governor = policy-&gt;governor;
|
|	unlock_policy_rwsem_write(cpu);
|
|	if (ret) {
|		dprintk("setting policy failed\n");
|		goto err_out_unregister;
|	}

This leads to the following error message in case of a failing
__cpufreq_set_policy() call:
=====================================
[ BUG: bad unlock balance detected! ]
-------------------------------------
swapper/1 is trying to release lock (&amp;per_cpu(cpu_policy_rwsem, cpu)) at:
[&lt;c01b4564&gt;] unlock_policy_rwsem_write+0x30/0x40
but there are no more locks to release!

other info that might help us debug this:
1 lock held by swapper/1:
 #0:  (sysdev_drivers_lock){--..}, at: [&lt;c018fd18&gt;] sysdev_driver_register+0x74/0x130

stack backtrace:
[&lt;c002f588&gt;] (dump_stack+0x0/0x14) from [&lt;c00692fc&gt;] (print_unlock_inbalance_bug+0xc8/0x104)
[&lt;c0069234&gt;] (print_unlock_inbalance_bug+0x0/0x104) from [&lt;c006b7ac&gt;] (lock_release_non_nested+0xc4/0x19c)
 r6:00000028 r5:c3c1ab80 r4:c01b4564
[&lt;c006b6e8&gt;] (lock_release_non_nested+0x0/0x19c) from [&lt;c006b9e0&gt;] (lock_release+0x15c/0x18c)
 r8:60000013 r7:00000001 r6:c01b4564 r5:c0541bb4 r4:c3c1ab80
[&lt;c006b884&gt;] (lock_release+0x0/0x18c) from [&lt;c0061ba0&gt;] (up_write+0x24/0x30)
 r8:c0541b80 r7:00000000 r6:ffffffea r5:c3c34828 r4:c0541b8c
[&lt;c0061b7c&gt;] (up_write+0x0/0x30) from [&lt;c01b4564&gt;] (unlock_policy_rwsem_write+0x30/0x40)
 r4:c3c34884
[&lt;c01b4534&gt;] (unlock_policy_rwsem_write+0x0/0x40) from [&lt;c01b4c40&gt;] (cpufreq_add_dev+0x324/0x398)
[&lt;c01b491c&gt;] (cpufreq_add_dev+0x0/0x398) from [&lt;c018fd64&gt;] (sysdev_driver_register+0xc0/0x130)
[&lt;c018fca4&gt;] (sysdev_driver_register+0x0/0x130) from [&lt;c01b3574&gt;] (cpufreq_register_driver+0xbc/0x174)

Signed-off-by: Lothar Waßmann &lt;LW@KARO-electronics.de&gt;
Signed-off-by: Dave Jones &lt;davej@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In drivers/cpufreq/cpufreq.c the function cpufreq_add_dev() takes the
error exit 'err_out_unregister' from different places once with the
'cpu_policy_rwsem' lock held, once with the lock released:
|		if (ret)
|			goto err_out_unregister;
|	}
|
|	policy-&gt;governor = NULL; /* to assure that the starting sequence is
|				  * run in cpufreq_set_policy */
|
|	/* set default policy */
|	ret = __cpufreq_set_policy(policy, &amp;new_policy);
|	policy-&gt;user_policy.policy = policy-&gt;policy;
|	policy-&gt;user_policy.governor = policy-&gt;governor;
|
|	unlock_policy_rwsem_write(cpu);
|
|	if (ret) {
|		dprintk("setting policy failed\n");
|		goto err_out_unregister;
|	}

This leads to the following error message in case of a failing
__cpufreq_set_policy() call:
=====================================
[ BUG: bad unlock balance detected! ]
-------------------------------------
swapper/1 is trying to release lock (&amp;per_cpu(cpu_policy_rwsem, cpu)) at:
[&lt;c01b4564&gt;] unlock_policy_rwsem_write+0x30/0x40
but there are no more locks to release!

other info that might help us debug this:
1 lock held by swapper/1:
 #0:  (sysdev_drivers_lock){--..}, at: [&lt;c018fd18&gt;] sysdev_driver_register+0x74/0x130

stack backtrace:
[&lt;c002f588&gt;] (dump_stack+0x0/0x14) from [&lt;c00692fc&gt;] (print_unlock_inbalance_bug+0xc8/0x104)
[&lt;c0069234&gt;] (print_unlock_inbalance_bug+0x0/0x104) from [&lt;c006b7ac&gt;] (lock_release_non_nested+0xc4/0x19c)
 r6:00000028 r5:c3c1ab80 r4:c01b4564
[&lt;c006b6e8&gt;] (lock_release_non_nested+0x0/0x19c) from [&lt;c006b9e0&gt;] (lock_release+0x15c/0x18c)
 r8:60000013 r7:00000001 r6:c01b4564 r5:c0541bb4 r4:c3c1ab80
[&lt;c006b884&gt;] (lock_release+0x0/0x18c) from [&lt;c0061ba0&gt;] (up_write+0x24/0x30)
 r8:c0541b80 r7:00000000 r6:ffffffea r5:c3c34828 r4:c0541b8c
[&lt;c0061b7c&gt;] (up_write+0x0/0x30) from [&lt;c01b4564&gt;] (unlock_policy_rwsem_write+0x30/0x40)
 r4:c3c34884
[&lt;c01b4534&gt;] (unlock_policy_rwsem_write+0x0/0x40) from [&lt;c01b4c40&gt;] (cpufreq_add_dev+0x324/0x398)
[&lt;c01b491c&gt;] (cpufreq_add_dev+0x0/0x398) from [&lt;c018fd64&gt;] (sysdev_driver_register+0xc0/0x130)
[&lt;c018fca4&gt;] (sysdev_driver_register+0x0/0x130) from [&lt;c01b3574&gt;] (cpufreq_register_driver+0xbc/0x174)

Signed-off-by: Lothar Waßmann &lt;LW@KARO-electronics.de&gt;
Signed-off-by: Dave Jones &lt;davej@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[CPUFREQ] clarify license of freq_table.c</title>
<updated>2008-05-22T20:38:03+00:00</updated>
<author>
<name>Dominik Brodowski</name>
<email>linux@dominikbrodowski.net</email>
</author>
<published>2008-05-22T06:52:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=4f74369422b883164c50b5936517d010a3e1ce59'/>
<id>4f74369422b883164c50b5936517d010a3e1ce59</id>
<content type='text'>
Signed-off-by: Dominik Brodowski &lt;linux@dominikbrodowski.net&gt;
Signed-off-by: Dave Jones &lt;davej@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Dominik Brodowski &lt;linux@dominikbrodowski.net&gt;
Signed-off-by: Dave Jones &lt;davej@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[CPUFREQ] state info wrong after resume</title>
<updated>2008-04-28T20:27:08+00:00</updated>
<author>
<name>Shaohua Li</name>
<email>shaohua.li@intel.com</email>
</author>
<published>2008-04-27T20:46:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=6501faf8c1bbaa51dc493f3681df016d2ebce833'/>
<id>6501faf8c1bbaa51dc493f3681df016d2ebce833</id>
<content type='text'>
Sometimes old_index != stat-&gt;last_index, see cpufreq_update_policy, bios can
change cpu setting in resume.  In my test, after resume cpu is in lowest
speed, but the stat info shows cpu is in full speed.  This patch makes the
stat info correct after a resume.

Signed-off-by: Shaohua Li &lt;shaohua.li@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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Sometimes old_index != stat-&gt;last_index, see cpufreq_update_policy, bios can
change cpu setting in resume.  In my test, after resume cpu is in lowest
speed, but the stat info shows cpu is in full speed.  This patch makes the
stat info correct after a resume.

Signed-off-by: Shaohua Li &lt;shaohua.li@intel.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Dave Jones &lt;davej@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[CPUFREQ] allow use of the powersave governor as the default one</title>
<updated>2008-04-28T20:27:08+00:00</updated>
<author>
<name>Alessandro Guido</name>
<email>alessandro.guido@gmail.com</email>
</author>
<published>2008-04-18T20:31:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=30d221db4439973076953e2ed44344fa92d1d09f'/>
<id>30d221db4439973076953e2ed44344fa92d1d09f</id>
<content type='text'>
Allow use of the powersave cpufreq governor as the default one for EMBEDDED
configs.

Signed-off-by: Alessandro Guido &lt;alessandro.guido@gmail.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Dave Jones &lt;davej@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Allow use of the powersave cpufreq governor as the default one for EMBEDDED
configs.

Signed-off-by: Alessandro Guido &lt;alessandro.guido@gmail.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Dave Jones &lt;davej@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[CPUFREQ] expose cpufreq coordination requirements regardless of coordination mechanism</title>
<updated>2008-04-28T20:27:08+00:00</updated>
<author>
<name>Darrick J. Wong</name>
<email>djwong@us.ibm.com</email>
</author>
<published>2008-04-18T20:31:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=e8628dd06d66f2e3965ec9742029b401d63434f1'/>
<id>e8628dd06d66f2e3965ec9742029b401d63434f1</id>
<content type='text'>
Currently, affected_cpus shows which CPUs need to have their frequency
coordinated in software.  When hardware coordination is in use, the contents
of this file appear the same as when no coordination is required.  This can
lead to some confusion among user-space programs, for example, that do not
know that extra coordination is required to force a CPU core to a particular
speed to control power consumption.

To fix this, create a "related_cpus" attribute that always displays the
coordination map regardless of whatever coordination strategy the cpufreq
driver uses (sw or hw).  If the cpufreq driver does not provide a value, fall
back to policy-&gt;cpus.

Signed-off-by: Darrick J. Wong &lt;djwong@us.ibm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Dave Jones &lt;davej@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently, affected_cpus shows which CPUs need to have their frequency
coordinated in software.  When hardware coordination is in use, the contents
of this file appear the same as when no coordination is required.  This can
lead to some confusion among user-space programs, for example, that do not
know that extra coordination is required to force a CPU core to a particular
speed to control power consumption.

To fix this, create a "related_cpus" attribute that always displays the
coordination map regardless of whatever coordination strategy the cpufreq
driver uses (sw or hw).  If the cpufreq driver does not provide a value, fall
back to policy-&gt;cpus.

Signed-off-by: Darrick J. Wong &lt;djwong@us.ibm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Dave Jones &lt;davej@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[CPUFREQ] fix show_trans_table</title>
<updated>2008-04-28T19:05:44+00:00</updated>
<author>
<name>Cesar Eduardo Barros</name>
<email>cesarb@cesarb.net</email>
</author>
<published>2008-02-16T10:41:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=25aca347d49ffc38aa3b7e63ce9b90df7f8b79c8'/>
<id>25aca347d49ffc38aa3b7e63ce9b90df7f8b79c8</id>
<content type='text'>
Fix show_trans_table when it overflows PAGE_SIZE.

* Not all snprintf calls were protected against being passed a negative
length.
* When show_trans_table overflows, len might be &gt; PAGE_SIZE. In that case,
returns PAGE_SIZE.

Signed-off-by: Cesar Eduardo Barros &lt;cesarb@cesarb.net&gt;
Signed-off-by: Dave Jones &lt;davej@codemonkey.org.uk&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix show_trans_table when it overflows PAGE_SIZE.

* Not all snprintf calls were protected against being passed a negative
length.
* When show_trans_table overflows, len might be &gt; PAGE_SIZE. In that case,
returns PAGE_SIZE.

Signed-off-by: Cesar Eduardo Barros &lt;cesarb@cesarb.net&gt;
Signed-off-by: Dave Jones &lt;davej@codemonkey.org.uk&gt;
</pre>
</div>
</content>
</entry>
</feed>
