<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/drivers/cpufreq/cpufreq.c, branch v3.19</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>cpufreq: fix a NULL pointer dereference in __cpufreq_governor()</title>
<updated>2014-12-19T21:49:07+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.tavy.me/linux.git/commit/?id=cb57720bf79688d64854a0a43565aa52303c1f3f'/>
<id>cb57720bf79688d64854a0a43565aa52303c1f3f</id>
<content type='text'>
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;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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;
</pre>
</div>
</content>
</entry>
<entry>
<title>cpufreq: Introduce -&gt;ready() callback for cpufreq drivers</title>
<updated>2014-11-29T22:38:38+00:00</updated>
<author>
<name>Viresh Kumar</name>
<email>viresh.kumar@linaro.org</email>
</author>
<published>2014-11-27T00:37:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=7c45cf31b3ab9be270a7bf6af2926631dc566436'/>
<id>7c45cf31b3ab9be270a7bf6af2926631dc566436</id>
<content type='text'>
Currently there is no callback for cpufreq drivers which is called once the
policy is ready to be used. There are some requirements where such a callback is
required.

One of them is registering a cooling device with the help of
of_cpufreq_cooling_register(). This routine tries to get 'struct cpufreq_policy'
for CPUs which isn't yet initialed at the time -&gt;init() is called and so we face
issues while registering the cooling device.

Because we can't register cooling device from -&gt;init(), we need a callback that
is called after the policy is ready to be used and hence we introduce -&gt;ready()
callback.

Signed-off-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Reviewed-by: Eduardo Valentin &lt;edubezval@gmail.com&gt;
Tested-by: Eduardo Valentin &lt;edubezval@gmail.com&gt;
Reviewed-by: Lukasz Majewski &lt;l.majewski@samsung.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently there is no callback for cpufreq drivers which is called once the
policy is ready to be used. There are some requirements where such a callback is
required.

One of them is registering a cooling device with the help of
of_cpufreq_cooling_register(). This routine tries to get 'struct cpufreq_policy'
for CPUs which isn't yet initialed at the time -&gt;init() is called and so we face
issues while registering the cooling device.

Because we can't register cooling device from -&gt;init(), we need a callback that
is called after the policy is ready to be used and hence we introduce -&gt;ready()
callback.

Signed-off-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Reviewed-by: Eduardo Valentin &lt;edubezval@gmail.com&gt;
Tested-by: Eduardo Valentin &lt;edubezval@gmail.com&gt;
Reviewed-by: Lukasz Majewski &lt;l.majewski@samsung.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cpufreq: Ref the policy object sooner</title>
<updated>2014-11-25T21:44:17+00:00</updated>
<author>
<name>Tomeu Vizoso</name>
<email>tomeu.vizoso@collabora.com</email>
</author>
<published>2014-11-24T09:08:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=6d4e81ed89c092cb156c8d19cb68c8733cd502b3'/>
<id>6d4e81ed89c092cb156c8d19cb68c8733cd502b3</id>
<content type='text'>
Do it before it's assigned to cpufreq_cpu_data, otherwise when a driver
tries to get the cpu frequency during initialization the policy kobj is
referenced and we get this warning:

------------[ cut here ]------------
WARNING: CPU: 1 PID: 64 at include/linux/kref.h:47 kobject_get+0x64/0x70()
Modules linked in:
CPU: 1 PID: 64 Comm: irq/77-tegra-ac Not tainted 3.18.0-rc4-next-20141114ccu-00050-g3eff942 #326
[&lt;c0016fac&gt;] (unwind_backtrace) from [&lt;c001272c&gt;] (show_stack+0x10/0x14)
[&lt;c001272c&gt;] (show_stack) from [&lt;c06085d8&gt;] (dump_stack+0x98/0xd8)
[&lt;c06085d8&gt;] (dump_stack) from [&lt;c002892c&gt;] (warn_slowpath_common+0x84/0xb4)
[&lt;c002892c&gt;] (warn_slowpath_common) from [&lt;c00289f8&gt;] (warn_slowpath_null+0x1c/0x24)
[&lt;c00289f8&gt;] (warn_slowpath_null) from [&lt;c0220290&gt;] (kobject_get+0x64/0x70)
[&lt;c0220290&gt;] (kobject_get) from [&lt;c03e944c&gt;] (cpufreq_cpu_get+0x88/0xc8)
[&lt;c03e944c&gt;] (cpufreq_cpu_get) from [&lt;c03e9500&gt;] (cpufreq_get+0xc/0x64)
[&lt;c03e9500&gt;] (cpufreq_get) from [&lt;c0285288&gt;] (actmon_thread_isr+0x134/0x198)
[&lt;c0285288&gt;] (actmon_thread_isr) from [&lt;c0069008&gt;] (irq_thread_fn+0x1c/0x40)
[&lt;c0069008&gt;] (irq_thread_fn) from [&lt;c0069324&gt;] (irq_thread+0x134/0x174)
[&lt;c0069324&gt;] (irq_thread) from [&lt;c0040290&gt;] (kthread+0xdc/0xf4)
[&lt;c0040290&gt;] (kthread) from [&lt;c000f4b8&gt;] (ret_from_fork+0x14/0x3c)
---[ end trace b7bd64a81b340c59 ]---

Signed-off-by: Tomeu Vizoso &lt;tomeu.vizoso@collabora.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;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Do it before it's assigned to cpufreq_cpu_data, otherwise when a driver
tries to get the cpu frequency during initialization the policy kobj is
referenced and we get this warning:

------------[ cut here ]------------
WARNING: CPU: 1 PID: 64 at include/linux/kref.h:47 kobject_get+0x64/0x70()
Modules linked in:
CPU: 1 PID: 64 Comm: irq/77-tegra-ac Not tainted 3.18.0-rc4-next-20141114ccu-00050-g3eff942 #326
[&lt;c0016fac&gt;] (unwind_backtrace) from [&lt;c001272c&gt;] (show_stack+0x10/0x14)
[&lt;c001272c&gt;] (show_stack) from [&lt;c06085d8&gt;] (dump_stack+0x98/0xd8)
[&lt;c06085d8&gt;] (dump_stack) from [&lt;c002892c&gt;] (warn_slowpath_common+0x84/0xb4)
[&lt;c002892c&gt;] (warn_slowpath_common) from [&lt;c00289f8&gt;] (warn_slowpath_null+0x1c/0x24)
[&lt;c00289f8&gt;] (warn_slowpath_null) from [&lt;c0220290&gt;] (kobject_get+0x64/0x70)
[&lt;c0220290&gt;] (kobject_get) from [&lt;c03e944c&gt;] (cpufreq_cpu_get+0x88/0xc8)
[&lt;c03e944c&gt;] (cpufreq_cpu_get) from [&lt;c03e9500&gt;] (cpufreq_get+0xc/0x64)
[&lt;c03e9500&gt;] (cpufreq_get) from [&lt;c0285288&gt;] (actmon_thread_isr+0x134/0x198)
[&lt;c0285288&gt;] (actmon_thread_isr) from [&lt;c0069008&gt;] (irq_thread_fn+0x1c/0x40)
[&lt;c0069008&gt;] (irq_thread_fn) from [&lt;c0069324&gt;] (irq_thread+0x134/0x174)
[&lt;c0069324&gt;] (irq_thread) from [&lt;c0040290&gt;] (kthread+0xdc/0xf4)
[&lt;c0040290&gt;] (kthread) from [&lt;c000f4b8&gt;] (ret_from_fork+0x14/0x3c)
---[ end trace b7bd64a81b340c59 ]---

Signed-off-by: Tomeu Vizoso &lt;tomeu.vizoso@collabora.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;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge back cpufreq material for 3.19-rc1.</title>
<updated>2014-11-18T00:22:29+00:00</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rafael.j.wysocki@intel.com</email>
</author>
<published>2014-11-18T00:22:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=bd2a0f6754f18f801ed1e490bf678fc3be013eca'/>
<id>bd2a0f6754f18f801ed1e490bf678fc3be013eca</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>cpufreq: respect the min/max settings from user space</title>
<updated>2014-11-11T22:04:28+00:00</updated>
<author>
<name>Vince Hsu</name>
<email>vinceh@nvidia.com</email>
</author>
<published>2014-11-10T06:14:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=619c144c84bd240487204e91dff88247cde68d92'/>
<id>619c144c84bd240487204e91dff88247cde68d92</id>
<content type='text'>
When the user space tries to set scaling_(max|min)_freq through
sysfs, the cpufreq_set_policy() asks other driver's opinions
for the max/min frequencies. Some device drivers, like Tegra
CPU EDP which is not upstreamed yet though, may constrain the
CPU maximum frequency dynamically because of board design.
So if the user space access happens and some driver is capping
the cpu frequency at the same time, the user_policy-&gt;(max|min)
is overridden by the capped value, and that's not expected by
the user space. And if the user space is not invoked again,
the CPU will always be capped by the user_policy-&gt;(max|min)
even no drivers limit the CPU frequency any more.

This patch preserves the user specified min/max settings, so that
every time the cpufreq policy is updated, the new max/min can
be re-evaluated correctly based on the user's expection and
the present device drivers' status.

Signed-off-by: Vince Hsu &lt;vinceh@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;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When the user space tries to set scaling_(max|min)_freq through
sysfs, the cpufreq_set_policy() asks other driver's opinions
for the max/min frequencies. Some device drivers, like Tegra
CPU EDP which is not upstreamed yet though, may constrain the
CPU maximum frequency dynamically because of board design.
So if the user space access happens and some driver is capping
the cpu frequency at the same time, the user_policy-&gt;(max|min)
is overridden by the capped value, and that's not expected by
the user space. And if the user space is not invoked again,
the CPU will always be capped by the user_policy-&gt;(max|min)
even no drivers limit the CPU frequency any more.

This patch preserves the user specified min/max settings, so that
every time the cpufreq policy is updated, the new max/min can
be re-evaluated correctly based on the user's expection and
the present device drivers' status.

Signed-off-by: Vince Hsu &lt;vinceh@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;
</pre>
</div>
</content>
</entry>
<entry>
<title>cpufreq: Avoid crash in resume on SMP without OPP</title>
<updated>2014-11-08T01:10:04+00:00</updated>
<author>
<name>Geert Uytterhoeven</name>
<email>geert+renesas@glider.be</email>
</author>
<published>2014-11-04T16:05:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=09712f557b31838092e1f22a5f2dd131a843a3de'/>
<id>09712f557b31838092e1f22a5f2dd131a843a3de</id>
<content type='text'>
When resuming from s2ram on an SMP system without cpufreq operating
points (e.g. there's no "operating-points" property for the CPU node in
DT, or the platform doesn't use DT yet), the kernel crashes when
bringing CPU 1 online:

    Enabling non-boot CPUs ...
    CPU1: Booted secondary processor
    Unable to handle kernel NULL pointer dereference at virtual address 0000003c
    pgd = ee5e6b00
    [0000003c] *pgd=6e579003, *pmd=6e588003, *pte=00000000
    Internal error: Oops: a07 [#1] SMP ARM
    Modules linked in:
    CPU: 0 PID: 1246 Comm: s2ram Tainted: G        W      3.18.0-rc3-koelsch-01614-g0377af242bb175c8-dirty #589
    task: eeec5240 ti: ee704000 task.ti: ee704000
    PC is at __cpufreq_add_dev.isra.24+0x24c/0x77c
    LR is at __cpufreq_add_dev.isra.24+0x244/0x77c
    pc : [&lt;c0298efc&gt;]    lr : [&lt;c0298ef4&gt;]    psr: 60000153
    sp : ee705d48  ip : ee705d48  fp : ee705d84
    r10: c04e0450  r9 : 00000000  r8 : 00000001
    r7 : c05426a8  r6 : 00000001  r5 : 00000001  r4 : 00000000
    r3 : 00000000  r2 : 00000000  r1 : 20000153  r0 : c0542734

Verify that policy is not NULL before dereferencing it to fix this.

Signed-off-by: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
Fixes: 8414809c6a1e (cpufreq: Preserve policy structure across suspend/resume)
Cc: 3.12+ &lt;stable@vger.kernel.org&gt; # 3.12+
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When resuming from s2ram on an SMP system without cpufreq operating
points (e.g. there's no "operating-points" property for the CPU node in
DT, or the platform doesn't use DT yet), the kernel crashes when
bringing CPU 1 online:

    Enabling non-boot CPUs ...
    CPU1: Booted secondary processor
    Unable to handle kernel NULL pointer dereference at virtual address 0000003c
    pgd = ee5e6b00
    [0000003c] *pgd=6e579003, *pmd=6e588003, *pte=00000000
    Internal error: Oops: a07 [#1] SMP ARM
    Modules linked in:
    CPU: 0 PID: 1246 Comm: s2ram Tainted: G        W      3.18.0-rc3-koelsch-01614-g0377af242bb175c8-dirty #589
    task: eeec5240 ti: ee704000 task.ti: ee704000
    PC is at __cpufreq_add_dev.isra.24+0x24c/0x77c
    LR is at __cpufreq_add_dev.isra.24+0x244/0x77c
    pc : [&lt;c0298efc&gt;]    lr : [&lt;c0298ef4&gt;]    psr: 60000153
    sp : ee705d48  ip : ee705d48  fp : ee705d84
    r10: c04e0450  r9 : 00000000  r8 : 00000001
    r7 : c05426a8  r6 : 00000001  r5 : 00000001  r4 : 00000000
    r3 : 00000000  r2 : 00000000  r1 : 20000153  r0 : c0542734

Verify that policy is not NULL before dereferencing it to fix this.

Signed-off-by: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
Fixes: 8414809c6a1e (cpufreq: Preserve policy structure across suspend/resume)
Cc: 3.12+ &lt;stable@vger.kernel.org&gt; # 3.12+
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cpufreq: expose scaling_cur_freq sysfs file for set_policy() drivers</title>
<updated>2014-10-23T20:59:59+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.tavy.me/linux.git/commit/?id=c034b02e213d271b98c45c4a7b54af8f69aaac1e'/>
<id>c034b02e213d271b98c45c4a7b54af8f69aaac1e</id>
<content type='text'>
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
Cc: All applicable &lt;stable@vger.kernel.org&gt;
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;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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
Cc: All applicable &lt;stable@vger.kernel.org&gt;
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;
</pre>
</div>
</content>
</entry>
<entry>
<title>cpufreq: allow driver-specific data</title>
<updated>2014-10-20T22:51:01+00:00</updated>
<author>
<name>Thomas Petazzoni</name>
<email>thomas.petazzoni@free-electrons.com</email>
</author>
<published>2014-10-19T09:30:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=51315cdfa0521fff3059cec5fb8ffecc7f37cba7'/>
<id>51315cdfa0521fff3059cec5fb8ffecc7f37cba7</id>
<content type='text'>
This commit extends the cpufreq_driver structure with an additional
'void *driver_data' field that can be filled by the -&gt;probe() function
of a cpufreq driver to pass additional custom information to the
driver itself.

A new function called cpufreq_get_driver_data() is added to allow a
cpufreq driver to retrieve those driver data, since they are typically
needed from a cpufreq_policy-&gt;init() callback, which does not have
access to the cpufreq_driver structure. This function call is similar
to the existing cpufreq_get_current_driver() function call.

Signed-off-by: Thomas Petazzoni &lt;thomas.petazzoni@free-electrons.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;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This commit extends the cpufreq_driver structure with an additional
'void *driver_data' field that can be filled by the -&gt;probe() function
of a cpufreq driver to pass additional custom information to the
driver itself.

A new function called cpufreq_get_driver_data() is added to allow a
cpufreq driver to retrieve those driver data, since they are typically
needed from a cpufreq_policy-&gt;init() callback, which does not have
access to the cpufreq_driver structure. This function call is similar
to the existing cpufreq_get_current_driver() function call.

Signed-off-by: Thomas Petazzoni &lt;thomas.petazzoni@free-electrons.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;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge back cpufreq material for v3.18.</title>
<updated>2014-10-03T13:41:16+00:00</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rafael.j.wysocki@intel.com</email>
</author>
<published>2014-10-03T13:41:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=6f1293ff747ddcb696d546e3efcd31f7cc42b9a5'/>
<id>6f1293ff747ddcb696d546e3efcd31f7cc42b9a5</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>cpufreq: update 'cpufreq_suspended' after stopping governors</title>
<updated>2014-09-30T19:02:34+00:00</updated>
<author>
<name>Viresh Kumar</name>
<email>viresh.kumar@linaro.org</email>
</author>
<published>2014-09-30T04:03:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=b1b12babe3b72cfb08b875245e5a5d7c2747c772'/>
<id>b1b12babe3b72cfb08b875245e5a5d7c2747c772</id>
<content type='text'>
Commit 8e30444e1530 ("cpufreq: fix cpufreq suspend/resume for intel_pstate")
introduced a bug where the governors wouldn't be stopped anymore for
-&gt;target{_index}() drivers during suspend. This happens because
'cpufreq_suspended' is updated before stopping the governors during suspend
and due to this __cpufreq_governor() would return early due to this check:

	/* Don't start any governor operations if we are entering suspend */
	if (cpufreq_suspended)
		return 0;

Fixes: 8e30444e1530 ("cpufreq: fix cpufreq suspend/resume for intel_pstate")
Cc: 3.15+ &lt;stable@vger.kernel.org&gt; # 3.15+: 8e30444e1530 "cpufreq: fix cpufreq suspend/resume for intel_pstate"
Signed-off-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Commit 8e30444e1530 ("cpufreq: fix cpufreq suspend/resume for intel_pstate")
introduced a bug where the governors wouldn't be stopped anymore for
-&gt;target{_index}() drivers during suspend. This happens because
'cpufreq_suspended' is updated before stopping the governors during suspend
and due to this __cpufreq_governor() would return early due to this check:

	/* Don't start any governor operations if we are entering suspend */
	if (cpufreq_suspended)
		return 0;

Fixes: 8e30444e1530 ("cpufreq: fix cpufreq suspend/resume for intel_pstate")
Cc: 3.15+ &lt;stable@vger.kernel.org&gt; # 3.15+: 8e30444e1530 "cpufreq: fix cpufreq suspend/resume for intel_pstate"
Signed-off-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
