mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-12 13:34:10 +08:00
88485be531
There is nothing architecture-specific about scs_overflow_check() as it's just a trivial wrapper around scs_corrupted(). For parity with task_stack_end_corrupted(), rename scs_corrupted() to task_scs_end_corrupted() and call it from schedule_debug() when CONFIG_SCHED_STACK_END_CHECK_is enabled, which better reflects its purpose as a debug feature to catch inadvertent overflow of the SCS. Finally, remove the unused scs_overflow_check() function entirely. This has absolutely no impact on architectures that do not support SCS (currently arm64 only). Tested-by: Sami Tolvanen <samitolvanen@google.com> Reviewed-by: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Will Deacon <will@kernel.org>
30 lines
482 B
C
30 lines
482 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef _ASM_SCS_H
|
|
#define _ASM_SCS_H
|
|
|
|
#ifdef __ASSEMBLY__
|
|
|
|
#include <asm/asm-offsets.h>
|
|
|
|
#ifdef CONFIG_SHADOW_CALL_STACK
|
|
scs_sp .req x18
|
|
|
|
.macro scs_load tsk, tmp
|
|
ldr scs_sp, [\tsk, #TSK_TI_SCS_SP]
|
|
.endm
|
|
|
|
.macro scs_save tsk, tmp
|
|
str scs_sp, [\tsk, #TSK_TI_SCS_SP]
|
|
.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 */
|