From: "Mario Limonciello (AMD)" <superm1@kernel.org>
To: mario.limonciello@amd.com, airlied@gmail.com,
alexander.deucher@amd.com, christian.koenig@amd.com,
dakr@kernel.org, gregkh@linuxfoundation.org, lenb@kernel.org,
pavel@kernel.org, rafael@kernel.org, simona@ffwll.ch
Cc: amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
linux-pm@vger.kernel.org
Subject: [RFC PATCH 3/3] PM: Drop pm_hibernate_is_recovering() and pm_hibernation_mode_is_suspend()
Date: Mon, 13 Oct 2025 12:47:11 -0500 [thread overview]
Message-ID: <20251013174729.1101186-4-superm1@kernel.org> (raw)
In-Reply-To: <20251013174729.1101186-1-superm1@kernel.org>
From: Mario Limonciello <mario.limonciello@amd.com>
All consumers in the kernel of pm_hibernate_is_recovering() and
pm_hibernation_mode_is_suspend() have been dropped. Remove the symbols.
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
---
drivers/base/power/main.c | 14 --------------
include/linux/suspend.h | 8 --------
kernel/power/hibernate.c | 11 -----------
3 files changed, 33 deletions(-)
diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c
index 58f5270a173e8..e2f23e62abb18 100644
--- a/drivers/base/power/main.c
+++ b/drivers/base/power/main.c
@@ -62,20 +62,6 @@ static pm_message_t pm_transition;
static DEFINE_MUTEX(async_wip_mtx);
static int async_error;
-/**
- * pm_hibernate_is_recovering - if recovering from hibernate due to error.
- *
- * Used to query if dev_pm_ops.thaw() is called for normal hibernation case or
- * recovering from some error.
- *
- * Return: true for error case, false for normal case.
- */
-bool pm_hibernate_is_recovering(void)
-{
- return pm_transition.event == PM_EVENT_RECOVER;
-}
-EXPORT_SYMBOL_GPL(pm_hibernate_is_recovering);
-
static const char *pm_verb(int event)
{
switch (event) {
diff --git a/include/linux/suspend.h b/include/linux/suspend.h
index 348831cdb60e4..f305fcc7a2cdc 100644
--- a/include/linux/suspend.h
+++ b/include/linux/suspend.h
@@ -420,12 +420,6 @@ static inline int hibernate_quiet_exec(int (*func)(void *data), void *data) {
}
#endif /* CONFIG_HIBERNATION */
-#if defined(CONFIG_HIBERNATION) && defined(CONFIG_SUSPEND)
-bool pm_hibernation_mode_is_suspend(void);
-#else
-static inline bool pm_hibernation_mode_is_suspend(void) { return false; }
-#endif
-
int arch_resume_nosmt(void);
#ifdef CONFIG_HIBERNATION_SNAPSHOT_DEV
@@ -486,7 +480,6 @@ extern unsigned int lock_system_sleep(void);
extern void unlock_system_sleep(unsigned int);
extern bool pm_sleep_transition_in_progress(void);
-bool pm_hibernate_is_recovering(void);
#else /* !CONFIG_PM_SLEEP */
@@ -520,7 +513,6 @@ static inline unsigned int lock_system_sleep(void) { return 0; }
static inline void unlock_system_sleep(unsigned int flags) {}
static inline bool pm_sleep_transition_in_progress(void) { return false; }
-static inline bool pm_hibernate_is_recovering(void) { return false; }
#endif /* !CONFIG_PM_SLEEP */
diff --git a/kernel/power/hibernate.c b/kernel/power/hibernate.c
index 7af2e392c574a..ec02a8be20b30 100644
--- a/kernel/power/hibernate.c
+++ b/kernel/power/hibernate.c
@@ -80,17 +80,6 @@ static const struct platform_hibernation_ops *hibernation_ops;
static atomic_t hibernate_atomic = ATOMIC_INIT(1);
-#ifdef CONFIG_SUSPEND
-/**
- * pm_hibernation_mode_is_suspend - Check if hibernation has been set to suspend
- */
-bool pm_hibernation_mode_is_suspend(void)
-{
- return hibernation_mode == HIBERNATION_SUSPEND;
-}
-EXPORT_SYMBOL_GPL(pm_hibernation_mode_is_suspend);
-#endif
-
bool hibernate_acquire(void)
{
return atomic_add_unless(&hibernate_atomic, -1, 0);
--
2.43.0
prev parent reply other threads:[~2025-10-13 17:48 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-13 17:47 [RFC PATCH 0/3] Skip thaw sequence for all devices, not just amdgpu Mario Limonciello (AMD)
2025-10-13 17:47 ` [RFC PATCH 1/3] PM: hibernate: Nominally skip thaw sequence for all devices Mario Limonciello (AMD)
2025-10-13 17:58 ` Rafael J. Wysocki
2025-10-13 18:27 ` Mario Limonciello
2025-10-13 18:29 ` Rafael J. Wysocki
2025-10-13 17:47 ` [RFC PATCH 2/3] drm/amd: Drop special cases for thaw() callback Mario Limonciello (AMD)
2025-10-13 17:47 ` Mario Limonciello (AMD) [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251013174729.1101186-4-superm1@kernel.org \
--to=superm1@kernel.org \
--cc=airlied@gmail.com \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=christian.koenig@amd.com \
--cc=dakr@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=gregkh@linuxfoundation.org \
--cc=lenb@kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mario.limonciello@amd.com \
--cc=pavel@kernel.org \
--cc=rafael@kernel.org \
--cc=simona@ffwll.ch \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox