<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/base/power, branch v4.5</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v4.5</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.5'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2016-02-05T23:34:01Z</updated>
<entry>
<title>Merge branches 'pm-core' and 'pm-domains'</title>
<updated>2016-02-05T23:34:01Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rafael.j.wysocki@intel.com</email>
</author>
<published>2016-02-05T23:34:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/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:37Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rafael.j.wysocki@intel.com</email>
</author>
<published>2016-01-30T11:54:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/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:36Z</updated>
<author>
<name>Ulf Hansson</name>
<email>ulf.hansson@linaro.org</email>
</author>
<published>2016-02-01T13:52:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/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:17Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rafael.j.wysocki@intel.com</email>
</author>
<published>2016-01-29T20:45:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/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:29Z</updated>
<author>
<name>Moritz Fischer</name>
<email>moritz.fischer@ettus.com</email>
</author>
<published>2016-01-27T07:29:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/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:25Z</updated>
<author>
<name>Ulf Hansson</name>
<email>ulf.hansson@linaro.org</email>
</author>
<published>2016-01-27T08:10:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/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:32Z</updated>
<author>
<name>Marek Szyprowski</name>
<email>m.szyprowski@samsung.com</email>
</author>
<published>2016-01-20T09:13:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/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:59Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rafael.j.wysocki@intel.com</email>
</author>
<published>2016-01-20T23:42:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/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>
<entry>
<title>Merge branch 'pm-domains'</title>
<updated>2016-01-12T00:11:35Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rafael.j.wysocki@intel.com</email>
</author>
<published>2016-01-12T00:11:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=932680692aeb115f84396ae7e44bf132c03635a1'/>
<id>urn:sha1:932680692aeb115f84396ae7e44bf132c03635a1</id>
<content type='text'>
* pm-domains:
  PM / Domains: export symbols to add/remove devices from genpd
</content>
</entry>
<entry>
<title>Merge branch 'pm-opp'</title>
<updated>2016-01-12T00:11:14Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rafael.j.wysocki@intel.com</email>
</author>
<published>2016-01-12T00:11:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7f4a3702bda0f9f5d34f0241cc81467a55162d7a'/>
<id>urn:sha1:7f4a3702bda0f9f5d34f0241cc81467a55162d7a</id>
<content type='text'>
* pm-opp:
  PM / OPP: Use snprintf() instead of sprintf()
  PM / OPP: Set cpu_dev-&gt;id in cpumask first
  PM / OPP: Fix parsing of opp-microvolt and opp-microamp properties
  PM / OPP: Parse 'opp-&lt;prop&gt;-&lt;name&gt;' bindings
  PM / OPP: Parse 'opp-supported-hw' binding
  PM / OPP: Add missing doc comments
  ARM: dts: exynos4412: Rename OPP nodes as opp@&lt;opp-hz&gt;
  PM / OPP: Rename OPP nodes as opp@&lt;opp-hz&gt;
  PM / OPP: Remove 'operating-points-names' binding
  PM / OPP: Add {opp-microvolt|opp-microamp}-&lt;name&gt; binding
  PM / OPP: Add "opp-supported-hw" binding
  PM / OPP: Add debugfs support
</content>
</entry>
</feed>
