<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/drivers/base/power, branch v4.4.63</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.4.63</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.4.63'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2017-01-12T10:22:49Z</updated>
<entry>
<title>PM / wakeirq: Fix dedicated wakeirq for drivers not using autosuspend</title>
<updated>2017-01-12T10:22:49Z</updated>
<author>
<name>Tony Lindgren</name>
<email>tony@atomide.com</email>
</author>
<published>2016-12-06T00:38:16Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=b0cb7f60998c776fa5696f24a21b685954b15881'/>
<id>urn:sha1:b0cb7f60998c776fa5696f24a21b685954b15881</id>
<content type='text'>
commit bed570307ed78f21b77cb04a1df781dee4a8f05a upstream.

I noticed some wakeirq flakeyness with consumer drivers not using
autosuspend. For drivers not using autosuspend, the wakeirq may never
get unmasked in rpm_suspend() because of irq desc-&gt;depth.

We are configuring dedicated wakeirqs to start with IRQ_NOAUTOEN as we
naturally don't want them running until rpm_suspend() is called.

However, when a consumer driver initially calls pm_runtime_get(), we
now wrongly start with disable_irq_nosync() call on the dedicated
wakeirq that is disabled to start with.

This causes desc-&gt;depth to toggle between 1 and 2 instead of the usual
0 and 1. This can prevent enable_irq() from unmasking the wakeirq as
that only happens at desc-&gt;depth 1.

This does not necessarily show up with drivers using autosuspend as
there is time for disable_irq_nosync() before rpm_suspend() gets called
after the autosuspend timeout.

Let's fix the issue by adding wirq-&gt;status that lazily gets set on
the first rpm_suspend(). We also need PM runtime core private functions
for dev_pm_enable_wake_irq_check() and dev_pm_disable_wake_irq_check()
so we can enable the dedicated wakeirq on the first rpm_suspend().

While at it, let's also fix the comments for dev_pm_enable_wake_irq()
and dev_pm_disable_wake_irq(). Those can still be used by the consumer
drivers as needed because the IRQ core manages the interrupt usecount
for us.

Fixes: 4990d4fe327b (PM / Wakeirq: Add automated device wake IRQ handling)
Signed-off-by: Tony Lindgren &lt;tony@atomide.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>PM / sleep: don't suspend parent when async child suspend_{noirq, late} fails</title>
<updated>2016-11-26T08:54:53Z</updated>
<author>
<name>Brian Norris</name>
<email>briannorris@chromium.org</email>
</author>
<published>2016-11-10T01:21:08Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=04c0800c73b23c74e70bf1a579dd383c26f823a0'/>
<id>urn:sha1:04c0800c73b23c74e70bf1a579dd383c26f823a0</id>
<content type='text'>
commit 6f75c3fd56daf547d684127a7f83c283c3c160d1 upstream.

Consider two devices, A and B, where B is a child of A, and B utilizes
asynchronous suspend (it does not matter whether A is sync or async). If
B fails to suspend_noirq() or suspend_late(), or is interrupted by a
wakeup (pm_wakeup_pending()), then it aborts and sets the async_error
variable. However, device A does not (immediately) check the async_error
variable; it may continue to run its own suspend_noirq()/suspend_late()
callback. This is bad.

We can resolve this problem by doing our error and wakeup checking
(particularly, for the async_error flag) after waiting for children to
suspend, instead of before. This also helps align the logic for the noirq and
late suspend cases with the logic in __device_suspend().

It's easy to observe this erroneous behavior by, for example, forcing a
device to sleep a bit in its suspend_noirq() (to ensure the parent is
waiting for the child to complete), then return an error, and watch the
parent suspend_noirq() still get called. (Or similarly, fake a wakeup
event at the right (or is it wrong?) time.)

Fixes: de377b397272 (PM / sleep: Asynchronous threads for suspend_late)
Fixes: 28b6fd6e3779 (PM / sleep: Asynchronous threads for suspend_noirq)
Reported-by: Jeffy Chen &lt;jeffy.chen@rock-chips.com&gt;
Signed-off-by: Brian Norris &lt;briannorris@chromium.org&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>PM / sleep: Handle failures in device_suspend_late() consistently</title>
<updated>2016-06-08T01:14:37Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rafael.j.wysocki@intel.com</email>
</author>
<published>2016-05-20T21:09:49Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=98c28450538d0a191d031cce8852e568b62a1127'/>
<id>urn:sha1:98c28450538d0a191d031cce8852e568b62a1127</id>
<content type='text'>
commit 3a17fb329da68cb00558721aff876a80bba2fdb9 upstream.

Grygorii Strashko reports:

 The PM runtime will be left disabled for the device if its
 .suspend_late() callback fails and async suspend is not allowed
 for this device. In this case device will not be added in
 dpm_late_early_list and dpm_resume_early() will ignore this
 device, as result PM runtime will be disabled for it forever
 (side effect: after 8 subsequent failures for the same device
 the PM runtime will be reenabled due to disable_depth overflow).

To fix this problem, add devices to dpm_late_early_list regardless
of whether or not device_suspend_late() returns errors for them.

That will ensure failures in there to be handled consistently for
all devices regardless of their async suspend/resume status.

Reported-by: Grygorii Strashko &lt;grygorii.strashko@ti.com&gt;
Tested-by: Grygorii Strashko &lt;grygorii.strashko@ti.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>PM / Runtime: Fix error path in pm_runtime_force_resume()</title>
<updated>2016-06-08T01:14:34Z</updated>
<author>
<name>Ulf Hansson</name>
<email>ulf.hansson@linaro.org</email>
</author>
<published>2016-04-08T11:10:23Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=a1e15f5ae6d69e834b751b719d007b380f4a42fb'/>
<id>urn:sha1:a1e15f5ae6d69e834b751b719d007b380f4a42fb</id>
<content type='text'>
commit 0ae3aeefabbeef26294e7a349b51f1c761d46c9f upstream.

As pm_runtime_set_active() may fail because the device's parent isn't
active, we can end up executing the -&gt;runtime_resume() callback for the
device when it isn't allowed.

Fix this by invoking pm_runtime_set_active() before running the callback
and let's also deal with the error code.

Fixes: 37f204164dfb (PM: Add pm_runtime_suspend|resume_force functions)
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
Reviewed-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>PM / Domains: Fix removal of a subdomain</title>
<updated>2016-05-04T21:48:51Z</updated>
<author>
<name>Jon Hunter</name>
<email>jonathanh@nvidia.com</email>
</author>
<published>2016-03-04T10:55:14Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=cab4c949ade11ac67f69bc05124c9d6ffef31917'/>
<id>urn:sha1:cab4c949ade11ac67f69bc05124c9d6ffef31917</id>
<content type='text'>
commit beda5fc1ff9b527059290a97b672d2ee0eb7b92f upstream.

Commit 30e7a65b3fdb (PM / Domains: Ensure subdomain is not in use
before removing) added a test to ensure that a subdomain is not a
master to another subdomain or if any devices are using the subdomain
before removing. This change incorrectly used the "slave_links" list to
determine if the subdomain is a master to another subdomain, where it
should have been using the "master_links" list instead. The
"slave_links" list will never be empty for a subdomain and so a
subdomain can never be removed. Fix this by testing if the
"master_links" list is empty instead.

Fixes: 30e7a65b3fdb (PM / Domains: Ensure subdomain is not in use before removing)
Signed-off-by: Jon Hunter &lt;jonathanh@nvidia.com&gt;
Reviewed-by: Thierry Reding &lt;treding@nvidia.com&gt;
Acked-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
Acked-by: Kevin Hilman &lt;khilman@baylibre.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>PM / OPP: Initialize u_volt_min/max to a valid value</title>
<updated>2016-05-04T21:48:51Z</updated>
<author>
<name>Viresh Kumar</name>
<email>viresh.kumar@linaro.org</email>
</author>
<published>2016-02-15T04:51:53Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=dabe14168a929839b4757f496ad6886489078997'/>
<id>urn:sha1:dabe14168a929839b4757f496ad6886489078997</id>
<content type='text'>
commit c88c395f4a6485f23f81e385c79945d68bcd5c5d upstream.

We kept u_volt_min/max initialized to 0, when only the target voltage is
present in DT, instead of the target/min/max triplet.

This didn't go well with the regulator framework, as on few calls the
min voltage was set to target and max was set to 0 and so resulted in a
kernel crash like below:

kernel BUG at ../drivers/regulator/core.c:216!

[&lt;c0684af4&gt;] (regulator_check_voltage) from [&lt;c06857ac&gt;] (regulator_set_voltage_unlocked+0x58/0x230)
[&lt;c06857ac&gt;] (regulator_set_voltage_unlocked) from [&lt;c06859ac&gt;] (regulator_set_voltage+0x28/0x54)
[&lt;c06859ac&gt;] (regulator_set_voltage) from [&lt;c0775b28&gt;] (_set_opp_voltage+0x30/0x98)
[&lt;c0775b28&gt;] (_set_opp_voltage) from [&lt;c0776630&gt;] (dev_pm_opp_set_rate+0xf0/0x28c)
[&lt;c0776630&gt;] (dev_pm_opp_set_rate) from [&lt;c096f784&gt;] (__cpufreq_driver_target+0x184/0x2b4)
[&lt;c096f784&gt;] (__cpufreq_driver_target) from [&lt;c0973760&gt;] (dbs_check_cpu+0x1b0/0x1f4)
[&lt;c0973760&gt;] (dbs_check_cpu) from [&lt;c0973f30&gt;] (cpufreq_governor_dbs+0x324/0x5c4)
[&lt;c0973f30&gt;] (cpufreq_governor_dbs) from [&lt;c0970958&gt;] (__cpufreq_governor+0xe4/0x1ec)
[&lt;c0970958&gt;] (__cpufreq_governor) from [&lt;c09711e0&gt;] (cpufreq_init_policy+0x64/0x8c)
[&lt;c09711e0&gt;] (cpufreq_init_policy) from [&lt;c09718cc&gt;] (cpufreq_online+0x2fc/0x708)
[&lt;c09718cc&gt;] (cpufreq_online) from [&lt;c0765ff0&gt;] (subsys_interface_register+0x94/0xd8)
[&lt;c0765ff0&gt;] (subsys_interface_register) from [&lt;c0970530&gt;] (cpufreq_register_driver+0x14c/0x19c)
[&lt;c0970530&gt;] (cpufreq_register_driver) from [&lt;c09746dc&gt;] (dt_cpufreq_probe+0x70/0xec)
[&lt;c09746dc&gt;] (dt_cpufreq_probe) from [&lt;c076907c&gt;] (platform_drv_probe+0x4c/0xb0)
[&lt;c076907c&gt;] (platform_drv_probe) from [&lt;c07678e0&gt;] (driver_probe_device+0x214/0x2c0)
[&lt;c07678e0&gt;] (driver_probe_device) from [&lt;c0767a18&gt;] (__driver_attach+0x8c/0x90)
[&lt;c0767a18&gt;] (__driver_attach) from [&lt;c0765c2c&gt;] (bus_for_each_dev+0x68/0x9c)
[&lt;c0765c2c&gt;] (bus_for_each_dev) from [&lt;c0766d78&gt;] (bus_add_driver+0x1a0/0x218)
[&lt;c0766d78&gt;] (bus_add_driver) from [&lt;c076810c&gt;] (driver_register+0x78/0xf8)
[&lt;c076810c&gt;] (driver_register) from [&lt;c0301d74&gt;] (do_one_initcall+0x90/0x1d8)
[&lt;c0301d74&gt;] (do_one_initcall) from [&lt;c1100e14&gt;] (kernel_init_freeable+0x15c/0x1fc)
[&lt;c1100e14&gt;] (kernel_init_freeable) from [&lt;c0b27a0c&gt;] (kernel_init+0x8/0xf0)
[&lt;c0b27a0c&gt;] (kernel_init) from [&lt;c0307d78&gt;] (ret_from_fork+0x14/0x3c)
Code: e1550004 baffffeb e3a00000 e8bd8070 (e7f001f2)

Fix that by initializing u_volt_min/max to the target voltage in such cases.

Reported-and-tested-by: Krzysztof Kozlowski &lt;k.kozlowski@samsung.com&gt;
Fixes: 274659029c9d (PM / OPP: Add support to parse "operating-points-v2" bindings)
Signed-off-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: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>Merge branches 'powercap', 'pm-cpufreq' and 'pm-domains'</title>
<updated>2015-12-14T21:58:57Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rafael.j.wysocki@intel.com</email>
</author>
<published>2015-12-14T21:58:57Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=f1b9fc591e437ec07626ba84e1d81be19cb00eb6'/>
<id>urn:sha1:f1b9fc591e437ec07626ba84e1d81be19cb00eb6</id>
<content type='text'>
* powercap:
  powercap / RAPL: fix BIOS lock check

* pm-cpufreq:
  cpufreq: intel_pstate: Minor cleanup for FRAC_BITS
  cpufreq: tegra: add regulator dependency for T124

* pm-domains:
  PM / Domains: Allow runtime PM callbacks to be re-used during system PM
</content>
</entry>
<entry>
<title>PM / Domains: Allow runtime PM callbacks to be re-used during system PM</title>
<updated>2015-12-10T00:37:34Z</updated>
<author>
<name>Ulf Hansson</name>
<email>ulf.hansson@linaro.org</email>
</author>
<published>2015-11-30T15:21:38Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=ffe12855a5f7f195589130197558e6a5c276caa4'/>
<id>urn:sha1:ffe12855a5f7f195589130197558e6a5c276caa4</id>
<content type='text'>
A runtime PM centric subsystem/driver may typically use the runtime PM
helpers, pm_runtime_force_suspend|resume() in the system PM path. This
means the genpd's runtime PM callbacks might be invoked even when runtime
PM has been disabled for the device.

To properly cope with these and similar scenarios when these helper
functions are used, change genpd to skip validating and measuring the
device PM QOS latency.

This is needed because otherwise genpd may prevent the device to be put
into low power state. If this occurs during system PM, it causes the
sequence to be aborted as a device's system PM callback returns -EBUSY.

Fixes: ba2bbfbf6307 (PM / Domains: Remove intermediate states from the power off sequence)
Reported-by: Cao Minh Hiep &lt;cm-hiep@jinso.co.jp&gt;
Reported-by: Harunaga &lt;nx-truong@jinso.co.jp&gt;
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
Cc: 4.3+ &lt;stable@vger.kernel.org&gt; # 4.3+
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>Merge branches 'pm-domains' and 'pm-cpufreq'</title>
<updated>2015-12-04T13:01:42Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rafael.j.wysocki@intel.com</email>
</author>
<published>2015-12-04T13:01:42Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=d441fe25e7de576e36a3cd96f22b737d2f15372a'/>
<id>urn:sha1:d441fe25e7de576e36a3cd96f22b737d2f15372a</id>
<content type='text'>
* pm-domains:
  PM / Domains: Fix bad of_node_put() in failure paths of genpd_dev_pm_attach()
  PM / Domains: Validate cases of a non-bound driver in genpd governor

* pm-cpufreq:
  cpufreq: use last policy after online for drivers with -&gt;setpolicy
</content>
</entry>
<entry>
<title>PM / Domains: Fix bad of_node_put() in failure paths of genpd_dev_pm_attach()</title>
<updated>2015-12-04T00:21:17Z</updated>
<author>
<name>Eric Anholt</name>
<email>eric@anholt.net</email>
</author>
<published>2015-12-01T17:39:31Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=265e2cf672aaa9421e7012b4aa30c0ed80f1a447'/>
<id>urn:sha1:265e2cf672aaa9421e7012b4aa30c0ed80f1a447</id>
<content type='text'>
It looks like these meant to be unreffing the
of_parse_phandle_with_args() node, since the error paths above it
don't do of_node_put.  That function returns a new ref in pd_args.np,
though, not a new ref on dev-&gt;of_node.  Also, it would have leaked the
ref in the success case.

Fixes "ERROR: Bad of_node_put()" on bcm2835 in the -EPROBE_DEFER case.

Fixes: aa42240ab254 (PM / Domains: Add generic OF-based PM domain look-up)
Signed-off-by: Eric Anholt &lt;eric@anholt.net&gt;
Acked-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
Acked-by: Kevin Hilman &lt;khilman@linaro.org&gt;
Cc: 3.18+ &lt;stable@vger.kernel.org&gt; # 3.18+
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
</feed>
