<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/cpufreq, branch v3.12.45</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: pcc: Enable autoload of pcc-cpufreq for ACPI processors</title>
<updated>2015-06-23T13:56:21+00:00</updated>
<author>
<name>Lenny Szubowicz</name>
<email>lszubowi@redhat.com</email>
</author>
<published>2014-11-13T18:51:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=17459111ac04d613d0ab464d68c10b9f8899e9ce'/>
<id>17459111ac04d613d0ab464d68c10b9f8899e9ce</id>
<content type='text'>
commit 7e7e8fe69820c6fa31395dbbd8e348e3c69cd2a9 upstream.

The pcc-cpufreq driver is not automatically loaded on systems where
the platform's power management setting requires this driver.
Instead, on those systems no CPU frequency driver is registered and
active.

Make the autoloading matching criteria for loading the pcc-cpufreq
driver the same as done in acpi-cpufreq by commit c655affbd524d01
("ACPI / cpufreq: Add ACPI processor device IDs to acpi-cpufreq").

x86 CPU frequency drivers are now typically autoloaded by specifying
MODULE_DEVICE_TABLE entries and x86cpu model specific matching.
But pcc-cpufreq was omitted when acpi-cpufreq and other drivers were
changed to use this approach.

Both acpi-cpufreq and pcc-cpufreq depend on a distinct and mutually
exclusive set of ACPI methods which are not directly tied to specific
processor model numbers. Both of these drivers have init routines
which look for their required ACPI methods. As a result, only the
appropriate driver registers as the cpu frequency driver and the other
one ends up being unloaded.

Tested on various systems where acpi-cpufreq, intel_pstate, and
pcc-cpufreq are the expected cpu frequency drivers.

Signed-off-by: Lenny Szubowicz &lt;lszubowi@redhat.com&gt;
Signed-off-by: Joseph Szczypek &lt;joseph.szczypek@hp.com&gt;
Reported-by: Trinh Dao &lt;trinh.dao@hp.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 7e7e8fe69820c6fa31395dbbd8e348e3c69cd2a9 upstream.

The pcc-cpufreq driver is not automatically loaded on systems where
the platform's power management setting requires this driver.
Instead, on those systems no CPU frequency driver is registered and
active.

Make the autoloading matching criteria for loading the pcc-cpufreq
driver the same as done in acpi-cpufreq by commit c655affbd524d01
("ACPI / cpufreq: Add ACPI processor device IDs to acpi-cpufreq").

x86 CPU frequency drivers are now typically autoloaded by specifying
MODULE_DEVICE_TABLE entries and x86cpu model specific matching.
But pcc-cpufreq was omitted when acpi-cpufreq and other drivers were
changed to use this approach.

Both acpi-cpufreq and pcc-cpufreq depend on a distinct and mutually
exclusive set of ACPI methods which are not directly tied to specific
processor model numbers. Both of these drivers have init routines
which look for their required ACPI methods. As a result, only the
appropriate driver registers as the cpu frequency driver and the other
one ends up being unloaded.

Tested on various systems where acpi-cpufreq, intel_pstate, and
pcc-cpufreq are the expected cpu frequency drivers.

Signed-off-by: Lenny Szubowicz &lt;lszubowi@redhat.com&gt;
Signed-off-by: Joseph Szczypek &lt;joseph.szczypek@hp.com&gt;
Reported-by: Trinh Dao &lt;trinh.dao@hp.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cpufreq: fix a NULL pointer dereference in __cpufreq_governor()</title>
<updated>2015-04-27T17:59:53+00:00</updated>
<author>
<name>Ethan Zhao</name>
<email>ethan.zhao@oracle.com</email>
</author>
<published>2014-12-18T06:28:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=e4c218429fb3752cabf96724d60cbeba85e35eb2'/>
<id>e4c218429fb3752cabf96724d60cbeba85e35eb2</id>
<content type='text'>
commit cb57720bf79688d64854a0a43565aa52303c1f3f upstream.

If ACPI _PPC changed notification happens before governor was initiated
while kernel is booting, a NULL pointer dereference will be triggered:

BUG: unable to handle kernel NULL pointer dereference at 0000000000000030
 IP: [&lt;ffffffff81470453&gt;] __cpufreq_governor+0x23/0x1e0
 PGD 0
 Oops: 0000 [#1] SMP
 ... ...
 RIP: 0010:[&lt;ffffffff81470453&gt;]  [&lt;ffffffff81470453&gt;]
 __cpufreq_governor+0x23/0x1e0
 RSP: 0018:ffff881fcfbcfbb8  EFLAGS: 00010286
 RAX: 0000000000000000 RBX: ffff881fd11b3980 RCX: ffff88407fc20000
 RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff881fd11b3980
 RBP: ffff881fcfbcfbd8 R08: 0000000000000000 R09: 000000000000000f
 R10: ffffffff818068d0 R11: 0000000000000043 R12: 0000000000000004
 R13: 0000000000000000 R14: ffffffff8196cae0 R15: 0000000000000000
 FS:  0000000000000000(0000) GS:ffff881fffc00000(0000) knlGS:0000000000000000
 CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
 CR2: 0000000000000030 CR3: 00000000018ae000 CR4: 00000000000407f0
 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
 DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
 Process kworker/0:3 (pid: 750, threadinfo ffff881fcfbce000, task
 ffff881fcf556400)
 Stack:
  ffff881fffc17d00 ffff881fcfbcfc18 ffff881fd11b3980 0000000000000000
  ffff881fcfbcfc08 ffffffff81470d08 ffff881fd11b3980 0000000000000007
  ffff881fcfbcfc18 ffff881fffc17d00 ffff881fcfbcfd28 ffffffff81472e9a
 Call Trace:
  [&lt;ffffffff81470d08&gt;] __cpufreq_set_policy+0x1b8/0x2e0
  [&lt;ffffffff81472e9a&gt;] cpufreq_update_policy+0xca/0x150
  [&lt;ffffffff81472f20&gt;] ? cpufreq_update_policy+0x150/0x150
  [&lt;ffffffff81324a96&gt;] acpi_processor_ppc_has_changed+0x71/0x7b
  [&lt;ffffffff81320bcd&gt;] acpi_processor_notify+0x55/0x115
  [&lt;ffffffff812f9c29&gt;] acpi_device_notify+0x19/0x1b
  [&lt;ffffffff813084ca&gt;] acpi_ev_notify_dispatch+0x41/0x5f
  [&lt;ffffffff812f64a4&gt;] acpi_os_execute_deferred+0x27/0x34

The root cause is a race conditon -- cpufreq core and acpi-cpufreq driver
were initiated, but cpufreq_governor wasn't and _PPC changed notification
happened, __cpufreq_governor() was called within acpi_os_execute_deferred
kernel thread context.

To fix this panic issue, add pointer checking code in __cpufreq_governor()
before pointer policy-&gt;governor is to be dereferenced.

Signed-off-by: Ethan Zhao &lt;ethan.zhao@oracle.com&gt;
Acked-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit cb57720bf79688d64854a0a43565aa52303c1f3f upstream.

If ACPI _PPC changed notification happens before governor was initiated
while kernel is booting, a NULL pointer dereference will be triggered:

BUG: unable to handle kernel NULL pointer dereference at 0000000000000030
 IP: [&lt;ffffffff81470453&gt;] __cpufreq_governor+0x23/0x1e0
 PGD 0
 Oops: 0000 [#1] SMP
 ... ...
 RIP: 0010:[&lt;ffffffff81470453&gt;]  [&lt;ffffffff81470453&gt;]
 __cpufreq_governor+0x23/0x1e0
 RSP: 0018:ffff881fcfbcfbb8  EFLAGS: 00010286
 RAX: 0000000000000000 RBX: ffff881fd11b3980 RCX: ffff88407fc20000
 RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff881fd11b3980
 RBP: ffff881fcfbcfbd8 R08: 0000000000000000 R09: 000000000000000f
 R10: ffffffff818068d0 R11: 0000000000000043 R12: 0000000000000004
 R13: 0000000000000000 R14: ffffffff8196cae0 R15: 0000000000000000
 FS:  0000000000000000(0000) GS:ffff881fffc00000(0000) knlGS:0000000000000000
 CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
 CR2: 0000000000000030 CR3: 00000000018ae000 CR4: 00000000000407f0
 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
 DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
 Process kworker/0:3 (pid: 750, threadinfo ffff881fcfbce000, task
 ffff881fcf556400)
 Stack:
  ffff881fffc17d00 ffff881fcfbcfc18 ffff881fd11b3980 0000000000000000
  ffff881fcfbcfc08 ffffffff81470d08 ffff881fd11b3980 0000000000000007
  ffff881fcfbcfc18 ffff881fffc17d00 ffff881fcfbcfd28 ffffffff81472e9a
 Call Trace:
  [&lt;ffffffff81470d08&gt;] __cpufreq_set_policy+0x1b8/0x2e0
  [&lt;ffffffff81472e9a&gt;] cpufreq_update_policy+0xca/0x150
  [&lt;ffffffff81472f20&gt;] ? cpufreq_update_policy+0x150/0x150
  [&lt;ffffffff81324a96&gt;] acpi_processor_ppc_has_changed+0x71/0x7b
  [&lt;ffffffff81320bcd&gt;] acpi_processor_notify+0x55/0x115
  [&lt;ffffffff812f9c29&gt;] acpi_device_notify+0x19/0x1b
  [&lt;ffffffff813084ca&gt;] acpi_ev_notify_dispatch+0x41/0x5f
  [&lt;ffffffff812f64a4&gt;] acpi_os_execute_deferred+0x27/0x34

The root cause is a race conditon -- cpufreq core and acpi-cpufreq driver
were initiated, but cpufreq_governor wasn't and _PPC changed notification
happened, __cpufreq_governor() was called within acpi_os_execute_deferred
kernel thread context.

To fix this panic issue, add pointer checking code in __cpufreq_governor()
before pointer policy-&gt;governor is to be dereferenced.

Signed-off-by: Ethan Zhao &lt;ethan.zhao@oracle.com&gt;
Acked-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cpufreq: s3c: remove incorrect __init annotations</title>
<updated>2015-03-01T22:34:15+00:00</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2015-02-18T20:55:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=206b039ce24d1c5d021b218808622f8d2378f6d5'/>
<id>206b039ce24d1c5d021b218808622f8d2378f6d5</id>
<content type='text'>
commit 61882b63171736571e1139ab5aa929e3bb336016 upstream.

The two functions s3c2416_cpufreq_driver_init and s3c_cpufreq_register
are marked init but are called from a context that might be run after
the __init sections are discarded, as the compiler points out:

WARNING: vmlinux.o(.data+0x1ad9dc): Section mismatch in reference from the variable s3c2416_cpufreq_driver to the function .init.text:s3c2416_cpufreq_driver_init()
WARNING: drivers/built-in.o(.text+0x35b5dc): Section mismatch in reference from the function s3c2410a_cpufreq_add() to the function .init.text:s3c_cpufreq_register()

This removes the __init markings.

Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Acked-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;

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

The two functions s3c2416_cpufreq_driver_init and s3c_cpufreq_register
are marked init but are called from a context that might be run after
the __init sections are discarded, as the compiler points out:

WARNING: vmlinux.o(.data+0x1ad9dc): Section mismatch in reference from the variable s3c2416_cpufreq_driver to the function .init.text:s3c2416_cpufreq_driver_init()
WARNING: drivers/built-in.o(.text+0x35b5dc): Section mismatch in reference from the function s3c2410a_cpufreq_add() to the function .init.text:s3c_cpufreq_register()

This removes the __init markings.

Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Acked-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>cpufreq: speedstep-smi: enable interrupts when waiting</title>
<updated>2015-03-01T22:34:15+00:00</updated>
<author>
<name>Mikulas Patocka</name>
<email>mpatocka@redhat.com</email>
</author>
<published>2015-02-09T18:38:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=442a17659cc37544aced0dca46cbde54278cff68'/>
<id>442a17659cc37544aced0dca46cbde54278cff68</id>
<content type='text'>
commit d4d4eda23794c701442e55129dd4f8f2fefd5e4d upstream.

On Dell Latitude C600 laptop with Pentium 3 850MHz processor, the
speedstep-smi driver sometimes loads and sometimes doesn't load with
"change to state X failed" message.

The hardware sometimes refuses to change frequency and in this case, we
need to retry later. I found out that we need to enable interrupts while
waiting. When we enable interrupts, the hardware blockage that prevents
frequency transition resolves and the transition is possible. With
disabled interrupts, the blockage doesn't resolve (no matter how long do
we wait). The exact reasons for this hardware behavior are unknown.

This patch enables interrupts in the function speedstep_set_state that can
be called with disabled interrupts. However, this function is called with
disabled interrupts only from speedstep_get_freqs, so it shouldn't cause
any problem.

Signed-off-by: Mikulas Patocka &lt;mpatocka@redhat.com
Acked-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;

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

On Dell Latitude C600 laptop with Pentium 3 850MHz processor, the
speedstep-smi driver sometimes loads and sometimes doesn't load with
"change to state X failed" message.

The hardware sometimes refuses to change frequency and in this case, we
need to retry later. I found out that we need to enable interrupts while
waiting. When we enable interrupts, the hardware blockage that prevents
frequency transition resolves and the transition is possible. With
disabled interrupts, the blockage doesn't resolve (no matter how long do
we wait). The exact reasons for this hardware behavior are unknown.

This patch enables interrupts in the function speedstep_set_state that can
be called with disabled interrupts. However, this function is called with
disabled interrupts only from speedstep_get_freqs, so it shouldn't cause
any problem.

Signed-off-by: Mikulas Patocka &lt;mpatocka@redhat.com
Acked-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>cpufreq: intel_pstate: Fix setting max_perf_pct in performance policy</title>
<updated>2014-11-13T18:02:38+00:00</updated>
<author>
<name>Pali Rohár</name>
<email>pali.rohar@gmail.com</email>
</author>
<published>2014-10-15T23:16:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=0d29536419e8608288753527f09c2e27ce03b7a3'/>
<id>0d29536419e8608288753527f09c2e27ce03b7a3</id>
<content type='text'>
commit 36b4bed5cd8f6e17019fa7d380e0836872c7b367 upstream.

Code which changes policy to powersave changes also max_policy_pct based on
max_freq. Code which change max_perf_pct has upper limit base on value
max_policy_pct. When policy is changing from powersave back to performance
then max_policy_pct is not changed. Which means that changing max_perf_pct is
not possible to high values if max_freq was too low in powersave policy.

Test case:

$ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
800000
$ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
3300000
$ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
performance
$ cat /sys/devices/system/cpu/intel_pstate/max_perf_pct
100

$ echo powersave &gt; /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
$ echo 800000 &gt; /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
$ echo 20 &gt; /sys/devices/system/cpu/intel_pstate/max_perf_pct

$ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
powersave
$ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
800000
$ cat /sys/devices/system/cpu/intel_pstate/max_perf_pct
20

$ echo performance &gt; /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
$ echo 3300000 &gt; /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
$ echo 100 &gt; /sys/devices/system/cpu/intel_pstate/max_perf_pct

$ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
performance
$ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
3300000
$ cat /sys/devices/system/cpu/intel_pstate/max_perf_pct
24

And now intel_pstate driver allows to set maximal value for max_perf_pct based
on max_policy_pct which is 24 for previous powersave max_freq 800000.

This patch will set default value for max_policy_pct when setting policy to
performance so it will allow to set also max value for max_perf_pct.

Signed-off-by: Pali Rohár &lt;pali.rohar@gmail.com&gt;
Acked-by: Dirk Brandewie &lt;dirk.j.brandewie@intel.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 36b4bed5cd8f6e17019fa7d380e0836872c7b367 upstream.

Code which changes policy to powersave changes also max_policy_pct based on
max_freq. Code which change max_perf_pct has upper limit base on value
max_policy_pct. When policy is changing from powersave back to performance
then max_policy_pct is not changed. Which means that changing max_perf_pct is
not possible to high values if max_freq was too low in powersave policy.

Test case:

$ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
800000
$ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
3300000
$ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
performance
$ cat /sys/devices/system/cpu/intel_pstate/max_perf_pct
100

$ echo powersave &gt; /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
$ echo 800000 &gt; /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
$ echo 20 &gt; /sys/devices/system/cpu/intel_pstate/max_perf_pct

$ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
powersave
$ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
800000
$ cat /sys/devices/system/cpu/intel_pstate/max_perf_pct
20

$ echo performance &gt; /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
$ echo 3300000 &gt; /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
$ echo 100 &gt; /sys/devices/system/cpu/intel_pstate/max_perf_pct

$ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
performance
$ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
3300000
$ cat /sys/devices/system/cpu/intel_pstate/max_perf_pct
24

And now intel_pstate driver allows to set maximal value for max_perf_pct based
on max_policy_pct which is 24 for previous powersave max_freq 800000.

This patch will set default value for max_policy_pct when setting policy to
performance so it will allow to set also max value for max_perf_pct.

Signed-off-by: Pali Rohár &lt;pali.rohar@gmail.com&gt;
Acked-by: Dirk Brandewie &lt;dirk.j.brandewie@intel.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cpufreq: expose scaling_cur_freq sysfs file for set_policy() drivers</title>
<updated>2014-11-13T18:02:37+00:00</updated>
<author>
<name>Dirk Brandewie</name>
<email>dirk.j.brandewie@intel.com</email>
</author>
<published>2014-10-13T15:37:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=ead5af44a3789ff002b7f903491e91df268aaeff'/>
<id>ead5af44a3789ff002b7f903491e91df268aaeff</id>
<content type='text'>
commit c034b02e213d271b98c45c4a7b54af8f69aaac1e upstream.

Currently the core does not expose scaling_cur_freq for set_policy()
drivers this breaks some userspace monitoring tools.
Change the core to expose this file for all drivers and if the
set_policy() driver supports the get() callback use it to retrieve the
current frequency.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=73741
Signed-off-by: Dirk Brandewie &lt;dirk.j.brandewie@intel.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit c034b02e213d271b98c45c4a7b54af8f69aaac1e upstream.

Currently the core does not expose scaling_cur_freq for set_policy()
drivers this breaks some userspace monitoring tools.
Change the core to expose this file for all drivers and if the
set_policy() driver supports the get() callback use it to retrieve the
current frequency.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=73741
Signed-off-by: Dirk Brandewie &lt;dirk.j.brandewie@intel.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>intel_pstate: Set CPU number before accessing MSRs</title>
<updated>2014-07-18T13:51:24+00:00</updated>
<author>
<name>Vincent Minet</name>
<email>vincent@vincent-minet.net</email>
</author>
<published>2014-07-04T23:51:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=07c07190d1632a504f6f1e504e784651986d16fd'/>
<id>07c07190d1632a504f6f1e504e784651986d16fd</id>
<content type='text'>
commit 179e8471673ce0249cd4ecda796008f7757e5bad upstream.

Ensure that cpu-&gt;cpu is set before writing MSR_IA32_PERF_CTL during CPU
initialization. Otherwise only cpu0 has its P-state set and all other
cores are left with their values unchanged.

In most cases, this is not too serious because the P-states will be set
correctly when the timer function is run.  But when the default governor
is set to performance, the per-CPU current_pstate stays the same forever
and no attempts are made to write the MSRs again.

Signed-off-by: Vincent Minet &lt;vincent@vincent-minet.net&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 179e8471673ce0249cd4ecda796008f7757e5bad upstream.

Ensure that cpu-&gt;cpu is set before writing MSR_IA32_PERF_CTL during CPU
initialization. Otherwise only cpu0 has its P-state set and all other
cores are left with their values unchanged.

In most cases, this is not too serious because the P-states will be set
correctly when the timer function is run.  But when the default governor
is set to performance, the per-CPU current_pstate stays the same forever
and no attempts are made to write the MSRs again.

Signed-off-by: Vincent Minet &lt;vincent@vincent-minet.net&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cpufreq: Makefile: fix compilation for davinci platform</title>
<updated>2014-07-18T13:51:21+00:00</updated>
<author>
<name>Prabhakar Lad</name>
<email>prabhakar.csengg@gmail.com</email>
</author>
<published>2014-07-08T15:25:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=52df57db58770bfcf552f9eb65366696f03328a7'/>
<id>52df57db58770bfcf552f9eb65366696f03328a7</id>
<content type='text'>
commit 5a90af67c2126fe1d04ebccc1f8177e6ca70d3a9 upstream.

Since commtit 8a7b1227e303 (cpufreq: davinci: move cpufreq driver to
drivers/cpufreq) this added dependancy only for CONFIG_ARCH_DAVINCI_DA850
where as davinci_cpufreq_init() call is used by all davinci platform.

This patch fixes following build error:

arch/arm/mach-davinci/built-in.o: In function `davinci_init_late':
:(.init.text+0x928): undefined reference to `davinci_cpufreq_init'
make: *** [vmlinux] Error 1

Fixes: 8a7b1227e303 (cpufreq: davinci: move cpufreq driver to drivers/cpufreq)
Signed-off-by: Lad, Prabhakar &lt;prabhakar.csengg@gmail.com&gt;
Acked-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 5a90af67c2126fe1d04ebccc1f8177e6ca70d3a9 upstream.

Since commtit 8a7b1227e303 (cpufreq: davinci: move cpufreq driver to
drivers/cpufreq) this added dependancy only for CONFIG_ARCH_DAVINCI_DA850
where as davinci_cpufreq_init() call is used by all davinci platform.

This patch fixes following build error:

arch/arm/mach-davinci/built-in.o: In function `davinci_init_late':
:(.init.text+0x928): undefined reference to `davinci_cpufreq_init'
make: *** [vmlinux] Error 1

Fixes: 8a7b1227e303 (cpufreq: davinci: move cpufreq driver to drivers/cpufreq)
Signed-off-by: Lad, Prabhakar &lt;prabhakar.csengg@gmail.com&gt;
Acked-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cpufreq: remove race while accessing cur_policy</title>
<updated>2014-06-20T15:34:00+00:00</updated>
<author>
<name>Bibek Basu</name>
<email>bbasu@nvidia.com</email>
</author>
<published>2014-05-19T04:54:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=3ddbd9a2d572434bd5b63757a70d9532c0027de7'/>
<id>3ddbd9a2d572434bd5b63757a70d9532c0027de7</id>
<content type='text'>
commit c5450db85b828d0c46ac8fc570fb8a51bf07ac40 upstream.

While accessing cur_policy during executing events
CPUFREQ_GOV_START, CPUFREQ_GOV_STOP, CPUFREQ_GOV_LIMITS,
same mutex lock is not taken, dbs_data-&gt;mutex, which leads
to race and data corruption while running continious suspend
resume test. This is seen with ondemand governor with suspend
resume test using rtcwake.

 Unable to handle kernel NULL pointer dereference at virtual address 00000028
 pgd = ed610000
 [00000028] *pgd=adf11831, *pte=00000000, *ppte=00000000
 Internal error: Oops: 17 [#1] PREEMPT SMP ARM
 Modules linked in: nvhost_vi
 CPU: 1 PID: 3243 Comm: rtcwake Not tainted 3.10.24-gf5cf9e5 #1
 task: ee708040 ti: ed61c000 task.ti: ed61c000
 PC is at cpufreq_governor_dbs+0x400/0x634
 LR is at cpufreq_governor_dbs+0x3f8/0x634
 pc : [&lt;c05652b8&gt;] lr : [&lt;c05652b0&gt;] psr: 600f0013
 sp : ed61dcb0 ip : 000493e0 fp : c1cc14f0
 r10: 00000000 r9 : 00000000 r8 : 00000000
 r7 : eb725280 r6 : c1cc1560 r5 : eb575200 r4 : ebad7740
 r3 : ee708040 r2 : ed61dca8 r1 : 001ebd24 r0 : 00000000
 Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user
 Control: 10c5387d Table: ad61006a DAC: 00000015
 [&lt;c05652b8&gt;] (cpufreq_governor_dbs+0x400/0x634) from [&lt;c055f700&gt;] (__cpufreq_governor+0x98/0x1b4)
 [&lt;c055f700&gt;] (__cpufreq_governor+0x98/0x1b4) from [&lt;c0560770&gt;] (__cpufreq_set_policy+0x250/0x320)
 [&lt;c0560770&gt;] (__cpufreq_set_policy+0x250/0x320) from [&lt;c0561dcc&gt;] (cpufreq_update_policy+0xcc/0x168)
 [&lt;c0561dcc&gt;] (cpufreq_update_policy+0xcc/0x168) from [&lt;c0561ed0&gt;] (cpu_freq_notify+0x68/0xdc)
 [&lt;c0561ed0&gt;] (cpu_freq_notify+0x68/0xdc) from [&lt;c008eff8&gt;] (notifier_call_chain+0x4c/0x8c)
 [&lt;c008eff8&gt;] (notifier_call_chain+0x4c/0x8c) from [&lt;c008f3d4&gt;] (__blocking_notifier_call_chain+0x50/0x68)
 [&lt;c008f3d4&gt;] (__blocking_notifier_call_chain+0x50/0x68) from [&lt;c008f40c&gt;] (blocking_notifier_call_chain+0x20/0x28)
 [&lt;c008f40c&gt;] (blocking_notifier_call_chain+0x20/0x28) from [&lt;c00aac6c&gt;] (pm_qos_update_bounded_target+0xd8/0x310)
 [&lt;c00aac6c&gt;] (pm_qos_update_bounded_target+0xd8/0x310) from [&lt;c00ab3b0&gt;] (__pm_qos_update_request+0x64/0x70)
 [&lt;c00ab3b0&gt;] (__pm_qos_update_request+0x64/0x70) from [&lt;c004b4b8&gt;] (tegra_pm_notify+0x114/0x134)
 [&lt;c004b4b8&gt;] (tegra_pm_notify+0x114/0x134) from [&lt;c008eff8&gt;] (notifier_call_chain+0x4c/0x8c)
 [&lt;c008eff8&gt;] (notifier_call_chain+0x4c/0x8c) from [&lt;c008f3d4&gt;] (__blocking_notifier_call_chain+0x50/0x68)
 [&lt;c008f3d4&gt;] (__blocking_notifier_call_chain+0x50/0x68) from [&lt;c008f40c&gt;] (blocking_notifier_call_chain+0x20/0x28)
 [&lt;c008f40c&gt;] (blocking_notifier_call_chain+0x20/0x28) from [&lt;c00ac228&gt;] (pm_notifier_call_chain+0x1c/0x34)
 [&lt;c00ac228&gt;] (pm_notifier_call_chain+0x1c/0x34) from [&lt;c00ad38c&gt;] (enter_state+0xec/0x128)
 [&lt;c00ad38c&gt;] (enter_state+0xec/0x128) from [&lt;c00ad400&gt;] (pm_suspend+0x38/0xa4)
 [&lt;c00ad400&gt;] (pm_suspend+0x38/0xa4) from [&lt;c00ac114&gt;] (state_store+0x70/0xc0)
 [&lt;c00ac114&gt;] (state_store+0x70/0xc0) from [&lt;c027b1e8&gt;] (kobj_attr_store+0x14/0x20)
 [&lt;c027b1e8&gt;] (kobj_attr_store+0x14/0x20) from [&lt;c019cd9c&gt;] (sysfs_write_file+0x104/0x184)
 [&lt;c019cd9c&gt;] (sysfs_write_file+0x104/0x184) from [&lt;c0143038&gt;] (vfs_write+0xd0/0x19c)
 [&lt;c0143038&gt;] (vfs_write+0xd0/0x19c) from [&lt;c0143414&gt;] (SyS_write+0x4c/0x78)
 [&lt;c0143414&gt;] (SyS_write+0x4c/0x78) from [&lt;c000f080&gt;] (ret_fast_syscall+0x0/0x30)
 Code: e1a00006 eb084346 e59b0020 e5951024 (e5903028)
 ---[ end trace 0488523c8f6b0f9d ]---

Signed-off-by: Bibek Basu &lt;bbasu@nvidia.com&gt;
Acked-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit c5450db85b828d0c46ac8fc570fb8a51bf07ac40 upstream.

While accessing cur_policy during executing events
CPUFREQ_GOV_START, CPUFREQ_GOV_STOP, CPUFREQ_GOV_LIMITS,
same mutex lock is not taken, dbs_data-&gt;mutex, which leads
to race and data corruption while running continious suspend
resume test. This is seen with ondemand governor with suspend
resume test using rtcwake.

 Unable to handle kernel NULL pointer dereference at virtual address 00000028
 pgd = ed610000
 [00000028] *pgd=adf11831, *pte=00000000, *ppte=00000000
 Internal error: Oops: 17 [#1] PREEMPT SMP ARM
 Modules linked in: nvhost_vi
 CPU: 1 PID: 3243 Comm: rtcwake Not tainted 3.10.24-gf5cf9e5 #1
 task: ee708040 ti: ed61c000 task.ti: ed61c000
 PC is at cpufreq_governor_dbs+0x400/0x634
 LR is at cpufreq_governor_dbs+0x3f8/0x634
 pc : [&lt;c05652b8&gt;] lr : [&lt;c05652b0&gt;] psr: 600f0013
 sp : ed61dcb0 ip : 000493e0 fp : c1cc14f0
 r10: 00000000 r9 : 00000000 r8 : 00000000
 r7 : eb725280 r6 : c1cc1560 r5 : eb575200 r4 : ebad7740
 r3 : ee708040 r2 : ed61dca8 r1 : 001ebd24 r0 : 00000000
 Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user
 Control: 10c5387d Table: ad61006a DAC: 00000015
 [&lt;c05652b8&gt;] (cpufreq_governor_dbs+0x400/0x634) from [&lt;c055f700&gt;] (__cpufreq_governor+0x98/0x1b4)
 [&lt;c055f700&gt;] (__cpufreq_governor+0x98/0x1b4) from [&lt;c0560770&gt;] (__cpufreq_set_policy+0x250/0x320)
 [&lt;c0560770&gt;] (__cpufreq_set_policy+0x250/0x320) from [&lt;c0561dcc&gt;] (cpufreq_update_policy+0xcc/0x168)
 [&lt;c0561dcc&gt;] (cpufreq_update_policy+0xcc/0x168) from [&lt;c0561ed0&gt;] (cpu_freq_notify+0x68/0xdc)
 [&lt;c0561ed0&gt;] (cpu_freq_notify+0x68/0xdc) from [&lt;c008eff8&gt;] (notifier_call_chain+0x4c/0x8c)
 [&lt;c008eff8&gt;] (notifier_call_chain+0x4c/0x8c) from [&lt;c008f3d4&gt;] (__blocking_notifier_call_chain+0x50/0x68)
 [&lt;c008f3d4&gt;] (__blocking_notifier_call_chain+0x50/0x68) from [&lt;c008f40c&gt;] (blocking_notifier_call_chain+0x20/0x28)
 [&lt;c008f40c&gt;] (blocking_notifier_call_chain+0x20/0x28) from [&lt;c00aac6c&gt;] (pm_qos_update_bounded_target+0xd8/0x310)
 [&lt;c00aac6c&gt;] (pm_qos_update_bounded_target+0xd8/0x310) from [&lt;c00ab3b0&gt;] (__pm_qos_update_request+0x64/0x70)
 [&lt;c00ab3b0&gt;] (__pm_qos_update_request+0x64/0x70) from [&lt;c004b4b8&gt;] (tegra_pm_notify+0x114/0x134)
 [&lt;c004b4b8&gt;] (tegra_pm_notify+0x114/0x134) from [&lt;c008eff8&gt;] (notifier_call_chain+0x4c/0x8c)
 [&lt;c008eff8&gt;] (notifier_call_chain+0x4c/0x8c) from [&lt;c008f3d4&gt;] (__blocking_notifier_call_chain+0x50/0x68)
 [&lt;c008f3d4&gt;] (__blocking_notifier_call_chain+0x50/0x68) from [&lt;c008f40c&gt;] (blocking_notifier_call_chain+0x20/0x28)
 [&lt;c008f40c&gt;] (blocking_notifier_call_chain+0x20/0x28) from [&lt;c00ac228&gt;] (pm_notifier_call_chain+0x1c/0x34)
 [&lt;c00ac228&gt;] (pm_notifier_call_chain+0x1c/0x34) from [&lt;c00ad38c&gt;] (enter_state+0xec/0x128)
 [&lt;c00ad38c&gt;] (enter_state+0xec/0x128) from [&lt;c00ad400&gt;] (pm_suspend+0x38/0xa4)
 [&lt;c00ad400&gt;] (pm_suspend+0x38/0xa4) from [&lt;c00ac114&gt;] (state_store+0x70/0xc0)
 [&lt;c00ac114&gt;] (state_store+0x70/0xc0) from [&lt;c027b1e8&gt;] (kobj_attr_store+0x14/0x20)
 [&lt;c027b1e8&gt;] (kobj_attr_store+0x14/0x20) from [&lt;c019cd9c&gt;] (sysfs_write_file+0x104/0x184)
 [&lt;c019cd9c&gt;] (sysfs_write_file+0x104/0x184) from [&lt;c0143038&gt;] (vfs_write+0xd0/0x19c)
 [&lt;c0143038&gt;] (vfs_write+0xd0/0x19c) from [&lt;c0143414&gt;] (SyS_write+0x4c/0x78)
 [&lt;c0143414&gt;] (SyS_write+0x4c/0x78) from [&lt;c000f080&gt;] (ret_fast_syscall+0x0/0x30)
 Code: e1a00006 eb084346 e59b0020 e5951024 (e5903028)
 ---[ end trace 0488523c8f6b0f9d ]---

Signed-off-by: Bibek Basu &lt;bbasu@nvidia.com&gt;
Acked-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>powernow-k6: reorder frequencies</title>
<updated>2014-04-13T14:22:21+00:00</updated>
<author>
<name>Mikulas Patocka</name>
<email>mpatocka@redhat.com</email>
</author>
<published>2014-04-13T14:22:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=204e4f2573c2f71c21d64be48c120d7472181128'/>
<id>204e4f2573c2f71c21d64be48c120d7472181128</id>
<content type='text'>
commit 22c73795b101597051924556dce019385a1e2fa0 upstream.

This patch reorders reported frequencies from the highest to the lowest,
just like in other frequency drivers.

Signed-off-by: Mikulas Patocka &lt;mpatocka@redhat.com&gt;
Acked-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 22c73795b101597051924556dce019385a1e2fa0 upstream.

This patch reorders reported frequencies from the highest to the lowest,
just like in other frequency drivers.

Signed-off-by: Mikulas Patocka &lt;mpatocka@redhat.com&gt;
Acked-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
</pre>
</div>
</content>
</entry>
</feed>
