summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorSuzuki K Poulose <suzuki.poulose@arm.com>2026-10-02 07:15:03 +0100
committerCatalin Marinas <catalin.marinas@arm.com>2026-10-02 18:32:26 +0100
commit5487bff69b85ca9bde7884655e2e45997d947acb (patch)
treec3d17a13bfab9095b0857fc00caaa1d191d5bb06 /include/linux
parentc20b65a03eff7c5b4fbd0122ceb89fb53b823155 (diff)
PM: hibernate: Add an arch hook for preventing hibernation
Add a hook to allow arch code disable hibernation. On arm64, with an RMM active, there could be pages that are delegated to the "Realm" security state. Any access to them are fatal (e.g., hibernate save image or restoring an image to a delegated page). pKVM host also has its restrictions on enabling hibernation. Add a weak arch hook to let the architectures have a say. Cc: "Rafael J. Wysocki" <rafael@kernel.org> Cc: Len Brown <lenb@kernel.org> Cc: Pavel Machek <pavel@kernel.org> Cc: linux-pm@vger.kernel.org Cc: Sudeep Holla <sudeep.holla@kernel.org> Suggested-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com> Reviewed-by: Catalin Marinas <catalin.marinas@arm.com> Reviewed-by: Sudeep Holla <sudeep.holla@kernel.org> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/suspend.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/suspend.h b/include/linux/suspend.h
index b02876f1ae38..a3815027773c 100644
--- a/include/linux/suspend.h
+++ b/include/linux/suspend.h
@@ -401,6 +401,7 @@ int hibernate_quiet_exec(int (*func)(void *data), void *data);
int hibernate_resume_nonboot_cpu_disable(void);
int arch_hibernation_header_save(void *addr, unsigned int max_size);
int arch_hibernation_header_restore(void *addr);
+bool arch_hibernation_available(void);
#else /* CONFIG_HIBERNATION */
static inline void register_nosave_region(unsigned long b, unsigned long e) {}