linux/drivers/base
Tony Lindgren 69728051f5 PM / wakeirq: Fix unbalanced IRQ enable for wakeirq
If a device is runtime PM suspended when we enter suspend and has
a dedicated wake IRQ, we can get the following warning:

WARNING: CPU: 0 PID: 108 at kernel/irq/manage.c:526 enable_irq+0x40/0x94
[  102.087860] Unbalanced enable for IRQ 147
...
(enable_irq) from [<c06117a8>] (dev_pm_arm_wake_irq+0x4c/0x60)
(dev_pm_arm_wake_irq) from [<c0618360>]
 (device_wakeup_arm_wake_irqs+0x58/0x9c)
(device_wakeup_arm_wake_irqs) from [<c0615948>]
(dpm_suspend_noirq+0x10/0x48)
(dpm_suspend_noirq) from [<c01ac7ac>]
(suspend_devices_and_enter+0x30c/0xf14)
(suspend_devices_and_enter) from [<c01adf20>]
(enter_state+0xad4/0xbd8)
(enter_state) from [<c01ad3ec>] (pm_suspend+0x38/0x98)
(pm_suspend) from [<c01ab3e8>] (state_store+0x68/0xc8)

This is because the dedicated wake IRQ for the device may have been
already enabled earlier by dev_pm_enable_wake_irq_check().  Fix the
issue by checking for runtime PM suspended status.

This issue can be easily reproduced by setting serial console log level
to zero, letting the serial console idle, and suspend the system from
an ssh terminal.  On resume, dmesg will have the warning above.

The reason why I have not run into this issue earlier has been that I
typically run my PM test cases from on a serial console instead over ssh.

Fixes: c843455975 (PM / wakeirq: Enable dedicated wakeirq for suspend)
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2018-02-12 11:10:09 +01:00
..
power PM / wakeirq: Fix unbalanced IRQ enable for wakeirq 2018-02-12 11:10:09 +01:00
regmap Char/Misc driver patches for 4.16-rc1 2018-02-01 10:31:17 -08:00
test driver core: Remove redundant license text 2017-12-07 18:36:44 +01:00
arch_topology.c drivers: core: arch_topology.c: move SPDX tag to top of the file 2017-12-07 18:36:43 +01:00
attribute_container.c driver core: Remove redundant license text 2017-12-07 18:36:44 +01:00
base.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
bus.c drivers: base: omit redundant interations 2017-12-18 16:47:27 +01:00
cacheinfo.c Merge 4.15-rc6 into driver-core-next 2018-01-02 14:56:51 +01:00
class.c driver core: Remove redundant license text 2017-12-07 18:36:44 +01:00
component.c component: add debugfs support 2017-12-18 16:51:11 +01:00
container.c driver core: Remove redundant license text 2017-12-07 18:36:44 +01:00
core.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/pmladek/printk 2018-02-01 13:36:15 -08:00
cpu.c Driver Core updates for 4.16-rc1 2018-02-01 10:00:28 -08:00
dd.c drivers: base: add coredump driver ops 2018-01-23 09:47:05 +01:00
devcoredump.c driver core: Remove redundant license text 2017-12-07 18:36:44 +01:00
devres.c driver core: Remove redundant license text 2017-12-07 18:36:44 +01:00
devtmpfs.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
dma-coherent.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
dma-contiguous.c driver core: Remove redundant license text 2017-12-07 18:36:44 +01:00
dma-mapping.c driver core: Remove redundant license text 2017-12-07 18:36:44 +01:00
driver.c drivers: base: omit redundant interations 2017-12-18 16:47:27 +01:00
firmware_class.c driver core: add SPDX identifiers to all driver core files 2017-12-07 18:36:43 +01:00
firmware.c driver core: Remove redundant license text 2017-12-07 18:36:44 +01:00
hypervisor.c driver core: Remove redundant license text 2017-12-07 18:36:44 +01:00
init.c driver core: Remove redundant license text 2017-12-07 18:36:44 +01:00
isa.c Merge 4.15-rc3 into driver-core-next 2017-12-11 08:50:05 +01:00
Kconfig drm/graphics pull request for v4.16-rc1 2018-02-01 17:48:47 -08:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
map.c driver core: Remove redundant license text 2017-12-07 18:36:44 +01:00
memory.c mm/memory_failure: Remove unused trapno from memory_failure 2018-01-23 12:17:42 -06:00
module.c driver core: Remove redundant license text 2017-12-07 18:36:44 +01:00
node.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
pinctrl.c driver core: Remove redundant license text 2017-12-07 18:36:44 +01:00
platform-msi.c driver core: Remove redundant license text 2017-12-07 18:36:44 +01:00
platform.c driver core: Remove redundant license text 2017-12-07 18:36:44 +01:00
property.c Driver Core updates for 4.16-rc1 2018-02-01 10:00:28 -08:00
soc.c driver core: Remove redundant license text 2017-12-07 18:36:44 +01:00
syscore.c driver core: Remove redundant license text 2017-12-07 18:36:44 +01:00
topology.c driver core: Remove redundant license text 2017-12-07 18:36:44 +01:00
transport_class.c driver core: Remove redundant license text 2017-12-07 18:36:44 +01:00