mirror of
https://github.com/torvalds/linux.git
synced 2026-09-25 09:41:03 +02:00
s390/syscalls: Use define instead of '1' to indicate PER trap
Make the code a bit easier to read by defining SYSCALL_PER_TRAP instead of passing '1' to __do_syscall(). Suggested-by: Heiko Carstens <hca@linux.ibm.com> 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:
parent
f588c5cb0b
commit
5c92744c1f
|
|
@ -368,7 +368,7 @@ SYM_CODE_START(pgm_check_handler)
|
|||
mvc __LC_RETURN_PSW(8,%r13),__LC_SVC_NEW_PSW(%r13)
|
||||
larl %r14,.Lsysc_per
|
||||
stg %r14,__LC_RETURN_PSW+8(%r13)
|
||||
lghi %r14,1
|
||||
lghi %r14,SYSCALL_FLAG_PER_TRAP
|
||||
LBEAR __LC_PGM_LAST_BREAK(%r13)
|
||||
LPSWEY __LC_RETURN_PSW,__LC_RETURN_LPSWE # branch to .Lsysc_per
|
||||
SYM_CODE_END(pgm_check_handler)
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
#define _ENTRY_H
|
||||
|
||||
#define PGM_FLAG_GUEST_FAULT 1
|
||||
#define SYSCALL_FLAG_PER_TRAP 1
|
||||
|
||||
#ifndef __ASSEMBLER__
|
||||
|
||||
|
|
@ -26,7 +27,7 @@ void early_pgm_check_handler(void);
|
|||
struct task_struct *__switch_to_asm(struct task_struct *prev, struct task_struct *next);
|
||||
void __ret_from_fork(struct task_struct *prev, struct pt_regs *regs);
|
||||
void __do_pgm_check(struct pt_regs *regs, unsigned long flags);
|
||||
void __do_syscall(struct pt_regs *regs, int per_trap);
|
||||
void __do_syscall(struct pt_regs *regs, unsigned long flags);
|
||||
void __do_early_pgm_check(struct pt_regs *regs);
|
||||
|
||||
void do_protection_exception(struct pt_regs *regs);
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ SYSCALL_DEFINE0(ni_syscall)
|
|||
return -ENOSYS;
|
||||
}
|
||||
|
||||
void noinstr __do_syscall(struct pt_regs *regs, int per_trap)
|
||||
void noinstr __do_syscall(struct pt_regs *regs, unsigned long flags)
|
||||
{
|
||||
unsigned long nr;
|
||||
|
||||
|
|
@ -106,7 +106,7 @@ void noinstr __do_syscall(struct pt_regs *regs, int per_trap)
|
|||
current->thread.last_break = regs->last_break;
|
||||
local_irq_enable();
|
||||
regs->orig_gpr2 = regs->gprs[2];
|
||||
if (unlikely(per_trap))
|
||||
if (unlikely(flags & SYSCALL_FLAG_PER_TRAP))
|
||||
set_thread_flag(TIF_PER_TRAP);
|
||||
regs->flags = 0;
|
||||
set_pt_regs_flag(regs, PIF_SYSCALL);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user