]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
Merge branch 'pm-sleep'
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 28 Nov 2025 15:01:13 +0000 (16:01 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 28 Nov 2025 15:01:13 +0000 (16:01 +0100)
Merge updates related to system suspend and hibernation for 6.19-rc1:

 - Replace snprintf() with scnprintf() in show_trace_dev_match()
   (Kaushlendra Kumar)

 - Fix memory allocation error handling in pm_vt_switch_required()
   (Malaya Kumar Rout)

 - Introduce CALL_PM_OP() macro and use it to simplify code in
   generic PM operations (Kaushlendra Kumar)

 - Add module param to backtrace all CPUs in the device power management
   watchdog (Sergey Senozhatsky)

 - Rework message printing in swsusp_save() (Rafael Wysocki)

 - Make it possible to change the number of hibernation compression
   threads (Xueqin Luo)

 - Clarify that only cgroup1 freezer uses PM freezer (Tejun Heo)

 - Add document on debugging shutdown hangs to PM documentation and
   correct a mistaken configuration option in it (Mario Limonciello)

 - Shut down wakeup source timer before removing the wakeup source from
   the list (Kaushlendra Kumar, Rafael Wysocki)

 - Introduce new PMSG_POWEROFF event for system shutdown handling with
   the help of PM device callbacks (Mario Limonciello)

 - Make pm_test delay interruptible by wakeup events (Riwen Lu)

 - Clean up kernel-doc comment style usage in the core hibernation
   code and remove unuseful comments from it (Sunday Adelodun, Rafael
   Wysocki)

 - Add support for handling wakeup events and aborting the suspend
   process while it is syncing file systems (Samuel Wu, Rafael Wysocki)

* pm-sleep: (21 commits)
  PM: hibernate: Extra cleanup of comments in swap handling code
  PM: sleep: Call pm_sleep_fs_sync() instead of ksys_sync_helper()
  PM: sleep: Add support for wakeup during filesystem sync
  PM: hibernate: Clean up kernel-doc comment style usage
  PM: suspend: Make pm_test delay interruptible by wakeup events
  usb: sl811-hcd: Add PM_EVENT_POWEROFF into suspend callbacks
  scsi: Add PM_EVENT_POWEROFF into suspend callbacks
  PM: Introduce new PMSG_POWEROFF event
  PM: wakeup: Update after recent wakeup source removal ordering change
  PM: wakeup: Delete timer before removing wakeup source from list
  Documentation: power: Correct a mistaken configuration option
  Documentation: power: Add document on debugging shutdown hangs
  freezer: Clarify that only cgroup1 freezer uses PM freezer
  PM: hibernate: add sysfs interface for hibernate_compression_threads
  PM: hibernate: make compression threads configurable
  PM: hibernate: dynamically allocate crc->unc_len/unc for configurable threads
  PM: hibernate: Rework message printing in swsusp_save()
  PM: dpm_watchdog: add module param to backtrace all CPUs
  PM: sleep: Introduce CALL_PM_OP() macro to simplify code
  PM: console: Fix memory allocation error handling in pm_vt_switch_required()
  ...

1  2 
kernel/power/hibernate.c
kernel/power/main.c
kernel/power/suspend.c

index 26e45f86b9554e4b4d51f1096a16e3848165715f,7fed1cd36e4d838ba1ffab4fba1990b000e31bc7..af8d07bafe02a74b400fdce505fba12ad01cd757
@@@ -820,8 -820,12 +820,11 @@@ int hibernate(void
        if (error)
                goto Restore;
  
-       ksys_sync_helper();
+       error = pm_sleep_fs_sync();
+       if (error)
+               goto Notify;
 -      if (filesystem_freeze_enabled)
 -              filesystems_freeze();
 +      filesystems_freeze(filesystem_freeze_enabled);
  
        error = freeze_processes();
        if (error)
index a6cbc3f4347a727864e53db1b4eeec38a7c29c1f,e76a55583ec6f097ef8648239453163f3867b29f..03b2c5495c77acb86b027a396337c01524da65e8
@@@ -1066,11 -1123,21 +1123,21 @@@ static const struct attribute_group *at
  struct workqueue_struct *pm_wq;
  EXPORT_SYMBOL_GPL(pm_wq);
  
- static int __init pm_start_workqueue(void)
+ static int __init pm_start_workqueues(void)
  {
 -      pm_wq = alloc_workqueue("pm", WQ_FREEZABLE, 0);
 +      pm_wq = alloc_workqueue("pm", WQ_FREEZABLE | WQ_UNBOUND, 0);
+       if (!pm_wq)
+               return -ENOMEM;
  
-       return pm_wq ? 0 : -ENOMEM;
+ #if defined(CONFIG_SUSPEND) || defined(CONFIG_HIBERNATION)
+       pm_fs_sync_wq = alloc_ordered_workqueue("pm_fs_sync", 0);
+       if (!pm_fs_sync_wq) {
+               destroy_workqueue(pm_wq);
+               return -ENOMEM;
+       }
+ #endif
+       return 0;
  }
  
  static int __init pm_init(void)
Simple merge