summaryrefslogtreecommitdiff
path: root/arch/alpha/kernel/entry.S
diff options
context:
space:
mode:
authorAl Viro <viro@ZenIV.linux.org.uk>2018-08-11 03:04:55 +0300
committerAl Viro <viro@zeniv.linux.org.uk>2018-08-17 04:02:17 +0300
commit060581c158a66fcc68f8877ccd0d60fd9aeca65e (patch)
tree93b2c4f9b849dbf6a3f0751569154755307019ce /arch/alpha/kernel/entry.S
parent5c60a7389d795e001c8748b458eb76e3a5b6008c (diff)
downloadlinux-060581c158a66fcc68f8877ccd0d60fd9aeca65e.tar.xz
alpha: use alpha_ni_syscall only for syscall zero
Once upon a time it used to have a C part that printed a warning about unimplemented OSF syscalls. That's what it's been doing all over the OSF syscall range, while the native Linux syscall range uses sys_ni_syscall(). With those warnings about unimplemented OSF syscalls gone (circa 2.4), alpha_ni_syscall() has shrunk to that little bit of asm and the only reason it hasn't been replaced with sys_ni_syscall() everywhere is that extra twist needed in case of syscall #0. Let's keep it only for syscall #0 and replace the rest with sys_ni_syscall. And use sys_ni_syscall for "number out range" in ptraced-call case, as we'd been doing for normal codepath since 2.1.86... Acked-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/alpha/kernel/entry.S')
-rw-r--r--arch/alpha/kernel/entry.S23
1 files changed, 14 insertions, 9 deletions
diff --git a/arch/alpha/kernel/entry.S b/arch/alpha/kernel/entry.S
index c64806a2daf5..21840e7042f3 100644
--- a/arch/alpha/kernel/entry.S
+++ b/arch/alpha/kernel/entry.S
@@ -473,7 +473,7 @@ entSys:
bne $3, strace
beq $4, 1f
ldq $27, 0($5)
-1: jsr $26, ($27), alpha_ni_syscall
+1: jsr $26, ($27), sys_ni_syscall
ldgp $gp, 0($26)
blt $0, $syscall_error /* the call failed */
stq $0, 0($sp)
@@ -587,7 +587,7 @@ strace:
/* get the system call pointer.. */
lda $1, NR_SYSCALLS($31)
lda $2, sys_call_table
- lda $27, alpha_ni_syscall
+ lda $27, sys_ni_syscall
cmpult $0, $1, $1
s8addq $0, $2, $2
beq $1, 1f
@@ -843,15 +843,20 @@ sys_rt_sigreturn:
.end sys_rt_sigreturn
.align 4
- .globl alpha_ni_syscall
- .ent alpha_ni_syscall
-alpha_ni_syscall:
+ .globl alpha_syscall_zero
+ .ent alpha_syscall_zero
+alpha_syscall_zero:
.prologue 0
- /* Special because it also implements overflow handling via
- syscall number 0. And if you recall, zero is a special
- trigger for "not an error". Store large non-zero there. */
+ /* Special because it needs to do something opposite to
+ force_successful_syscall_return(). We use the saved
+ syscall number for that, zero meaning "not an error".
+ That works nicely, but for real syscall 0 we need to
+ make sure that this logics doesn't get confused.
+ Store a non-zero there - -ENOSYS we need in register
+ for our return value will do just fine.
+ */
lda $0, -ENOSYS
unop
stq $0, 0($sp)
ret
-.end alpha_ni_syscall
+.end alpha_syscall_zero