mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 14:53:58 -04:00
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:
committed by
Vasily Gorbik
parent
39589ada1c
commit
3a790cc1c9
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user