public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] PM: hibernate: Explicitly set PM_SUSPEND_MAX at hibernate entry
@ 2025-05-01 21:58 Mario Limonciello
  2025-05-07  7:44 ` kernel test robot
  0 siblings, 1 reply; 2+ messages in thread
From: Mario Limonciello @ 2025-05-01 21:58 UTC (permalink / raw)
  To: mario.limonciello, rafael, len.brown, pavel; +Cc: linux-pm

From: Mario Limonciello <mario.limonciello@amd.com>

This allows pm_debug_messages to work properly for hibernate.

Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
---
 kernel/power/hibernate.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/kernel/power/hibernate.c b/kernel/power/hibernate.c
index 23c0f4e6cb2ff..443002fd680de 100644
--- a/kernel/power/hibernate.c
+++ b/kernel/power/hibernate.c
@@ -772,6 +772,7 @@ int hibernate(void)
 	}
 
 	pr_info("hibernation entry\n");
+	pm_suspend_target_state = PM_SUSPEND_MAX;
 	pm_prepare_console();
 	error = pm_notifier_call_chain_robust(PM_HIBERNATION_PREPARE, PM_POST_HIBERNATION);
 	if (error)
@@ -852,6 +853,7 @@ int hibernate(void)
 	hibernate_release();
  Unlock:
 	unlock_system_sleep(sleep_flags);
+	pm_suspend_target_state = PM_SUSPEND_ON;
 	pr_info("hibernation exit\n");
 
 	return error;
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-05-07  7:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-01 21:58 [PATCH] PM: hibernate: Explicitly set PM_SUSPEND_MAX at hibernate entry Mario Limonciello
2025-05-07  7:44 ` kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox