2020-04-27 16:00:16 +00:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0 */
|
|
|
|
#ifndef _ASM_SCS_H
|
|
|
|
#define _ASM_SCS_H
|
|
|
|
|
|
|
|
#ifdef __ASSEMBLY__
|
|
|
|
|
2020-05-15 13:11:05 +00:00
|
|
|
#include <asm/asm-offsets.h>
|
|
|
|
|
2020-04-27 16:00:16 +00:00
|
|
|
#ifdef CONFIG_SHADOW_CALL_STACK
|
2020-05-15 13:46:46 +00:00
|
|
|
scs_sp .req x18
|
|
|
|
|
2020-04-27 16:00:16 +00:00
|
|
|
.macro scs_load tsk, tmp
|
2020-05-15 13:46:46 +00:00
|
|
|
ldr scs_sp, [\tsk, #TSK_TI_SCS_SP]
|
2020-04-27 16:00:16 +00:00
|
|
|
.endm
|
|
|
|
|
|
|
|
.macro scs_save tsk, tmp
|
2020-05-15 13:46:46 +00:00
|
|
|
str scs_sp, [\tsk, #TSK_TI_SCS_SP]
|
2020-04-27 16:00:16 +00:00
|
|
|
.endm
|
|
|
|
#else
|
|
|
|
.macro scs_load tsk, tmp
|
|
|
|
.endm
|
|
|
|
|
|
|
|
.macro scs_save tsk, tmp
|
|
|
|
.endm
|
|
|
|
#endif /* CONFIG_SHADOW_CALL_STACK */
|
|
|
|
|
|
|
|
#endif /* __ASSEMBLY __ */
|
|
|
|
|
|
|
|
#endif /* _ASM_SCS_H */
|