<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/base/power, branch v4.5.4</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v4.5.4</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v4.5.4'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2016-05-04T21:49:11+00:00</updated>
<entry>
<title>PM / Domains: Fix removal of a subdomain</title>
<updated>2016-05-04T21:49:11+00:00</updated>
<author>
<name>Jon Hunter</name>
<email>jonathanh@nvidia.com</email>
</author>
<published>2016-03-04T10:55:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=074b8d8788e1ffa41e1517e79f7fc192c2966f02'/>
<id>urn:sha1:074b8d8788e1ffa41e1517e79f7fc192c2966f02</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:49:11+00:00</updated>
<author>
<name>Viresh Kumar</name>
<email>viresh.kumar@linaro.org</email>
</author>
<published>2016-02-15T04:51:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0ea539773e0169e14a4209d48fcb1a6a67519d6d'/>
<id>urn:sha1:0ea539773e0169e14a4209d48fcb1a6a67519d6d</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 'pm-core' and 'pm-domains'</title>
<updated>2016-02-05T23:34:01+00:00</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rafael.j.wysocki@intel.com</email>
</author>
<published>2016-02-05T23:34:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=79e2f8dd522873614eb31001745af487451a10de'/>
<id>urn:sha1:79e2f8dd522873614eb31001745af487451a10de</id>
<content type='text'>
* pm-core:
  PM: Avoid false-positive warnings in dev_pm_domain_set()
  ACPI / LPSS: set PM domain via helper setter

* pm-domains:
  PM / Domains: Silence compiler warning for an unused function
</content>
</entry>
<entry>
<title>PM: Avoid false-positive warnings in dev_pm_domain_set()</title>
<updated>2016-02-03T18:10:37+00:00</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rafael.j.wysocki@intel.com</email>
</author>
<published>2016-01-30T11:54:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e79aee49bcf9ad005b3f2f4cf68b17dc2c22d9c2'/>
<id>urn:sha1:e79aee49bcf9ad005b3f2f4cf68b17dc2c22d9c2</id>
<content type='text'>
There is a WARN_ON() in dev_pm_domain_set() that triggers on attempts
to set the pm_domain pointer for devices with a driver bound.

However, that WARN_ON() triggers on attempts to clear the pointer
too and the test it uses is based on checking the device's
p-&gt;knode_driver pointer which still is set when the device bus
type's/driver's -&gt;remove callback has been executed.  This
leads to false-positive warnings when bus type code calls
dev_pm_domain_set() to clear the pm_domain pointer after
invoking the driver's -&gt;remove() callback.

To avoid those false-positives, make dev_pm_domain_set() check
if the pointer passed to it is NULL and skip the warning in
that case.

Fixes: 989561de9b51 (PM / Domains: add setter for dev.pm_domain)
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Tested-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Tested-by: Sinan Kaya &lt;okaya@codeaurora.org&gt;
Tested-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Acked-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
</content>
</entry>
<entry>
<title>PM / Domains: Silence compiler warning for an unused function</title>
<updated>2016-02-03T00:24:36+00:00</updated>
<author>
<name>Ulf Hansson</name>
<email>ulf.hansson@linaro.org</email>
</author>
<published>2016-02-01T13:52:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=53af16f79fbc3f06df76f6d82adcd4ed03b3d752'/>
<id>urn:sha1:53af16f79fbc3f06df76f6d82adcd4ed03b3d752</id>
<content type='text'>
The only remaining caller of genpd_poweron() is conditionally compiled
based on CONFIG_PM_GENERIC_DOMAINS_OF, so we get a warning when that is
unset.

By moving the locking/unlocking of the genpd outside genpd_poweron(), thus
to the caller, genpd_poweron() becomes redundant.

Within this context let's then rename the wrapper function,
__genpd_poweron(), to genpd_poweron() as it will then be consistent with
its friend genpd_poweroff().

This change silence the warning about the unused function.

Reported-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Fixes: ea823c7cbffa "PM / Domains: Remove pm_genpd_poweron() API"
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
Acked-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Cc: 4.4+ &lt;stable@vger.kernel.org&gt; # 4.4+
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>Merge branches 'pm-cpuidle', 'pm-cpufreq', 'pm-domains' and 'pm-sleep'</title>
<updated>2016-01-29T20:45:17+00:00</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rafael.j.wysocki@intel.com</email>
</author>
<published>2016-01-29T20:45:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ad1ac94767aa9d74c6533e33e768a14d2715162f'/>
<id>urn:sha1:ad1ac94767aa9d74c6533e33e768a14d2715162f</id>
<content type='text'>
* pm-cpuidle:
  cpuidle: coupled: remove unused define cpuidle_coupled_lock
  cpuidle: fix fallback mechanism for suspend to idle in absence of enter_freeze

* pm-cpufreq:
  cpufreq: cpufreq-dt: avoid uninitialized variable warnings:
  cpufreq: pxa2xx: fix pxa_cpufreq_change_voltage prototype
  cpufreq: Use list_is_last() to check last entry of the policy list
  cpufreq: Fix NULL reference crash while accessing policy-&gt;governor_data

* pm-domains:
  PM / Domains: Fix typo in comment
  PM / Domains: Fix potential deadlock while adding/removing subdomains
  PM / domains: fix lockdep issue for all subdomains

* pm-sleep:
  PM: APM_EMULATION does not depend on PM
</content>
</entry>
<entry>
<title>PM / Domains: Fix typo in comment</title>
<updated>2016-01-27T22:07:29+00:00</updated>
<author>
<name>Moritz Fischer</name>
<email>moritz.fischer@ettus.com</email>
</author>
<published>2016-01-27T07:29:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a3d09c73492e57a1189e410f67e4d2115b23a3a8'/>
<id>urn:sha1:a3d09c73492e57a1189e410f67e4d2115b23a3a8</id>
<content type='text'>
Acked-by: Kevin Hilman &lt;khilman@baylibre.com&gt;
Signed-off-by: Moritz Fischer &lt;moritz.fischer@ettus.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>PM / Domains: Fix potential deadlock while adding/removing subdomains</title>
<updated>2016-01-27T22:01:25+00:00</updated>
<author>
<name>Ulf Hansson</name>
<email>ulf.hansson@linaro.org</email>
</author>
<published>2016-01-27T08:10:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=cdb300a041f5df1dfbde1367f95109b6449d1371'/>
<id>urn:sha1:cdb300a041f5df1dfbde1367f95109b6449d1371</id>
<content type='text'>
We must preserve the same order of how we acquire and release the lock for
genpd, as otherwise we may encounter deadlocks.

The power on phase of a genpd starts by acquiring its lock. Then it walks
the hierarchy of its parent domains to be able to power on these first, as
per design of genpd.

From a locking perspective this means the locks of the parents becomes
acquired after the lock of the subdomain.

Let's fix pm_genpd_add|remove_subdomain() to maintain the same order of
acquiring/releasing the genpd lock as being applied in the power on/off
sequence.

Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>PM / domains: fix lockdep issue for all subdomains</title>
<updated>2016-01-22T01:31:32+00:00</updated>
<author>
<name>Marek Szyprowski</name>
<email>m.szyprowski@samsung.com</email>
</author>
<published>2016-01-20T09:13:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0106ef5146f9e89e4dc9354f308ecaddb9617310'/>
<id>urn:sha1:0106ef5146f9e89e4dc9354f308ecaddb9617310</id>
<content type='text'>
During genpd_poweron, genpd-&gt;lock is acquired recursively for each
parent (master) domain, which are separate objects. This confuses
lockdep, which considers every operation on genpd-&gt;lock as being done on
the same lock class. This leads to the following false positive warning:

=============================================
[ INFO: possible recursive locking detected ]
4.4.0-rc4-xu3s #32 Not tainted
---------------------------------------------
swapper/0/1 is trying to acquire lock:
 (&amp;genpd-&gt;lock){+.+...}, at: [&lt;c0361550&gt;] __genpd_poweron+0x64/0x108

but task is already holding lock:
 (&amp;genpd-&gt;lock){+.+...}, at: [&lt;c0361af8&gt;] genpd_dev_pm_attach+0x168/0x1b8

other info that might help us debug this:
 Possible unsafe locking scenario:

       CPU0
       ----
  lock(&amp;genpd-&gt;lock);
  lock(&amp;genpd-&gt;lock);

 *** DEADLOCK ***

 May be due to missing lock nesting notation

3 locks held by swapper/0/1:
 #0:  (&amp;dev-&gt;mutex){......}, at: [&lt;c0350910&gt;] __driver_attach+0x48/0x98
 #1:  (&amp;dev-&gt;mutex){......}, at: [&lt;c0350920&gt;] __driver_attach+0x58/0x98
 #2:  (&amp;genpd-&gt;lock){+.+...}, at: [&lt;c0361af8&gt;] genpd_dev_pm_attach+0x168/0x1b8

stack backtrace:
CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.4.0-rc4-xu3s #32
Hardware name: SAMSUNG EXYNOS (Flattened Device Tree)
[&lt;c0016c98&gt;] (unwind_backtrace) from [&lt;c00139c4&gt;] (show_stack+0x10/0x14)
[&lt;c00139c4&gt;] (show_stack) from [&lt;c0270df0&gt;] (dump_stack+0x84/0xc4)
[&lt;c0270df0&gt;] (dump_stack) from [&lt;c00780b8&gt;] (__lock_acquire+0x1f88/0x215c)
[&lt;c00780b8&gt;] (__lock_acquire) from [&lt;c007886c&gt;] (lock_acquire+0xa4/0xd0)
[&lt;c007886c&gt;] (lock_acquire) from [&lt;c0641f2c&gt;] (mutex_lock_nested+0x70/0x4d4)
[&lt;c0641f2c&gt;] (mutex_lock_nested) from [&lt;c0361550&gt;] (__genpd_poweron+0x64/0x108)
[&lt;c0361550&gt;] (__genpd_poweron) from [&lt;c0361b00&gt;] (genpd_dev_pm_attach+0x170/0x1b8)
[&lt;c0361b00&gt;] (genpd_dev_pm_attach) from [&lt;c03520a8&gt;] (platform_drv_probe+0x2c/0xac)
[&lt;c03520a8&gt;] (platform_drv_probe) from [&lt;c03507d4&gt;] (driver_probe_device+0x208/0x2fc)
[&lt;c03507d4&gt;] (driver_probe_device) from [&lt;c035095c&gt;] (__driver_attach+0x94/0x98)
[&lt;c035095c&gt;] (__driver_attach) from [&lt;c034ec14&gt;] (bus_for_each_dev+0x68/0x9c)
[&lt;c034ec14&gt;] (bus_for_each_dev) from [&lt;c034fec8&gt;] (bus_add_driver+0x1a0/0x218)
[&lt;c034fec8&gt;] (bus_add_driver) from [&lt;c035115c&gt;] (driver_register+0x78/0xf8)
[&lt;c035115c&gt;] (driver_register) from [&lt;c0338488&gt;] (exynos_drm_register_drivers+0x28/0x74)
[&lt;c0338488&gt;] (exynos_drm_register_drivers) from [&lt;c0338594&gt;] (exynos_drm_init+0x6c/0xc4)
[&lt;c0338594&gt;] (exynos_drm_init) from [&lt;c00097f4&gt;] (do_one_initcall+0x90/0x1dc)
[&lt;c00097f4&gt;] (do_one_initcall) from [&lt;c0895e08&gt;] (kernel_init_freeable+0x158/0x1f8)
[&lt;c0895e08&gt;] (kernel_init_freeable) from [&lt;c063ecac&gt;] (kernel_init+0x8/0xe8)
[&lt;c063ecac&gt;] (kernel_init) from [&lt;c000f7d0&gt;] (ret_from_fork+0x14/0x24)

This patch replaces mutex_lock with mutex_lock_nested() and uses
recursion depth to annotate each genpd-&gt;lock operation with separate
lockdep subclass.

Reported-by: Anand Moon &lt;linux.amoon@gmail.com&gt;
Signed-off-by: Marek Szyprowski &lt;m.szyprowski@samsung.com&gt;
Tested-by: Anand Moon &lt;linux.amoon@gmail.com&gt;
Tested-by: Tobias Jakobi &lt;tjakobi@math.uni-bielefeld.de&gt;
Acked-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'pm-core'</title>
<updated>2016-01-20T23:42:59+00:00</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rafael.j.wysocki@intel.com</email>
</author>
<published>2016-01-20T23:42:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6efd3f8cde1d6acc20a715ac6ea17e01421742df'/>
<id>urn:sha1:6efd3f8cde1d6acc20a715ac6ea17e01421742df</id>
<content type='text'>
* pm-core:
  driver core: Avoid NULL pointer dereferences in device_is_bound()
  platform: Do not detach from PM domains on shutdown
  USB / PM: Allow USB devices to remain runtime-suspended when sleeping
  PM / sleep: Go direct_complete if driver has no callbacks
  PM / Domains: add setter for dev.pm_domain
  device core: add device_is_bound()
</content>
</entry>
</feed>
