Skip to content

Commit 5a98796

Browse files
committed
Merge branch 'pm-sleep'
Merge updates related to system sleep for 6.15-rc1 including fixes, cleanups and a rework of the "smart suspend" driver flag handling to avoid issues that may occur when drivers using it depend on some other drivers: - Rework the handling of the "smart suspend" driver flag in the PM core to avoid issues hat may occur when drivers using it depend on some other drivers and clean up the related PM core code (Rafael Wysocki, Colin Ian King). - Fix the handling of devices with the power.direct_complete flag set if device_suspend() returns an error for at least one device to avoid situations in which some of them may not be resumed (Rafael Wysocki). - Use mutex_trylock() in hibernate_compressor_param_set() to avoid a possible deadlock that may occur if the "compressor" hibernation module parameter is accessed during the registration of a new ieee80211 device (Lizhi Xu). - Suppress sleeping parent warning in device_pm_add() in the case when new children are added under a device with the power.direct_complete set after it has been processed by device_resume() (Xu Yang). - Remove needless return in three void functions related to system wakeup (Zijun Hu). - Replace deprecated kmap_atomic() with kmap_local_page() in the hibernation core code (David Reaver). - Remove unused helper functions related to system sleep (David Alan Gilbert). - Clean up s2idle_enter() so it does not lock and unlock CPU offline in vain and update comments in it (Ulf Hansson). - Clean up broken white space in dpm_wait_for_children() (Geert Uytterhoeven). * pm-sleep: PM: sleep: Fix bit masking operation PM: sleep: Fix handling devices with direct_complete set on errors PM: sleep: core: Fix indentation in dpm_wait_for_children() PM: s2idle: Extend comment in s2idle_enter() PM: s2idle: Drop redundant locks when entering s2idle PM: sleep: Remove unused pm_generic_ wrappers PM: sleep: Rearrange dpm_async_fn() and async state clearing PM: sleep: Rename power.async_in_progress to power.work_in_progress PM: core: Tweak pm_runtime_block_if_disabled() return value PM: runtime: Convert pm_runtime_blocked() to static inline PM: sleep: Update power.smart_suspend under PM spinlock PM: sleep: Adjust check before setting power.must_resume PM: wakeup: Remove needless return in three void APIs PM: sleep: Suppress sleeping parent warning in special case PM: hibernate: Avoid deadlock in hibernate_compressor_param_set() PM: sleep: Avoid unnecessary checks in device_prepare_smart_suspend() PM: sleep: Use DPM_FLAG_SMART_SUSPEND conditionally PM: runtime: Introduce pm_runtime_blocked() PM: Block enabling of runtime PM during system suspend PM: hibernate: Replace deprecated kmap_atomic() with kmap_local_page()
2 parents 8713024 + 3860cbe commit 5a98796

File tree

13 files changed

+205
-101
lines changed

13 files changed

+205
-101
lines changed

drivers/acpi/device_pm.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1161,7 +1161,7 @@ EXPORT_SYMBOL_GPL(acpi_subsys_complete);
11611161
*/
11621162
int acpi_subsys_suspend(struct device *dev)
11631163
{
1164-
if (!dev_pm_test_driver_flags(dev, DPM_FLAG_SMART_SUSPEND) ||
1164+
if (!dev_pm_smart_suspend(dev) ||
11651165
acpi_dev_needs_resume(dev, ACPI_COMPANION(dev)))
11661166
pm_runtime_resume(dev);
11671167

@@ -1320,7 +1320,7 @@ EXPORT_SYMBOL_GPL(acpi_subsys_restore_early);
13201320
*/
13211321
int acpi_subsys_poweroff(struct device *dev)
13221322
{
1323-
if (!dev_pm_test_driver_flags(dev, DPM_FLAG_SMART_SUSPEND) ||
1323+
if (!dev_pm_smart_suspend(dev) ||
13241324
acpi_dev_needs_resume(dev, ACPI_COMPANION(dev)))
13251325
pm_runtime_resume(dev);
13261326

drivers/base/power/generic_ops.c

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -114,18 +114,6 @@ int pm_generic_freeze_noirq(struct device *dev)
114114
}
115115
EXPORT_SYMBOL_GPL(pm_generic_freeze_noirq);
116116

117-
/**
118-
* pm_generic_freeze_late - Generic freeze_late callback for subsystems.
119-
* @dev: Device to freeze.
120-
*/
121-
int pm_generic_freeze_late(struct device *dev)
122-
{
123-
const struct dev_pm_ops *pm = dev->driver ? dev->driver->pm : NULL;
124-
125-
return pm && pm->freeze_late ? pm->freeze_late(dev) : 0;
126-
}
127-
EXPORT_SYMBOL_GPL(pm_generic_freeze_late);
128-
129117
/**
130118
* pm_generic_freeze - Generic freeze callback for subsystems.
131119
* @dev: Device to freeze.
@@ -186,18 +174,6 @@ int pm_generic_thaw_noirq(struct device *dev)
186174
}
187175
EXPORT_SYMBOL_GPL(pm_generic_thaw_noirq);
188176

189-
/**
190-
* pm_generic_thaw_early - Generic thaw_early callback for subsystems.
191-
* @dev: Device to thaw.
192-
*/
193-
int pm_generic_thaw_early(struct device *dev)
194-
{
195-
const struct dev_pm_ops *pm = dev->driver ? dev->driver->pm : NULL;
196-
197-
return pm && pm->thaw_early ? pm->thaw_early(dev) : 0;
198-
}
199-
EXPORT_SYMBOL_GPL(pm_generic_thaw_early);
200-
201177
/**
202178
* pm_generic_thaw - Generic thaw callback for subsystems.
203179
* @dev: Device to thaw.

0 commit comments

Comments
 (0)