linux/drivers
Ulf Hansson a2bd7be12b PM: sleep: Fix runtime PM based cpuidle support
In the cpuidle-psci case, runtime PM in combination with the generic PM
domain (genpd), may be used when entering/exiting a shared idlestate. More
precisely, genpd relies on runtime PM to be enabled for the attached device
(in this case it belongs to a CPU), to properly manage the reference
counting of its PM domain.

This works fine most of the time, but during system suspend in
dpm_suspend_late(), the PM core disables runtime PM for all devices. Beyond
this point, calls to pm_runtime_get_sync() to runtime resume a device may
fail and therefore it could also mess up the reference counting in genpd.

To fix this problem, let's call wake_up_all_idle_cpus() in
dpm_suspend_late(), prior to disabling runtime PM. In this way a device
that belongs to a CPU, becomes runtime resumed through cpuidle-psci and
stays like that, because the runtime PM usage count has been bumped in
device_prepare().

Diagnosed-by: Maulik Shah <mkshah@codeaurora.org>
Suggested-by: Rafael J. Wysocki <rafael@kernel.org>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2021-11-04 19:45:38 +01:00
..
accessibility
acpi ACPI updates for 5.16-rc1 2021-11-02 15:58:39 -07:00
amba ARM: 9119/1: amba: Properly handle device probe without IRQ domain 2021-10-19 10:30:53 +01:00
android selinux/stable-5.16 PR 20211101 2021-11-01 21:06:18 -07:00
ata libata changes for 5.16 2021-11-02 10:45:34 -07:00
atm
auxdisplay
base PM: sleep: Fix runtime PM based cpuidle support 2021-11-04 19:45:38 +01:00
bcma
block for-5.16/inode-sync-2021-10-29 2021-11-01 10:25:27 -07:00
bluetooth
bus Driver core fixes for 5.15-rc6 2021-10-17 17:17:28 -10:00
cdrom for-5.16/cdrom-2021-10-29 2021-11-01 10:09:14 -07:00
char Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2021-11-01 21:24:02 -07:00
clk One fix for the composite clk that broke when we changed this clk type 2021-10-30 09:55:46 -07:00
clocksource ARM: 2021-11-02 11:24:14 -07:00
comedi
connector
counter
cpufreq Merge branches 'pm-em' and 'powercap' 2021-11-02 19:31:28 +01:00
cpuidle
crypto Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2021-11-01 21:24:02 -07:00
cxl
dax
dca
devfreq PM / devfreq: Strengthen check for freq_table 2021-10-27 14:22:12 +09:00
dio
dma dmaengine: pxa_dma: Prefer struct_size over open coded arithmetic 2021-10-20 18:35:22 -05:00
dma-buf
edac - amd64_edac: Add support for three-rank interleaving mode which is 2021-11-01 15:02:49 -07:00
eisa
extcon
firewire Core: 2021-11-02 06:20:58 -07:00
firmware spi: Updates for v5.16 2021-11-01 19:09:04 -07:00
fpga
fsi
gnss
gpio ACPI updates for 5.16-rc1 2021-11-02 15:58:39 -07:00
gpu ACPI updates for 5.16-rc1 2021-11-02 15:58:39 -07:00
greybus
hid overflow updates for v5.16-rc1 2021-11-01 17:12:56 -07:00
hsi net: remove single-byte netdev->dev_addr writes 2021-10-13 10:03:59 -07:00
hv hyperv-next for 5.16 2021-11-02 10:56:49 -07:00
hwmon hwmon updates for v5.16-rc1 2021-11-01 19:16:49 -07:00
hwspinlock
hwtracing
i2c mailbox: pcc: Use PCC mailbox channel pointer instead of standard 2021-10-29 22:46:38 -05:00
i3c
idle
iio Staging/IIO driver fixes for 5.15-rc6 2021-10-17 17:10:00 -10:00
infiniband Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-10-28 10:43:58 -07:00
input Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2021-10-17 16:57:06 -10:00
interconnect
iommu overflow updates for v5.16-rc1 2021-11-01 17:12:56 -07:00
ipack
irqchip Merge branch irq/irq_cpu_offline into irq/irqchip-next 2021-10-28 13:34:57 +01:00
isdn mISDN: Fix return values of the probe function 2021-10-19 13:09:28 +01:00
leds leds: trigger: Disable CPU trigger on PREEMPT_RT 2021-10-13 20:07:57 +02:00
macintosh
mailbox mailbox: imx: support i.MX8ULP S4 MU 2021-10-29 23:03:09 -05:00
mcb
md for-5.16/passthrough-flag-2021-10-29 2021-11-01 10:12:44 -07:00
media Core: 2021-11-02 06:20:58 -07:00
memory
memstick memstick: r592: Fix a UAF bug when removing the driver 2021-10-19 13:04:42 +02:00
message mpt fusion: use dev_addr_set() 2021-10-28 12:47:49 +01:00
mfd
misc net: sgi-xp: use eth_hw_addr_set() 2021-10-29 13:17:21 +01:00
mmc MMC core: 2021-11-01 18:55:12 -07:00
most
mtd mtd: add add_disk() error handling 2021-10-21 09:00:56 -06:00
mux
net hyperv-next for 5.16 2021-11-02 10:56:49 -07:00
nfc Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-10-28 10:43:58 -07:00
ntb
nubus
nvdimm for-5.16/block-2021-10-29 2021-11-01 09:19:50 -07:00
nvme for-5.16/ki_complete-2021-10-29 2021-11-01 10:17:11 -07:00
nvmem nvmem: Fix shift-out-of-bound (UBSAN) with byte size cells 2021-10-13 15:09:58 +02:00
of ARM development for 5.16: 2021-11-02 11:33:15 -07:00
opp
parisc
parport
pci Merge branch 'pm-pci' 2021-11-02 19:06:30 +01:00
pcmcia Core: 2021-11-02 06:20:58 -07:00
perf ACPI updates for 5.16-rc1 2021-11-02 15:58:39 -07:00
phy net: Convert more users of mdiobus_* to mdiodev_* 2021-10-24 13:40:33 +01:00
pinctrl pinctrl: amd: disable and mask interrupts on probe 2021-10-16 23:56:59 +02:00
platform platform/x86: int1092: Fix non sequential device mode handling 2021-10-11 16:39:25 +02:00
pnp
power
powercap powercap/drivers/dtpm: Fix power limit initialization 2021-10-21 16:03:31 +02:00
pps
ps3
ptp ptp: fix code indentation issues 2021-10-28 14:42:20 +01:00
pwm
rapidio
ras
regulator regulator: Updates for v5.16 2021-11-01 19:04:47 -07:00
remoteproc
reset reset: socfpga: add empty driver allowing consumers to probe 2021-10-05 12:23:16 +02:00
rpmsg
rtc
s390 Core: 2021-11-02 06:20:58 -07:00
sbus
scsi Core: 2021-11-02 06:20:58 -07:00
sh
siox
slimbus
soc Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-10-22 11:41:16 +01:00
soundwire
spi spi: Updates for v5.16 2021-11-01 19:09:04 -07:00
spmi
ssb
staging Core: 2021-11-02 06:20:58 -07:00
target for-5.16/ki_complete-2021-10-29 2021-11-01 10:17:11 -07:00
tc
tee tee: optee: Fix missing devices unregister during optee_remove 2021-10-12 13:24:39 +02:00
thermal
thunderbolt thunderbolt: build kunit tests without structleak plugin 2021-10-06 17:53:49 -06:00
tty workqueue: Introduce show_one_worker_pool and show_one_workqueue. 2021-10-20 06:19:03 -10:00
uio Drivers: hv: vmbus: Mark vmbus ring buffer visible to host in Isolation VM 2021-10-28 11:22:23 +00:00
usb Power management updates for 5.16-rc1 2021-11-02 16:04:28 -07:00
vdpa Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-10-28 10:43:58 -07:00
vfio
vhost virtio,vdpa: fixes 2021-10-17 18:17:19 -10:00
video video: fbdev: gbefb: Only instantiate device when built for IP32 2021-10-06 11:12:28 +02:00
virt
virtio virtio-ring: fix DMA metadata flags 2021-10-27 15:54:34 -04:00
visorbus
vlynq
vme
w1
watchdog watchdog: Fix OMAP watchdog early handling 2021-10-26 20:22:51 +02:00
xen xen: branch for v5.15-rc5 2021-10-08 12:55:23 -07:00
zorro
Kconfig firmware: include drivers/firmware/Kconfig unconditionally 2021-10-07 16:51:26 +02:00
Makefile