s390: pass struct pt_regs instead of registers to syscalls

Instead of fetching all registers from struct pt_regs and passing
them to the syscall wrappers, let the system call wrappers only
fetch the values really required.

Signed-off-by: Sven Schnelle <svens@linux.ibm.com>
Reviewed-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
This commit is contained in:
Sven Schnelle
2021-01-18 09:35:38 +01:00
committed by Vasily Gorbik
parent 39589ada1c
commit 3a790cc1c9
3 changed files with 75 additions and 51 deletions

View File

@@ -132,12 +132,8 @@ void do_syscall(struct pt_regs *regs)
*/
if (!test_pt_regs_flag(regs, PIF_SYSCALL_RET_SET)) {
regs->gprs[2] = -ENOSYS;
if (likely(nr < NR_syscalls)) {
regs->gprs[2] = current->thread.sys_call_table[nr](
regs->orig_gpr2, regs->gprs[3],
regs->gprs[4], regs->gprs[5],
regs->gprs[6], regs->gprs[7]);
}
if (likely(nr < NR_syscalls))
regs->gprs[2] = current->thread.sys_call_table[nr](regs);
} else {
clear_pt_regs_flag(regs, PIF_SYSCALL_RET_SET);
}