summaryrefslogtreecommitdiff
path: root/arch/csky/kernel/entry.S
diff options
context:
space:
mode:
authorGuo Ren <ren_guo@c-sky.com>2019-03-30 23:44:34 +0800
committerGuo Ren <ren_guo@c-sky.com>2019-04-22 13:44:57 +0800
commitf4625ee0e40a5c724bb3f3eb7fd89e491bfd7646 (patch)
tree5e94b471f288c647793f4ad38697d28f81573022 /arch/csky/kernel/entry.S
parentf335b10f3b6ca2d11adef95092fff65152c31b48 (diff)
downloadlwn-f4625ee0e40a5c724bb3f3eb7fd89e491bfd7646.tar.gz
lwn-f4625ee0e40a5c724bb3f3eb7fd89e491bfd7646.zip
csky: Use in_syscall & forget_syscall instead of r11_sig
We could use regs->sr 16-24 bits to detect syscall: VEC_TRAP0 and r11_sig is no necessary for current implementation. In this patch, we implement the in_syscall and forget_syscall which are inspired from arm & nds32, but csky pt_regs has no syscall_num element and we just set zero to regs->sr's vector-bits-field instead. For ret_from_fork, current task was forked from parent which is in syscall progress and its regs->sr has been already setted with VEC_TRAP0. See: arch/csky/kernel/process.c: copy_thread() Signed-off-by: Guo Ren <ren_guo@c-sky.com>
Diffstat (limited to 'arch/csky/kernel/entry.S')
-rw-r--r--arch/csky/kernel/entry.S11
1 files changed, 1 insertions, 10 deletions
diff --git a/arch/csky/kernel/entry.S b/arch/csky/kernel/entry.S
index ecc6e7d2e95d..b3b3b0bbfcc7 100644
--- a/arch/csky/kernel/entry.S
+++ b/arch/csky/kernel/entry.S
@@ -99,7 +99,6 @@ ENTRY(csky_\name)
mov a0, sp
movi a1, \is_write
jbsr do_page_fault
- movi r11_sig, 0 /* r11 = 0, Not a syscall. */
jmpi ret_from_exception
.endm
@@ -189,7 +188,6 @@ ENTRY(ret_from_fork)
bmaski r10, THREAD_SHIFT
andn r9, r10
ldw r8, (r9, TINFO_FLAGS)
- movi r11_sig, 1
ANDI_R3 r8, (_TIF_SYSCALL_TRACE | _TIF_SYSCALL_TRACEPOINT | _TIF_SYSCALL_AUDIT)
cmpnei r8, 0
bf 3f
@@ -224,12 +222,8 @@ exit_work:
/* If thread_info->flag is empty, RESTORE_ALL */
cmpnei r8, 0
bf 1b
- mov a1, sp
mov a0, r8
- mov a2, r11_sig /* syscall? */
- btsti r8, TIF_SIGPENDING /* delivering a signal? */
- /* prevent further restarts(set r11 = 0) */
- clrt r11_sig
+ mov a1, sp
jbsr do_notify_resume /* do signals */
br resume_userspace
@@ -239,13 +233,11 @@ work_resched:
jmpi schedule
ENTRY(sys_rt_sigreturn)
- movi r11_sig, 0
jmpi do_rt_sigreturn
ENTRY(csky_trap)
SAVE_ALL EPC_KEEP
psrset ee
- movi r11_sig, 0 /* r11 = 0, Not a syscall. */
mov a0, sp /* Push Stack pointer arg */
jbsr trap_c /* Call C-level trap handler */
jmpi ret_from_exception
@@ -279,7 +271,6 @@ ENTRY(csky_get_tls)
ENTRY(csky_irq)
SAVE_ALL EPC_KEEP
psrset ee
- movi r11_sig, 0 /* r11 = 0, Not a syscall. */
#ifdef CONFIG_PREEMPT
mov r9, sp /* Get current stack pointer */