aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/kernel/traps.c
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2016-01-18 07:12:19 -0500
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2016-01-19 06:14:03 -0500
commit9cb1ccecb69d133e014b7be4de2609f689398c07 (patch)
tree1f1c79f80ad49efc0de749b4d8bc88a9135cd1da /arch/s390/kernel/traps.c
parentfecc868a668774b0fc666728c3f5d9f6fceefe64 (diff)
s390: remove all usages of PSW_ADDR_INSN
Yet another leftover from the 31 bit era. The usual operation "y = x & PSW_ADDR_INSN" with the PSW_ADDR_INSN mask is a nop for CONFIG_64BIT. Therefore remove all usages and hope the code is a bit less confusing. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Reviewed-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
Diffstat (limited to 'arch/s390/kernel/traps.c')
-rw-r--r--arch/s390/kernel/traps.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/arch/s390/kernel/traps.c b/arch/s390/kernel/traps.c
index 6a49b7d90e0d..017eb03daee2 100644
--- a/arch/s390/kernel/traps.c
+++ b/arch/s390/kernel/traps.c
@@ -32,8 +32,7 @@ static inline void __user *get_trap_ip(struct pt_regs *regs)
32 address = *(unsigned long *)(current->thread.trap_tdb + 24); 32 address = *(unsigned long *)(current->thread.trap_tdb + 24);
33 else 33 else
34 address = regs->psw.addr; 34 address = regs->psw.addr;
35 return (void __user *) 35 return (void __user *) (address - (regs->int_code >> 16));
36 ((address - (regs->int_code >> 16)) & PSW_ADDR_INSN);
37} 36}
38 37
39static inline void report_user_fault(struct pt_regs *regs, int signr) 38static inline void report_user_fault(struct pt_regs *regs, int signr)
@@ -46,7 +45,7 @@ static inline void report_user_fault(struct pt_regs *regs, int signr)
46 return; 45 return;
47 printk("User process fault: interruption code %04x ilc:%d ", 46 printk("User process fault: interruption code %04x ilc:%d ",
48 regs->int_code & 0xffff, regs->int_code >> 17); 47 regs->int_code & 0xffff, regs->int_code >> 17);
49 print_vma_addr("in ", regs->psw.addr & PSW_ADDR_INSN); 48 print_vma_addr("in ", regs->psw.addr);
50 printk("\n"); 49 printk("\n");
51 show_regs(regs); 50 show_regs(regs);
52} 51}
@@ -69,13 +68,13 @@ void do_report_trap(struct pt_regs *regs, int si_signo, int si_code, char *str)
69 report_user_fault(regs, si_signo); 68 report_user_fault(regs, si_signo);
70 } else { 69 } else {
71 const struct exception_table_entry *fixup; 70 const struct exception_table_entry *fixup;
72 fixup = search_exception_tables(regs->psw.addr & PSW_ADDR_INSN); 71 fixup = search_exception_tables(regs->psw.addr);
73 if (fixup) 72 if (fixup)
74 regs->psw.addr = extable_fixup(fixup); 73 regs->psw.addr = extable_fixup(fixup);
75 else { 74 else {
76 enum bug_trap_type btt; 75 enum bug_trap_type btt;
77 76
78 btt = report_bug(regs->psw.addr & PSW_ADDR_INSN, regs); 77 btt = report_bug(regs->psw.addr, regs);
79 if (btt == BUG_TRAP_TYPE_WARN) 78 if (btt == BUG_TRAP_TYPE_WARN)
80 return; 79 return;
81 die(regs, str); 80 die(regs, str);