WSL2-Linux-Kernel/drivers
Tony Lindgren c064b7c1d2 PM / wakeirq: Fix unbalanced IRQ enable for wakeirq
[ Upstream commit 69728051f5 ]

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>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-26 11:02:20 +02:00
..
accessibility License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
acpi ACPI / EC: Restore polling during noirq suspend/resume phases 2018-04-26 11:02:19 +02:00
amba License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
android binder: replace "%p" with "%pK" 2018-02-25 11:07:52 +01:00
ata libata: Modify quirks for MX100 to limit NCQ_TRIM quirk to MU01 version 2018-03-28 18:24:37 +02:00
atm atm: horizon: Fix irq release error 2017-12-14 09:53:13 +01:00
auxdisplay auxdisplay: img-ascii-lcd: add missing MODULE_DESCRIPTION/AUTHOR/LICENSE 2018-02-07 11:12:20 -08:00
base PM / wakeirq: Fix unbalanced IRQ enable for wakeirq 2018-04-26 11:02:20 +02:00
bcma License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
block block/loop: fix deadlock after loop_set_status 2018-04-19 08:56:18 +02:00
bluetooth Bluetooth: hci_bcm: Treat Interrupt ACPI resources as always being active-low 2018-04-19 08:56:19 +02:00
bus sunxi-rsb: Include OF based modalias in device uevent 2018-01-10 09:31:19 +01:00
cdrom License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
char ipmi/powernv: Fix error return code in ipmi_powernv_probe() 2018-04-26 11:02:08 +02:00
clk clk: bcm2835: De-assert/assert PLL reset signal when appropriate 2018-04-24 09:36:34 +02:00
clocksource clocksource/imx-tpm: Correct -ETIME return condition check 2018-04-26 11:02:02 +02:00
connector
cpufreq cpufreq: intel_pstate: Enable HWP during system resume on CPU0 2018-04-26 11:02:18 +02:00
cpuidle cpuidle: fix broadcast control when broadcast can not be entered 2017-12-25 14:26:30 +01:00
crypto crypto: artpec6 - remove select on non-existing CRYPTO_SHA384 2018-04-26 11:02:12 +02:00
dax dev/dax: fix uninitialized variable build warning 2017-12-20 10:10:34 +01:00
dca
devfreq PM / devfreq: Fix potential NULL pointer dereference in governor_store 2018-04-12 12:32:13 +02:00
dio License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
dma dmaengine: at_xdmac: fix rare residue corruption 2018-04-24 09:36:32 +02:00
dma-buf dma-buf/fence: Fix lock inversion within dma-fence-array 2018-03-19 08:42:47 +01:00
edac x86/mce/AMD, EDAC/mce_amd: Enumerate Reserved SMCA bank type 2018-04-19 08:56:20 +02:00
eisa License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
extcon extcon: intel-cht-wc: Set direction and drv flags for V5 boost GPIO 2018-04-24 09:36:29 +02:00
firewire firewire-ohci: work around oversized DMA reads on JMicron controllers 2018-04-26 11:02:03 +02:00
firmware firmware: dmi_scan: Fix handling of empty DMI strings 2018-04-26 11:02:16 +02:00
fmc License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
fpga fpga: region: release of_parse_phandle nodes after use 2018-02-07 11:12:26 -08:00
fsi
gpio gpio: thunderx: fix error return code in thunderx_gpio_probe() 2018-04-12 12:32:20 +02:00
gpu drm/nouveau/pmu/fuc: don't use movw directly anymore 2018-04-26 11:02:15 +02:00
hid HID: roccat: prevent an out of bounds read in kovaplus_profile_activated() 2018-04-26 11:02:10 +02:00
hsi License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
hv Drivers: hv: vmbus: do not mark HV_PCIE as perf_device 2018-04-19 08:56:16 +02:00
hwmon hwmon: (ina2xx) Fix access to uninitialized mutex 2018-04-19 08:56:20 +02:00
hwspinlock License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
hwtracing coresight: Fix disabling of CoreSight TPIU 2018-03-24 11:01:26 +01:00
i2c i2c: i801: Restore configuration at shutdown 2018-04-24 09:36:27 +02:00
ide ide: ide-atapi: fix compile error with defining macro DEBUG 2017-12-17 15:08:00 +01:00
idle Revert "x86/mm: Stop calling leave_mm() in idle code" 2017-11-04 15:01:50 +01:00
iio iio: imu: st_lsm6dsx: fix endianness in st_lsm6dsx_read_oneshot() 2018-03-28 18:24:49 +02:00
infiniband IB/ipoib: Fix for potential no-carrier state 2018-04-26 11:02:15 +02:00
input Input: stmfts - set IRQ_NOAUTOEN to the irq flag 2018-04-26 11:02:10 +02:00
iommu iommu/vt-d: Use domain instead of cache fetching 2018-04-26 11:02:06 +02:00
ipack
irqchip irqchip/gic: Take lock when updating irq type 2018-04-24 09:36:29 +02:00
isdn License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
leds leds: pm8058: Silence pointer to integer size warning 2018-03-19 08:42:50 +01:00
lightnvm lightnvm: pblk: protect line bitmap while submitting meta io 2017-12-20 10:10:38 +01:00
macintosh License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mailbox mailbox: mailbox-test: don't rely on rx_buffer content to signal data ready 2017-12-14 09:53:12 +01:00
mcb License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
md bcache: return attach error when no cache set exist 2018-04-26 11:02:18 +02:00
media media: vsp1: Fix BRx conditional path in WPF 2018-04-24 09:36:25 +02:00
memory License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
memstick License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
message License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mfd mfd: twl6040: Fix child-node lookup 2017-12-29 17:53:46 +01:00
misc cxl: Fix possible deadlock when processing page faults from cxllib 2018-04-24 09:36:32 +02:00
mmc mmc: sdhci-pci: Only do AMD tuning for HS200 2018-04-24 09:36:38 +02:00
mtd ubi: Reject MLC NAND 2018-04-24 09:36:22 +02:00
mux mux: core: fix double get_device() 2018-01-17 09:45:27 +01:00
net net: stmmac: discard disabled flags in interrupt status register 2018-04-26 11:02:19 +02:00
nfc License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
ntb ntb_transport: Fix bug with max_mw_size parameter 2018-04-26 11:02:13 +02:00
nubus License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
nvdimm libnvdimm, namespace: use a safe lookup for dimm device name 2018-04-24 09:36:32 +02:00
nvme nvme_fcloop: fix abort race condition 2018-04-12 12:32:16 +02:00
nvmem License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
of of_mdio: avoid MDIO bus removal when a PHY is missing 2018-03-03 10:24:37 +01:00
oprofile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
parisc parisc: Hide Diva-built-in serial aux and graphics card 2017-12-29 17:53:47 +01:00
parport parport_pc: Add support for WCH CH382L PCI-E single parallel port card. 2018-04-08 14:26:31 +02:00
pci PCI: Add function 1 DMA alias quirk for Marvell 9128 2018-04-26 11:02:05 +02:00
pcmcia License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
perf License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
phy phy: allwinner: sun4i-usb: poll vbus changes on A23/A33 when driving VBUS 2018-04-24 09:36:23 +02:00
pinctrl pinctrl: baytrail: Enable glitch filter for GPIOs used as interrupts 2018-04-12 12:32:16 +02:00
platform platform/x86: thinkpad_acpi: suppress warning about palm detection 2018-04-26 11:02:11 +02:00
pnp License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
power power: supply: axp288_charger: Properly stop work on probe-error / remove 2018-04-12 12:32:17 +02:00
powercap
pps
ps3
ptp License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
pwm pwm: rcar: Fix a condition to prevent mismatch value setting to duty 2018-04-24 09:36:34 +02:00
rapidio drivers/rapidio/devices/rio_mport_cdev.c: fix resource leak in error handling path in 'rio_dma_transfer()' 2017-12-14 09:53:08 +01:00
ras License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
regulator regulator: stm32-vrefbuf: fix check on ready flag 2018-03-15 10:54:28 +01:00
remoteproc License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
reset License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
rpmsg rpmsg: glink: Initialize the "intent_req_comp" completion variable 2017-12-20 10:10:29 +01:00
rtc clk: divider: fix incorrect usage of container_of 2018-04-12 12:32:13 +02:00
s390 s390/qdio: don't merge ERROR output buffers 2018-04-19 08:56:18 +02:00
sbus License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
scsi scsi: fas216: fix sense buffer initialization 2018-04-26 11:02:10 +02:00
sfi
sh License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
sn
soc soc: mediatek: fix the mistaken pointer accessed when subdomains are added 2018-04-24 09:36:28 +02:00
spi spi: a3700: Clear DATA_OUT when performing a read 2018-04-26 11:02:07 +02:00
spmi
ssb License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
staging media: staging: lirc_zilog: incorrect reference counting 2018-04-24 09:36:39 +02:00
target tcmu: release blocks for partially setup cmds 2018-04-12 12:32:21 +02:00
tc
tee optee: fix invalid of_node_put() in optee_driver_init() 2017-12-25 14:26:24 +01:00
thermal thermal: imx: Fix race condition in imx_thermal_probe() 2018-04-24 09:36:34 +02:00
thunderbolt thunderbolt: Prevent crash when ICM firmware is not running 2018-04-24 09:36:29 +02:00
tty tty: serial: exar: Relocate sleep wake-up handling 2018-04-26 11:02:11 +02:00
uio uio_hv_generic: check that host supports monitor page 2018-04-12 12:32:19 +02:00
usb usb: musb: Fix external abort in musb_remove on omap2430 2018-04-26 11:02:03 +02:00
uwb License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
vfio vfio/pci: Virtualize Maximum Read Request Size 2018-04-24 09:36:34 +02:00
vhost vhost: Fix vhost_copy_to_user() 2018-04-19 08:56:16 +02:00
video backlight: tdo24m: Fix the SPI CS between transfers 2018-04-12 12:32:16 +02:00
virt
virtio virtio_ring: fix num_free handling in error case 2018-03-15 10:54:32 +01:00
vlynq
vme License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
w1 License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
watchdog watchdog: sp5100_tco: Fix watchdog disable bit 2018-04-26 11:02:08 +02:00
xen xen/grant-table: Use put_page instead of free_page 2018-04-26 11:02:17 +02:00
zorro License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Kconfig License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Makefile usb: build drivers/usb/common/ when USB_SUPPORT is set 2018-02-25 11:07:53 +01:00