<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/drivers/base, branch v4.5-rc2</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>Merge tag 'driver-core-4.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core</title>
<updated>2016-02-01T00:55:04+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2016-02-01T00:55:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=f3ca903fbbb0d26221a39cbebfe6dd4efbebd3ef'/>
<id>f3ca903fbbb0d26221a39cbebfe6dd4efbebd3ef</id>
<content type='text'>
Pull driver core fix from Greg KH:
 "Here's a single driver core fix that resolves an issue a lot of users
  have been hitting for a while now.  It's been tested a lot and has
  been in linux-next successfully for a while"

* tag 'driver-core-4.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
  base/platform: Fix platform drivers with no probe callback
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Pull driver core fix from Greg KH:
 "Here's a single driver core fix that resolves an issue a lot of users
  have been hitting for a while now.  It's been tested a lot and has
  been in linux-next successfully for a while"

* tag 'driver-core-4.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
  base/platform: Fix platform drivers with no probe callback
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip</title>
<updated>2016-01-31T22:48:58+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2016-01-31T22:48:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=30e4c9ad04a7bec4a04b975ce1ad5541d74e1906'/>
<id>30e4c9ad04a7bec4a04b975ce1ad5541d74e1906</id>
<content type='text'>
Pull IRQ fixes from Ingo Molnar:
 "Mostly irqchip driver fixes, but also an irq core crash fix and a
  build fix"

* 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  irqchip/mxs: Add missing set_handle_irq()
  irqchip/atmel-aic: Fix wrong bit operation for IRQ priority
  irqchip/gic-v3-its: Recompute the number of pages on page size change
  base: Export platform_msi_domain_[alloc,free]_irqs
  of: MSI: Simplify irqdomain lookup
  irqdomain: Allow domain lookup with DOMAIN_BUS_WIRED token
  irqchip: Fix dependencies for archs w/o HAS_IOMEM
  irqchip/s3c24xx: Mark init_eint as __maybe_unused
  genirq: Validate action before dereferencing it in handle_irq_event_percpu()
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Pull IRQ fixes from Ingo Molnar:
 "Mostly irqchip driver fixes, but also an irq core crash fix and a
  build fix"

* 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  irqchip/mxs: Add missing set_handle_irq()
  irqchip/atmel-aic: Fix wrong bit operation for IRQ priority
  irqchip/gic-v3-its: Recompute the number of pages on page size change
  base: Export platform_msi_domain_[alloc,free]_irqs
  of: MSI: Simplify irqdomain lookup
  irqdomain: Allow domain lookup with DOMAIN_BUS_WIRED token
  irqchip: Fix dependencies for archs w/o HAS_IOMEM
  irqchip/s3c24xx: Mark init_eint as __maybe_unused
  genirq: Validate action before dereferencing it in handle_irq_event_percpu()
</pre>
</div>
</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.tavy.me/linux.git/commit/?id=ad1ac94767aa9d74c6533e33e768a14d2715162f'/>
<id>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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* 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
</pre>
</div>
</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.tavy.me/linux.git/commit/?id=a3d09c73492e57a1189e410f67e4d2115b23a3a8'/>
<id>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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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;
</pre>
</div>
</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.tavy.me/linux.git/commit/?id=cdb300a041f5df1dfbde1367f95109b6449d1371'/>
<id>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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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;
</pre>
</div>
</content>
</entry>
<entry>
<title>base/platform: Fix platform drivers with no probe callback</title>
<updated>2016-01-26T16:47:25+00:00</updated>
<author>
<name>Martin Wilck</name>
<email>Martin.Wilck@ts.fujitsu.com</email>
</author>
<published>2015-11-30T11:50:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=25cad69f21f5532d99e2ee73c8ab6512bcab614c'/>
<id>25cad69f21f5532d99e2ee73c8ab6512bcab614c</id>
<content type='text'>
Since b8b2c7d845d5, platform_drv_probe() is called for all platform
devices. If drv-&gt;probe is NULL, and dev_pm_domain_attach() fails,
platform_drv_probe() will return the error code from dev_pm_domain_attach().

This causes real_probe() to enter the "probe_failed" path and set
dev-&gt;driver to NULL. Before b8b2c7d845d5, real_probe() would assume
success if both dev-&gt;bus-&gt;probe and drv-&gt;probe were missing. As a result,
a device and driver could be "bound" together just by matching their names;
this doesn't work any more after b8b2c7d845d5.

This may cause problems later for certain usage of platform_driver_register()
and platform_device_register_simple(). I observed a panic while loading
the tpm_tis driver with parameter "force=1" (i.e. registering tpm_tis as
a platform driver), because tpm_tis_init's assumption that the device
returned by platform_device_register_simple() was bound didn't hold any more
(tpmm_chip_alloc() dereferences chip-&gt;pdev-&gt;driver, causing panic).

This patch restores the previous (4.3.0 and earlier) behavior of
platform_drv_probe() in the case when the associated platform driver has
no "probe" function.

Fixes: b8b2c7d845d5 ("base/platform: assert that dev_pm_domain callbacks are called unconditionally")
Signed-off-by: Martin Wilck &lt;Martin.Wilck@ts.fujitsu.com&gt;
Cc: stable &lt;stable@vger.kernel.org&gt; # 4.4
Cc: Martin Fuzzey &lt;mfuzzey@parkeon.com&gt;
Acked-by: Jarkko Sakkinen &lt;jarkko.sakkinen@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since b8b2c7d845d5, platform_drv_probe() is called for all platform
devices. If drv-&gt;probe is NULL, and dev_pm_domain_attach() fails,
platform_drv_probe() will return the error code from dev_pm_domain_attach().

This causes real_probe() to enter the "probe_failed" path and set
dev-&gt;driver to NULL. Before b8b2c7d845d5, real_probe() would assume
success if both dev-&gt;bus-&gt;probe and drv-&gt;probe were missing. As a result,
a device and driver could be "bound" together just by matching their names;
this doesn't work any more after b8b2c7d845d5.

This may cause problems later for certain usage of platform_driver_register()
and platform_device_register_simple(). I observed a panic while loading
the tpm_tis driver with parameter "force=1" (i.e. registering tpm_tis as
a platform driver), because tpm_tis_init's assumption that the device
returned by platform_device_register_simple() was bound didn't hold any more
(tpmm_chip_alloc() dereferences chip-&gt;pdev-&gt;driver, causing panic).

This patch restores the previous (4.3.0 and earlier) behavior of
platform_drv_probe() in the case when the associated platform driver has
no "probe" function.

Fixes: b8b2c7d845d5 ("base/platform: assert that dev_pm_domain callbacks are called unconditionally")
Signed-off-by: Martin Wilck &lt;Martin.Wilck@ts.fujitsu.com&gt;
Cc: stable &lt;stable@vger.kernel.org&gt; # 4.4
Cc: Martin Fuzzey &lt;mfuzzey@parkeon.com&gt;
Acked-by: Jarkko Sakkinen &lt;jarkko.sakkinen@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>base: Export platform_msi_domain_[alloc,free]_irqs</title>
<updated>2016-01-26T15:33:25+00:00</updated>
<author>
<name>Thomas Petazzoni</name>
<email>thomas.petazzoni@free-electrons.com</email>
</author>
<published>2016-01-26T13:52:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=bb1a793125d9cc61f2d1cff92fe3927fec45d528'/>
<id>bb1a793125d9cc61f2d1cff92fe3927fec45d528</id>
<content type='text'>
The new function platform_msi_domain_{alloc,free}_irqs are meant to be
used in platform drivers, which can be built as modules. Therefore, it
makes sense to export them to be used from kernel modules.

Signed-off-by: Thomas Petazzoni &lt;thomas.petazzoni@free-electrons.com&gt;
Acked-by: Marc Zyngier &lt;marc.zyngier@arm.com&gt;
Cc: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Cc: Rob Herring &lt;robh+dt@kernel.org&gt;
Cc: Frank Rowand &lt;frowand.list@gmail.com&gt;
Cc: Grant Likely &lt;grant.likely@linaro.org&gt;
Cc: Jiang Liu &lt;jiang.liu@linux.intel.com&gt;
Link: http://lkml.kernel.org/r/1453816347-32720-4-git-send-email-marc.zyngier@arm.com
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The new function platform_msi_domain_{alloc,free}_irqs are meant to be
used in platform drivers, which can be built as modules. Therefore, it
makes sense to export them to be used from kernel modules.

Signed-off-by: Thomas Petazzoni &lt;thomas.petazzoni@free-electrons.com&gt;
Acked-by: Marc Zyngier &lt;marc.zyngier@arm.com&gt;
Cc: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Cc: Rob Herring &lt;robh+dt@kernel.org&gt;
Cc: Frank Rowand &lt;frowand.list@gmail.com&gt;
Cc: Grant Likely &lt;grant.likely@linaro.org&gt;
Cc: Jiang Liu &lt;jiang.liu@linux.intel.com&gt;
Link: http://lkml.kernel.org/r/1453816347-32720-4-git-send-email-marc.zyngier@arm.com
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>wrappers for -&gt;i_mutex access</title>
<updated>2016-01-22T23:04:28+00:00</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2016-01-22T20:40:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=5955102c9984fa081b2d570cfac75c97eecf8f3b'/>
<id>5955102c9984fa081b2d570cfac75c97eecf8f3b</id>
<content type='text'>
parallel to mutex_{lock,unlock,trylock,is_locked,lock_nested},
inode_foo(inode) being mutex_foo(&amp;inode-&gt;i_mutex).

Please, use those for access to -&gt;i_mutex; over the coming cycle
-&gt;i_mutex will become rwsem, with -&gt;lookup() done with it held
only shared.

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
parallel to mutex_{lock,unlock,trylock,is_locked,lock_nested},
inode_foo(inode) being mutex_foo(&amp;inode-&gt;i_mutex).

Please, use those for access to -&gt;i_mutex; over the coming cycle
-&gt;i_mutex will become rwsem, with -&gt;lookup() done with it held
only shared.

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</pre>
</div>
</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.tavy.me/linux.git/commit/?id=0106ef5146f9e89e4dc9354f308ecaddb9617310'/>
<id>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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'akpm' (patches from Andrew)</title>
<updated>2016-01-21T20:32:08+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2016-01-21T20:32:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=eae21770b4fed5597623aad0d618190fa60426ff'/>
<id>eae21770b4fed5597623aad0d618190fa60426ff</id>
<content type='text'>
Merge third patch-bomb from Andrew Morton:
 "I'm pretty much done for -rc1 now:

   - the rest of MM, basically

   - lib/ updates

   - checkpatch, epoll, hfs, fatfs, ptrace, coredump, exit

   - cpu_mask simplifications

   - kexec, rapidio, MAINTAINERS etc, etc.

   - more dma-mapping cleanups/simplifications from hch"

* emailed patches from Andrew Morton &lt;akpm@linux-foundation.org&gt;: (109 commits)
  MAINTAINERS: add/fix git URLs for various subsystems
  mm: memcontrol: add "sock" to cgroup2 memory.stat
  mm: memcontrol: basic memory statistics in cgroup2 memory controller
  mm: memcontrol: do not uncharge old page in page cache replacement
  Documentation: cgroup: add memory.swap.{current,max} description
  mm: free swap cache aggressively if memcg swap is full
  mm: vmscan: do not scan anon pages if memcg swap limit is hit
  swap.h: move memcg related stuff to the end of the file
  mm: memcontrol: replace mem_cgroup_lruvec_online with mem_cgroup_online
  mm: vmscan: pass memcg to get_scan_count()
  mm: memcontrol: charge swap to cgroup2
  mm: memcontrol: clean up alloc, online, offline, free functions
  mm: memcontrol: flatten struct cg_proto
  mm: memcontrol: rein in the CONFIG space madness
  net: drop tcp_memcontrol.c
  mm: memcontrol: introduce CONFIG_MEMCG_LEGACY_KMEM
  mm: memcontrol: allow to disable kmem accounting for cgroup2
  mm: memcontrol: account "kmem" consumers in cgroup2 memory controller
  mm: memcontrol: move kmem accounting code to CONFIG_MEMCG
  mm: memcontrol: separate kmem code from legacy tcp accounting code
  ...
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Merge third patch-bomb from Andrew Morton:
 "I'm pretty much done for -rc1 now:

   - the rest of MM, basically

   - lib/ updates

   - checkpatch, epoll, hfs, fatfs, ptrace, coredump, exit

   - cpu_mask simplifications

   - kexec, rapidio, MAINTAINERS etc, etc.

   - more dma-mapping cleanups/simplifications from hch"

* emailed patches from Andrew Morton &lt;akpm@linux-foundation.org&gt;: (109 commits)
  MAINTAINERS: add/fix git URLs for various subsystems
  mm: memcontrol: add "sock" to cgroup2 memory.stat
  mm: memcontrol: basic memory statistics in cgroup2 memory controller
  mm: memcontrol: do not uncharge old page in page cache replacement
  Documentation: cgroup: add memory.swap.{current,max} description
  mm: free swap cache aggressively if memcg swap is full
  mm: vmscan: do not scan anon pages if memcg swap limit is hit
  swap.h: move memcg related stuff to the end of the file
  mm: memcontrol: replace mem_cgroup_lruvec_online with mem_cgroup_online
  mm: vmscan: pass memcg to get_scan_count()
  mm: memcontrol: charge swap to cgroup2
  mm: memcontrol: clean up alloc, online, offline, free functions
  mm: memcontrol: flatten struct cg_proto
  mm: memcontrol: rein in the CONFIG space madness
  net: drop tcp_memcontrol.c
  mm: memcontrol: introduce CONFIG_MEMCG_LEGACY_KMEM
  mm: memcontrol: allow to disable kmem accounting for cgroup2
  mm: memcontrol: account "kmem" consumers in cgroup2 memory controller
  mm: memcontrol: move kmem accounting code to CONFIG_MEMCG
  mm: memcontrol: separate kmem code from legacy tcp accounting code
  ...
</pre>
</div>
</content>
</entry>
</feed>
