[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1655805601-16677-2-git-send-email-yangtiezhu@loongson.cn>
Date: Tue, 21 Jun 2022 18:00:00 +0800
From: Tiezhu Yang <yangtiezhu@...ngson.cn>
To: Huacai Chen <chenhuacai@...nel.org>,
WANG Xuerui <kernel@...0n.name>
Cc: Xuefeng Li <lixuefeng@...ngson.cn>,
Jianmin Lv <lvjianmin@...ngson.cn>, Jun Yi <yijun@...ngson.cn>,
Rui Wang <wangrui@...ngson.cn>, linux-kernel@...r.kernel.org
Subject: [PATCH 1/2] LoongArch: Add TI_SYSCALL in output_thread_info_defines()
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 RESTORE in handle_syscall, but we know PT_R11 may be
overwritten by the signal handler and the syscall number
will be 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@...ngson.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
Powered by blists - more mailing lists