Commit 9d9043f6 authored by Max Filippov's avatar Max Filippov

xtensa: clean up system_call/xtensa_rt_sigreturn interaction

system_call assembly code always pushes pointer to struct pt_regs as the
last additional parameter for all system calls. The only user of this
feature is xtensa_rt_sigreturn.
Avoid this special case. Define xtensa_rt_sigreturn as accepting no
argiments. Use current_pt_regs to get pointer to struct pt_regs in
xtensa_rt_sigreturn. Don't pass additional parameter from system_call
code.
Signed-off-by: default avatarMax Filippov <jcmvbkbc@gmail.com>
parent 02ce94c2
...@@ -79,7 +79,7 @@ static inline void syscall_set_arguments(struct task_struct *task, ...@@ -79,7 +79,7 @@ static inline void syscall_set_arguments(struct task_struct *task,
regs->areg[reg[i]] = args[i]; regs->areg[reg[i]] = args[i];
} }
asmlinkage long xtensa_rt_sigreturn(struct pt_regs*); asmlinkage long xtensa_rt_sigreturn(void);
asmlinkage long xtensa_shmat(int, char __user *, int); asmlinkage long xtensa_shmat(int, char __user *, int);
asmlinkage long xtensa_fadvise64_64(int, int, asmlinkage long xtensa_fadvise64_64(int, int,
unsigned long long, unsigned long long); unsigned long long, unsigned long long);
......
...@@ -1876,8 +1876,7 @@ ENDPROC(fast_store_prohibited) ...@@ -1876,8 +1876,7 @@ ENDPROC(fast_store_prohibited)
ENTRY(system_call) ENTRY(system_call)
/* reserve 4 bytes on stack for function parameter */ abi_entry_default
abi_entry(4)
/* regs->syscall = regs->areg[2] */ /* regs->syscall = regs->areg[2] */
...@@ -1915,9 +1914,6 @@ ENTRY(system_call) ...@@ -1915,9 +1914,6 @@ ENTRY(system_call)
l32i a10, a2, PT_AREG8 l32i a10, a2, PT_AREG8
l32i a11, a2, PT_AREG9 l32i a11, a2, PT_AREG9
/* Pass one additional argument to the syscall: pt_regs (on stack) */
s32i a2, a1, 0
callx4 a4 callx4 a4
1: /* regs->areg[2] = return_value */ 1: /* regs->areg[2] = return_value */
...@@ -1925,12 +1921,12 @@ ENTRY(system_call) ...@@ -1925,12 +1921,12 @@ ENTRY(system_call)
s32i a6, a2, PT_AREG2 s32i a6, a2, PT_AREG2
bnez a3, 1f bnez a3, 1f
.Lsyscall_exit: .Lsyscall_exit:
abi_ret(4) abi_ret_default
1: 1:
mov a6, a2 mov a6, a2
call4 do_syscall_trace_leave call4 do_syscall_trace_leave
abi_ret(4) abi_ret_default
ENDPROC(system_call) ENDPROC(system_call)
......
...@@ -236,9 +236,9 @@ restore_sigcontext(struct pt_regs *regs, struct rt_sigframe __user *frame) ...@@ -236,9 +236,9 @@ restore_sigcontext(struct pt_regs *regs, struct rt_sigframe __user *frame)
* Do a signal return; undo the signal stack. * Do a signal return; undo the signal stack.
*/ */
asmlinkage long xtensa_rt_sigreturn(long a0, long a1, long a2, long a3, asmlinkage long xtensa_rt_sigreturn(void)
long a4, long a5, struct pt_regs *regs)
{ {
struct pt_regs *regs = current_pt_regs();
struct rt_sigframe __user *frame; struct rt_sigframe __user *frame;
sigset_t set; sigset_t set;
int ret; int ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment