<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/cpufreq, branch v3.0.39</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers/cpufreq?h=v3.0.39</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers/cpufreq?h=v3.0.39'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2012-02-13T19:06:13Z</updated>
<entry>
<title>powernow-k8: Fix indexing issue</title>
<updated>2012-02-13T19:06:13Z</updated>
<author>
<name>Andreas Herrmann</name>
<email>andreas.herrmann3@amd.com</email>
</author>
<published>2012-01-06T14:57:55Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=323a479328cbc2fb5cf647790f7414ca570a577b'/>
<id>urn:sha1:323a479328cbc2fb5cf647790f7414ca570a577b</id>
<content type='text'>
commit a8eb28480e9b637cc78b9aa5e08612ba97e1317a upstream.

The driver uses the pstate number from the status register as index in
its table of ACPI pstates (powernow_table). This is wrong as this is
not a 1-to-1 mapping.

For example we can have _PSS information to just utilize Pstate 0 and
Pstate 4, ie.

  powernow-k8: Core Performance Boosting: on.
  powernow-k8:    0 : pstate 0 (2200 MHz)
  powernow-k8:    1 : pstate 4 (1400 MHz)

In this example the driver's powernow_table has just 2 entries. Using
the pstate number (4) as index into this table is just plain wrong.

Signed-off-by: Andreas Herrmann &lt;andreas.herrmann3@amd.com&gt;
Signed-off-by: Dave Jones &lt;davej@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>powernow-k8: Avoid Pstate MSR accesses on systems supporting CPB</title>
<updated>2012-02-13T19:06:13Z</updated>
<author>
<name>Andreas Herrmann</name>
<email>andreas.herrmann3@amd.com</email>
</author>
<published>2012-01-06T14:56:31Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=2d8a3a209b35f8301c86e7962f636a372a0d7cad'/>
<id>urn:sha1:2d8a3a209b35f8301c86e7962f636a372a0d7cad</id>
<content type='text'>
commit 201bf0f129e1715a33568d1563d9a75b840ab4d3 upstream.

Due to CPB we can't directly map SW Pstates to Pstate MSRs. Get rid of
the paranoia check. (assuming that the ACPI Pstate information is
correct.)

Signed-off-by: Andreas Herrmann &lt;andreas.herrmann3@amd.com&gt;
Signed-off-by: Dave Jones &lt;davej@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>drivers/cpufreq/pcc-cpufreq.c: avoid NULL pointer dereference</title>
<updated>2011-10-03T18:40:31Z</updated>
<author>
<name>Naga Chumbalkar</name>
<email>nagananda.chumbalkar@hp.com</email>
</author>
<published>2011-09-14T23:22:23Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=c780713f786ee22532839502ed35f1bd1cb0fd1d'/>
<id>urn:sha1:c780713f786ee22532839502ed35f1bd1cb0fd1d</id>
<content type='text'>
commit e71f5cc402ecb42b407ae52add7b173bf1c53daa upstream.

per_cpu(processors, n) can be NULL, resulting in:

  Loading CPUFreq modules[  437.661360] BUG: unable to handle kernel NULL pointer dereference at (null)
  IP: [&lt;ffffffffa0434314&gt;] pcc_cpufreq_cpu_init+0x74/0x220 [pcc_cpufreq]

It's better to avoid the oops by failing the driver, and allowing the
system to boot.

Signed-off-by: Naga Chumbalkar &lt;nagananda.chumbalkar@hp.com&gt;
Cc: Dave Jones &lt;davej@codemonkey.org.uk&gt;
Cc: Len Brown &lt;lenb@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;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>[CPUFREQ] fix cpumask memory leak in acpi-cpufreq on cpu hotplug.</title>
<updated>2011-07-10T21:03:04Z</updated>
<author>
<name>Luming Yu</name>
<email>luming.yu@gmail.com</email>
</author>
<published>2011-07-08T20:37:44Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=50f4ddd4ff713d2599e2f246775fe2206090126e'/>
<id>urn:sha1:50f4ddd4ff713d2599e2f246775fe2206090126e</id>
<content type='text'>
I came across a memory leak during a cyclic cpu-online-offline test.

Signed-off-by: Yu Luming &lt;luming.yu@intel.com&gt;
Cc: Len Brown &lt;lenb@kernel.org&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] powernow-k8: Don't try to transition if the pstate is incorrect</title>
<updated>2011-06-16T20:31:13Z</updated>
<author>
<name>Konrad Rzeszutek Wilk</name>
<email>konrad.wilk@oracle.com</email>
</author>
<published>2011-06-16T19:36:40Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=fbb5b89eabea5ae7d621b7861863159560d8faa4'/>
<id>urn:sha1:fbb5b89eabea5ae7d621b7861863159560d8faa4</id>
<content type='text'>
This patch augments the pstate transition code to error out
(instead of returning 0) when an incorrect pstate is provided.

Suggested-by: Borislav Petkov &lt;bp@alien8.de&gt;
CC: andre.przywara@amd.com
CC: Mark.Langsdorf@amd.com
Signed-off-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
Signed-off-by: Dave Jones &lt;davej@redhat.com&gt;
</content>
</entry>
<entry>
<title>[CPUFREQ] powernow-k8: Don't notify of successful transition if we failed (vid case).</title>
<updated>2011-06-16T20:31:13Z</updated>
<author>
<name>Konrad Rzeszutek Wilk</name>
<email>konrad.wilk@oracle.com</email>
</author>
<published>2011-06-16T19:36:39Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=a9d3d2068064b7a6395871a49616d3784f802d50'/>
<id>urn:sha1:a9d3d2068064b7a6395871a49616d3784f802d50</id>
<content type='text'>
Before this patch if we failed the vid transition would still try to
submit the "new" frequencies to cpufreq.
That is incorrect - also we could submit a non-existing frequency value
which would cause cpufreq to crash. The ultimate fix is in cpufreq
to deal with incorrect values, but this patch improves the error
recovery in the AMD powernowk8 driver.

The failure that was reported was as follows:

powernow-k8: Found 1 AMD Athlon(tm) 64 Processor 3700+ (1 cpu cores) (version 2.20.00)
powernow-k8: fid 0x2 (1000 MHz), vid 0x12
powernow-k8: fid 0xa (1800 MHz), vid 0xa
powernow-k8: fid 0xc (2000 MHz), vid 0x8
powernow-k8: fid 0xe (2200 MHz), vid 0x8
Marking TSC unstable due to cpufreq changes
powernow-k8: fid trans failed, fid 0x2, curr 0x0
BUG: unable to handle kernel paging request at ffff880807e07b78
IP: [&lt;ffffffff81479163&gt;] cpufreq_stats_update+0x46/0x5b
...

And transition fails and data-&gt;currfid ends up with 0. Since
the machine does not support 800Mhz value when the calculation is
done ('find_khz_freq_from_fid(data-&gt;currfid);') it reports the
new frequency as 800000 which is bogus. This patch fixes
the issue during target setting.

The patch however does not fix the issue in 'powernowk8_cpu_init'
where the pol-&gt;cur can also be set with the 800000 value:

          pol-&gt;cur = find_khz_freq_from_fid(data-&gt;currfid);
  dprintk("policy current frequency %d kHz\n", pol-&gt;cur);

  /* min/max the cpu is capable of */
  if (cpufreq_frequency_table_cpuinfo(pol, data-&gt;powernow_table)) {

The fix for that looks to update cpufreq_frequency_table_cpuinfo to
check pol-&gt;cur.... but that would cause an regression in how the
acpi-cpufreq driver works (it sets cpu-&gt;cur after calling
cpufreq_frequency_table_cpuinfo). Instead the fix will be to let
cpufreq gracefully handle bogus data (another patch).

Acked-by: Borislav Petkov &lt;bp@alien8.de&gt;
CC: andre.przywara@amd.com
CC: Mark.Langsdorf@amd.com
Reported-by: Tobias Diedrich &lt;ranma+xen@tdiedrich.de&gt;
Tested-by: Tobias Diedrich &lt;ranma+xen@tdiedrich.de&gt;
[v1: Rebased on v3.0-rc2, reduced patch to deal with vid case]
Signed-off-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
Signed-off-by: Dave Jones &lt;davej@redhat.com&gt;
</content>
</entry>
<entry>
<title>[CPUFREQ] Don't set stat-&gt;last_index to -1 if the pol-&gt;cur has incorrect value.</title>
<updated>2011-06-16T20:31:12Z</updated>
<author>
<name>Konrad Rzeszutek Wilk</name>
<email>konrad.wilk@oracle.com</email>
</author>
<published>2011-06-16T19:36:38Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=46a310b80bc2c9ccc019649c9da91194cbc10944'/>
<id>urn:sha1:46a310b80bc2c9ccc019649c9da91194cbc10944</id>
<content type='text'>
If the driver submitted an non-existing pol&gt;cur value (say it
used the default initialized value of zero), when the cpufreq
stats tries to setup its initial values it incorrectly sets
stat-&gt;last_index to -1 (or 0xfffff...). And cpufreq_stats_update
tries to update at that index location and fails.

This can be caused by:

stat-&gt;last_index = freq_table_get_index(stat, policy-&gt;cur);

not finding the appropiate frequency in the table (b/c the policy-&gt;cur
is wrong) and we end up crashing. The fix however is
concentrated in the 'cpufreq_stats_update' as the last_index
(and old_index) are updated there. Which means it can reset
the last_index to -1 again and on the next iteration cause a crash.

Without this patch, the following crash is observed:

powernow-k8: Found 1 AMD Athlon(tm) 64 Processor 3700+ (1 cpu cores) (version 2.20.00)
powernow-k8: fid 0x2 (1000 MHz), vid 0x12
powernow-k8: fid 0xa (1800 MHz), vid 0xa
powernow-k8: fid 0xc (2000 MHz), vid 0x8
powernow-k8: fid 0xe (2200 MHz), vid 0x8
Marking TSC unstable due to cpufreq changes
powernow-k8: fid trans failed, fid 0x2, curr 0x0
BUG: unable to handle kernel paging request at ffff880807e07b78
IP: [&lt;ffffffff81479163&gt;] cpufreq_stats_update+0x46/0x5b
.. snip..
Pid: 1, comm: swapper Not tainted 3.0.0-rc2 #45 MICRO-STAR INTERNATIONAL CO., LTD MS-7094/MS-7094
..snip..
Call Trace:
 [&lt;ffffffff81479248&gt;] cpufreq_stat_notifier_trans+0x48/0x7c
 [&lt;ffffffff81095d68&gt;] notifier_call_chain+0x32/0x5e
 [&lt;ffffffff81095e6b&gt;] __srcu_notifier_call_chain+0x47/0x63
 [&lt;ffffffff81095e96&gt;] srcu_notifier_call_chain+0xf/0x11
 [&lt;ffffffff81477e7a&gt;] cpufreq_notify_transition+0x111/0x134
 [&lt;ffffffff8147b0d4&gt;] powernowk8_target+0x53b/0x617
 [&lt;ffffffff8147723a&gt;] __cpufreq_driver_target+0x2e/0x30
 [&lt;ffffffff8147a127&gt;] cpufreq_governor_dbs+0x339/0x356
 [&lt;ffffffff81477394&gt;] __cpufreq_governor+0xa8/0xe9
 [&lt;ffffffff81477525&gt;] __cpufreq_set_policy+0x132/0x13e
 [&lt;ffffffff8147848d&gt;] cpufreq_add_dev_interface+0x272/0x28c

Reported-by: Tobias Diedrich &lt;ranma+xen@tdiedrich.de&gt;
Tested-by: Tobias Diedrich &lt;ranma+xen@tdiedrich.de&gt;
Signed-off-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
Signed-off-by: Dave Jones &lt;davej@redhat.com&gt;
</content>
</entry>
<entry>
<title>[CPUFREQ] Remove cpufreq_stats sysfs entries on module unload.</title>
<updated>2011-06-12T20:36:52Z</updated>
<author>
<name>Dave Jones</name>
<email>davej@redhat.com</email>
</author>
<published>2011-06-12T20:35:28Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=13f067537f34456443f61c950cd6dc37d1d5f3ee'/>
<id>urn:sha1:13f067537f34456443f61c950cd6dc37d1d5f3ee</id>
<content type='text'>
cpufreq_stats leaves behind its sysfs entries, which causes a panic
when something stumbled across them.
(Discovered by unloading cpufreq_stats while powertop was loaded).

Signed-off-by: Dave Jones &lt;davej@redhat.com&gt;
Cc: stable@kernel.org
</content>
</entry>
<entry>
<title>cpufreq: make DB8500 cpufreq driver compile</title>
<updated>2011-05-24T20:20:14Z</updated>
<author>
<name>Linus Walleij</name>
<email>linus.walleij@linaro.org</email>
</author>
<published>2011-05-15T17:34:29Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=f0e733f32e56ded9309a8b8da3a77d47beb3cbdd'/>
<id>urn:sha1:f0e733f32e56ded9309a8b8da3a77d47beb3cbdd</id>
<content type='text'>
Concluding interface update and movement of the driver by making
the DB8500 cpufreq driver compile in the cpufreq subsystem.

Cc: Arnd Bergmann &lt;arnd@arndb.de&gt;
Acked-by: Dave Jones &lt;davej@redhat.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>cpufreq: update DB8500 cpufreq driver</title>
<updated>2011-05-24T20:20:05Z</updated>
<author>
<name>Linus Walleij</name>
<email>linus.walleij@linaro.org</email>
</author>
<published>2011-05-15T17:19:51Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=72b2fd5cb89933a5b0dba32735d9b22ae3fb866e'/>
<id>urn:sha1:72b2fd5cb89933a5b0dba32735d9b22ae3fb866e</id>
<content type='text'>
This updates the ux500 cpufreq driver to the new interface from the
updated DB8500 PRCMU

Cc: Arnd Bergmann &lt;arnd@arndb.de&gt;
Acked-by: Dave Jones &lt;davej@redhat.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
</feed>
