linux/drivers/base
Rafael J. Wysocki 96db0f947a PM: sleep: Move devices to new lists earlier in each suspend phase
During a system-wide suspend of devices, dpm_noirq_suspend_devices(),
dpm_suspend_late() and dpm_suspend() move devices from one list to
another.  They do it with each device after its PM callback in the
given suspend phase has run or has been scheduled for asynchronous
execution, in case it is deleted from the current list in the
meantime.

However, devices can be moved to a new list before invoking their PM
callbacks (which usually is the case for the devices whose callbacks
are executed asynchronously anyway), because doing so does not affect
the ordering of that list.  In either case, each device is moved to
the new list after the previous device has been moved to it or gone
away, and if a device is removed, it does not matter which list it is
in at that point, because deleting an entry from a list does not change
the ordering of the other entries in it.

Accordingly, modify the functions mentioned above to move devices to
new lists without waiting for their PM callbacks to run regardless of
whether or not they run asynchronously.

No intentional functional impact.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
2024-02-05 14:28:54 +01:00
..
firmware_loader firmware_loader: Expand Firmware upload error codes with firmware invalid error 2023-11-24 18:09:19 -08:00
power PM: sleep: Move devices to new lists earlier in each suspend phase 2024-02-05 14:28:54 +01:00
regmap regmap: Updates for v6.8 2024-01-09 14:39:48 -08:00
test drivers: base: test: Make property entry API test modular 2023-10-05 13:11:44 +02:00
arch_numa.c arm64: irq: set the correct node for VMAP stack 2023-12-05 14:26:50 +00:00
arch_topology.c Driver core changes for 6.8-rc1 2024-01-18 09:48:40 -08:00
attribute_container.c driver core: attribute_container: fix W=1 warnings 2021-05-14 13:37:10 +02:00
auxiliary.c driver core: mark remaining local bus_type variables as const 2023-12-21 13:56:30 +01:00
base.h driver core: class: make class_register() take a const * 2023-04-03 21:42:46 +02:00
bus.c driver core: bus: constantify subsys_register() calls 2023-12-21 13:55:38 +01:00
cacheinfo.c mm, pcp: reduce lock contention for draining high-order pages 2023-10-25 16:47:10 -07:00
class.c class: fix use-after-free in class_register() 2024-01-04 17:13:04 +01:00
component.c drivers: base: component: fix memory leak with using debugfs_lookup() 2023-02-08 13:33:10 +01:00
container.c driver core: container: make container_subsys const 2023-12-21 13:56:10 +01:00
core.c driver core: Better advertise dev_err_probe() 2023-12-15 18:54:18 +01:00
cpu.c Driver core changes for 6.8-rc1 2024-01-18 09:48:40 -08:00
dd.c driver core: Emit reason for pending deferred probe 2023-12-07 11:35:26 +09:00
devcoredump.c devcoredump: Send uevent once devcd is ready 2023-11-28 19:39:18 +00:00
devres.c drivers/base: use ARCH_DMA_MINALIGN instead of ARCH_KMALLOC_MINALIGN 2023-06-19 16:19:20 -07:00
devtmpfs.c driver core: clean up the logic to determine which /sys/dev/ directory to use 2023-03-31 17:45:07 +02:00
driver.c driver core: create bus_is_registered() 2023-02-09 10:43:35 +01:00
firmware.c
hypervisor.c
init.c drivers: base: Move cpu_dev_init() after node_dev_init() 2023-12-06 12:41:49 +09:00
isa.c driver core: mark remaining local bus_type variables as const 2023-12-21 13:56:30 +01:00
Kconfig driver core: Add CONFIG_FW_DEVLINK_SYNC_STATE_TIMEOUT 2023-03-28 18:45:59 +02:00
Makefile genirq: Get rid of GENERIC_MSI_IRQ_DOMAIN 2022-11-17 15:15:20 +01:00
map.c driver: base: Prefer unsigned int to bare use of unsigned 2021-07-21 17:30:09 +02:00
memory.c Driver core changes for 6.8-rc1 2024-01-18 09:48:40 -08:00
module.c
node.c cxl for v6.8 2024-01-18 16:22:43 -08:00
physical_location.c driver core: location: Free struct acpi_pld_info *pld before return false 2023-01-20 14:20:30 +01:00
physical_location.h driver core: physical_location.h remove extern from function prototypes 2023-03-24 15:35:48 +01:00
pinctrl.c
platform-msi.c genirq/msi, platform-msi: Ensure that MSI descriptors are unreferenced 2023-03-02 18:09:44 +01:00
platform.c driver core: platform: Annotate struct irq_affinity_devres with __counted_by 2023-10-07 18:13:09 +02:00
property.c Driver core changes for 6.8-rc1 2024-01-18 09:48:40 -08:00
soc.c driver core: mark remaining local bus_type variables as const 2023-12-21 13:56:30 +01:00
swnode.c software node: Let args be NULL in software_node_get_reference_args 2023-12-07 11:35:26 +09:00
syscore.c
topology.c drivers/base: fix userspace break from using bin_attributes for cpumap and cpulist 2022-07-15 17:36:33 +02:00
trace.c devres: Enable trace events 2021-06-15 17:14:36 +02:00
trace.h devres: Enable trace events 2021-06-15 17:14:36 +02:00
transport_class.c drivers: base: transport_class: fix resource leak when transport_add_device() fails 2023-01-20 14:22:53 +01:00