xref: /openbmc/linux/arch/arm64/include/asm/scs.h (revision e7bae9bb)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _ASM_SCS_H
3 #define _ASM_SCS_H
4 
5 #ifdef __ASSEMBLY__
6 
7 #include <asm/asm-offsets.h>
8 
9 #ifdef CONFIG_SHADOW_CALL_STACK
10 	scs_sp	.req	x18
11 
12 	.macro scs_load tsk, tmp
13 	ldr	scs_sp, [\tsk, #TSK_TI_SCS_SP]
14 	.endm
15 
16 	.macro scs_save tsk, tmp
17 	str	scs_sp, [\tsk, #TSK_TI_SCS_SP]
18 	.endm
19 #else
20 	.macro scs_load tsk, tmp
21 	.endm
22 
23 	.macro scs_save tsk, tmp
24 	.endm
25 #endif /* CONFIG_SHADOW_CALL_STACK */
26 
27 #endif /* __ASSEMBLY __ */
28 
29 #endif /* _ASM_SCS_H */
30