summaryrefslogtreecommitdiffstats
path: root/kernel/power/power.h
diff options
context:
space:
mode:
authorNikhil V <quic_nprakash@quicinc.com>2024-01-22 18:45:26 +0530
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2024-02-05 14:28:54 +0100
commita06c6f5d3cc90b3b070d7b99979d57238db77a86 (patch)
treef52374ea2f6a428837de034636c22720cc9d8369 /kernel/power/power.h
parent89a807625f9701154167bf6bf136adfa1be4d849 (diff)
downloadlinux-stable-a06c6f5d3cc90b3b070d7b99979d57238db77a86.tar.gz
linux-stable-a06c6f5d3cc90b3b070d7b99979d57238db77a86.tar.bz2
linux-stable-a06c6f5d3cc90b3b070d7b99979d57238db77a86.zip
PM: hibernate: Move to crypto APIs for LZO compression
Currently for hibernation, LZO is the only compression algorithm available and uses the existing LZO library calls. However, there is no flexibility to switch to other algorithms which provides better results. The main idea is that different compression algorithms have different characteristics and hibernation may benefit when it uses alternate algorithms. By moving to crypto based APIs, it lays a foundation to use other compression algorithms for hibernation. There are no functional changes introduced by this approach. Signed-off-by: Nikhil V <quic_nprakash@quicinc.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'kernel/power/power.h')
-rw-r--r--kernel/power/power.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/kernel/power/power.h b/kernel/power/power.h
index 4e03046b9c4d..5efa2c987057 100644
--- a/kernel/power/power.h
+++ b/kernel/power/power.h
@@ -6,6 +6,7 @@
#include <linux/compiler.h>
#include <linux/cpu.h>
#include <linux/cpuidle.h>
+#include <linux/crypto.h>
struct swsusp_info {
struct new_utsname uts;
@@ -54,6 +55,10 @@ asmlinkage int swsusp_save(void);
/* kernel/power/hibernate.c */
extern bool freezer_test_done;
+extern char hib_comp_algo[CRYPTO_MAX_ALG_NAME];
+
+/* kernel/power/swap.c */
+extern unsigned int swsusp_header_flags;
extern int hibernation_snapshot(int platform_mode);
extern int hibernation_restore(int platform_mode);