Messages in this thread Patch in this message | | | From | Tiezhu Yang <> | Subject | [RFC PATCH v3 1/3] LoongArch: Add TI_SYSCALL in output_thread_info_defines() | Date | Wed, 15 Jun 2022 18:29:31 +0800 |
| |
The initial idea was to store the syscall number in PT_R11, and then we can get the syscall number from PT_R11 to check before SAVE and RESTORE in handle_syscall, but PT_R11 may be overwritten by the signal handler and the syscall number is lost.
Add TI_SYSCALL in output_thread_info_defines(), then we can store the syscall number in TI_SYSCALL. This is preparation for later patch.
Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn> --- arch/loongarch/kernel/asm-offsets.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/arch/loongarch/kernel/asm-offsets.c b/arch/loongarch/kernel/asm-offsets.c index bfb65eb..4757ebe 100644 --- a/arch/loongarch/kernel/asm-offsets.c +++ b/arch/loongarch/kernel/asm-offsets.c @@ -81,6 +81,7 @@ void output_thread_info_defines(void) OFFSET(TI_CPU, thread_info, cpu); OFFSET(TI_PRE_COUNT, thread_info, preempt_count); OFFSET(TI_REGS, thread_info, regs); + OFFSET(TI_SYSCALL, thread_info, syscall); DEFINE(_THREAD_SIZE, THREAD_SIZE); DEFINE(_THREAD_MASK, THREAD_MASK); DEFINE(_IRQ_STACK_SIZE, IRQ_STACK_SIZE); -- 2.1.0
| |