summaryrefslogtreecommitdiff
path: root/arch/xtensa/kernel/asm-offsets.c
diff options
context:
space:
mode:
authorMax Filippov <jcmvbkbc@gmail.com>2022-04-20 06:07:20 -0700
committerMax Filippov <jcmvbkbc@gmail.com>2022-05-01 19:51:24 -0700
commit733f5c28e59ef23fef9e0b64d79df24c2a4eed2b (patch)
tree244e980beca10ef1fd22ae44b2f04e33d4ccb9a7 /arch/xtensa/kernel/asm-offsets.c
parent11e969bc964a0e50ae64cdba092048e3937d2389 (diff)
xtensa: add hibernation support
Define ARCH_HIBERNATION_POSSIBLE in Kconfig and implement hibernation callbacks. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Diffstat (limited to 'arch/xtensa/kernel/asm-offsets.c')
-rw-r--r--arch/xtensa/kernel/asm-offsets.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/xtensa/kernel/asm-offsets.c b/arch/xtensa/kernel/asm-offsets.c
index e3b9cf4c2289..9a1db6ffcbf4 100644
--- a/arch/xtensa/kernel/asm-offsets.c
+++ b/arch/xtensa/kernel/asm-offsets.c
@@ -21,6 +21,7 @@
#include <linux/ptrace.h>
#include <linux/mm.h>
#include <linux/kbuild.h>
+#include <linux/suspend.h>
#include <asm/ptrace.h>
#include <asm/traps.h>
@@ -149,5 +150,12 @@ int main(void)
offsetof(struct exc_table, fast_kernel_handler));
DEFINE(EXC_TABLE_DEFAULT, offsetof(struct exc_table, default_handler));
+#ifdef CONFIG_HIBERNATION
+ DEFINE(PBE_ADDRESS, offsetof(struct pbe, address));
+ DEFINE(PBE_ORIG_ADDRESS, offsetof(struct pbe, orig_address));
+ DEFINE(PBE_NEXT, offsetof(struct pbe, next));
+ DEFINE(PBE_SIZE, sizeof(struct pbe));
+#endif
+
return 0;
}