s390/traps: print interrupt code and instruction length code
authorHeiko Carstens <heiko.carstens@de.ibm.com>
Wed, 19 Nov 2014 12:31:08 +0000 (13:31 +0100)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Fri, 21 Nov 2014 07:49:30 +0000 (08:49 +0100)
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>
arch/s390/kernel/dumpstack.c
arch/s390/kernel/traps.c
arch/s390/mm/fault.c

index acb412442e5e95d36039371b5143012d75b9436c..a99852e96a77ce502d279547c382597c2a764d6b 100644 (file)
@@ -191,7 +191,8 @@ void die(struct pt_regs *regs, const char *str)
        console_verbose();
        spin_lock_irq(&die_lock);
        bust_spinlocks(1);
-       printk("%s: %04x [#%d] ", str, regs->int_code & 0xffff, ++die_counter);
+       printk("%s: %04x ilc:%d [#%d] ", str, regs->int_code & 0xffff,
+              regs->int_code >> 17, ++die_counter);
 #ifdef CONFIG_PREEMPT
        printk("PREEMPT ");
 #endif
index 1e1b866b296693f6c90df5321057bec8c4f89263..b7a3ccffa3454265bd01b95473881d5b7ee8da5a 100644 (file)
@@ -49,7 +49,8 @@ static inline void report_user_fault(struct pt_regs *regs, int signr)
                return;
        if (!printk_ratelimit())
                return;
-       printk("User process fault: interruption code 0x%X ", regs->int_code);
+       printk("User process fault: interruption code %04x ilc:%d ",
+              regs->int_code & 0xffff, regs->int_code >> 17);
        print_vma_addr("in ", regs->psw.addr & PSW_ADDR_INSN);
        printk("\n");
        show_regs(regs);
index ca70fad2fc924d4999f8a2997491278cb01f4772..811937bb90be69a18f57621d1be7e6fbfc12d423 100644 (file)
@@ -261,8 +261,8 @@ static inline void report_user_fault(struct pt_regs *regs, long signr)
                return;
        if (!printk_ratelimit())
                return;
-       printk(KERN_ALERT "User process fault: interruption code 0x%X ",
-              regs->int_code);
+       printk(KERN_ALERT "User process fault: interruption code %04x ilc:%d",
+              regs->int_code & 0xffff, regs->int_code >> 17);
        print_vma_addr(KERN_CONT "in ", regs->psw.addr & PSW_ADDR_INSN);
        printk(KERN_CONT "\n");
        printk(KERN_ALERT "failing address: %016lx TEID: %016lx\n",