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_current
13	get_current_task scs_sp
14	ldr	scs_sp, [scs_sp, #TSK_TI_SCS_SP]
15	.endm
16
17	.macro scs_save tsk, tmp
18	str	scs_sp, [\tsk, #TSK_TI_SCS_SP]
19	.endm
20#else
21	.macro scs_load_current
22	.endm
23
24	.macro scs_save tsk, tmp
25	.endm
26#endif /* CONFIG_SHADOW_CALL_STACK */
27
28#endif /* __ASSEMBLY __ */
29
30#endif /* _ASM_SCS_H */
31