summaryrefslogtreecommitdiffstats
path: root/arch/loongarch/kernel/asm-offsets.c
diff options
context:
space:
mode:
authorHuacai Chen <chenhuacai@loongson.cn>2022-12-10 15:40:15 +0100
committerHuacai Chen <chenhuacai@loongson.cn>2022-12-14 01:41:53 +0100
commit7db54bfe44a662c8f2c10277bccfa02c2f4c719c (patch)
tree0718e06127149f29a103fee7fcccf6a458067f61 /arch/loongarch/kernel/asm-offsets.c
parentLoongArch: Add suspend (ACPI S3) support (diff)
downloadlinux-7db54bfe44a662c8f2c10277bccfa02c2f4c719c.tar.xz
linux-7db54bfe44a662c8f2c10277bccfa02c2f4c719c.zip
LoongArch: Add hibernation (ACPI S4) support
Add hibernation (Suspend to Disk, aka ACPI S4) support for LoongArch. Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Diffstat (limited to 'arch/loongarch/kernel/asm-offsets.c')
-rw-r--r--arch/loongarch/kernel/asm-offsets.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/loongarch/kernel/asm-offsets.c b/arch/loongarch/kernel/asm-offsets.c
index bdd88eda9513..4ef494577813 100644
--- a/arch/loongarch/kernel/asm-offsets.c
+++ b/arch/loongarch/kernel/asm-offsets.c
@@ -257,3 +257,15 @@ void output_smpboot_defines(void)
BLANK();
}
#endif
+
+#ifdef CONFIG_HIBERNATION
+void output_pbe_defines(void)
+{
+ COMMENT(" Linux struct pbe offsets. ");
+ OFFSET(PBE_ADDRESS, pbe, address);
+ OFFSET(PBE_ORIG_ADDRESS, pbe, orig_address);
+ OFFSET(PBE_NEXT, pbe, next);
+ DEFINE(PBE_SIZE, sizeof(struct pbe));
+ BLANK();
+}
+#endif