On 04/12/2025 12:43, Naresh Kamboju wrote:
On Wed, 3 Dec 2025 at 21:48, Greg Kroah-Hartman gregkh@linuxfoundation.org wrote:
This is the start of the stable review cycle for the 6.1.159 release. There are 568 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Build regressions: sparc, allmodconfig, ERROR: modpost: "pm_suspend_target_state" [drivers/ufs/host/ufshcd-pci.ko] undefined!
### sparc build error ERROR: modpost: "pm_suspend_target_state" [drivers/ufs/host/ufshcd-pci.ko] undefined!
### commit pointing to sparc build errors scsi: ufs: ufs-pci: Fix S0ix/S3 for Intel controllers commit bb44826c3bdbf1fa3957008a04908f45e5666463 upstream.
For that issue, cherry-picking the following provides the needed definition:
commit 2e41e3ca4729455e002bcb585f0d3749ee66d572 Author: Kai-Heng Feng kai.heng.feng@canonical.com Date: Tue May 2 17:04:34 2023 +0200
PM: suspend: Fix pm_suspend_target_state handling for !CONFIG_PM
Move the pm_suspend_target_state definition for CONFIG_SUSPEND unset from the wakeup code into the headers so as to allow it to still be used elsewhere when CONFIG_SUSPEND is not set.
Signed-off-by: Kai-Heng Feng kai.heng.feng@canonical.com [ rjw: Changelog and subject edits ] Signed-off-by: Rafael J. Wysocki rafael.j.wysocki@intel.com
diff --git a/drivers/base/power/wakeup.c b/drivers/base/power/wakeup.c index 7cc0c0cf8eaa..a917219feea6 100644 --- a/drivers/base/power/wakeup.c +++ b/drivers/base/power/wakeup.c @@ -19,11 +19,6 @@
#include "power.h"
-#ifndef CONFIG_SUSPEND -suspend_state_t pm_suspend_target_state; -#define pm_suspend_target_state (PM_SUSPEND_ON) -#endif - #define list_for_each_entry_rcu_locked(pos, head, member) \ list_for_each_entry_rcu(pos, head, member, \ srcu_read_lock_held(&wakeup_srcu)) diff --git a/include/linux/suspend.h b/include/linux/suspend.h index d0d4598a7b3f..474ecfbbaa62 100644 --- a/include/linux/suspend.h +++ b/include/linux/suspend.h @@ -202,6 +202,7 @@ struct platform_s2idle_ops { };
#ifdef CONFIG_SUSPEND +extern suspend_state_t pm_suspend_target_state; extern suspend_state_t mem_sleep_current; extern suspend_state_t mem_sleep_default;
@@ -337,6 +338,8 @@ extern bool sync_on_suspend_enabled; #else /* !CONFIG_SUSPEND */ #define suspend_valid_only_mem NULL
+#define pm_suspend_target_state (PM_SUSPEND_ON) + static inline void pm_suspend_clear_flags(void) {} static inline void pm_set_suspend_via_firmware(void) {} static inline void pm_set_resume_via_firmware(void) {} @@ -503,7 +506,6 @@ extern void pm_report_max_hw_sleep(u64 t);
/* drivers/base/power/wakeup.c */ extern bool events_check_enabled; -extern suspend_state_t pm_suspend_target_state;
extern bool pm_wakeup_pending(void); extern void pm_system_wakeup(void);