1 /* SPDX-License-Identifier: GPL-2.0 */
3 * Hibernation support specific for LoongArch
5 * Author: Huacai Chen <chenhuacai@loongson.cn>
6 * Copyright (C) 2020-2022 Loongson Technology Corporation Limited
8 #include <linux/linkage.h>
10 #include <asm/asm-offsets.h>
11 #include <asm/regdef.h>
14 SYM_FUNC_START(swsusp_asm_suspend)
15 la.pcrel t0, saved_regs
31 SYM_FUNC_END(swsusp_asm_suspend)
33 SYM_FUNC_START(swsusp_asm_resume)
34 la.pcrel t0, restore_pblist
37 PTR_L t1, t0, PBE_ADDRESS /* source */
38 PTR_L t2, t0, PBE_ORIG_ADDRESS /* destination */
44 PTR_ADDI t1, t1, SZREG
45 PTR_ADDI t2, t2, SZREG
47 PTR_L t0, t0, PBE_NEXT
49 la.pcrel t0, saved_regs
66 SYM_FUNC_END(swsusp_asm_resume)