Skip to content

Commit 413d404

Browse files
heicarstMartin Schwidefsky
authored andcommitted
s390/traps: print interrupt code and instruction length code
It always confuses me to see the mixed instruction length code and interruption code on user space faults, while the message clearly says it is the interruption code. So split the value and print both values separately. Also add the ILC output to the die() message, so thar user and kernel space faults contain the same information. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
1 parent 4eafad7 commit 413d404

3 files changed

Lines changed: 6 additions & 4 deletions

File tree

arch/s390/kernel/dumpstack.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,8 @@ void die(struct pt_regs *regs, const char *str)
191191
console_verbose();
192192
spin_lock_irq(&die_lock);
193193
bust_spinlocks(1);
194-
printk("%s: %04x [#%d] ", str, regs->int_code & 0xffff, ++die_counter);
194+
printk("%s: %04x ilc:%d [#%d] ", str, regs->int_code & 0xffff,
195+
regs->int_code >> 17, ++die_counter);
195196
#ifdef CONFIG_PREEMPT
196197
printk("PREEMPT ");
197198
#endif

arch/s390/kernel/traps.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ static inline void report_user_fault(struct pt_regs *regs, int signr)
4949
return;
5050
if (!printk_ratelimit())
5151
return;
52-
printk("User process fault: interruption code 0x%X ", regs->int_code);
52+
printk("User process fault: interruption code %04x ilc:%d ",
53+
regs->int_code & 0xffff, regs->int_code >> 17);
5354
print_vma_addr("in ", regs->psw.addr & PSW_ADDR_INSN);
5455
printk("\n");
5556
show_regs(regs);

arch/s390/mm/fault.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -261,8 +261,8 @@ static inline void report_user_fault(struct pt_regs *regs, long signr)
261261
return;
262262
if (!printk_ratelimit())
263263
return;
264-
printk(KERN_ALERT "User process fault: interruption code 0x%X ",
265-
regs->int_code);
264+
printk(KERN_ALERT "User process fault: interruption code %04x ilc:%d",
265+
regs->int_code & 0xffff, regs->int_code >> 17);
266266
print_vma_addr(KERN_CONT "in ", regs->psw.addr & PSW_ADDR_INSN);
267267
printk(KERN_CONT "\n");
268268
printk(KERN_ALERT "failing address: %016lx TEID: %016lx\n",

0 commit comments

Comments
 (0)