Merge branch 'for-linus' of git://git.linaro.org/people/rmk/linux-arm
[firefly-linux-kernel-4.4.55.git] / arch / arm / kernel / traps.c
index 23377a3bf50dcedfcb1698077a4df9a56c52b74d..778454750a6c323037e382ce8353443e63da36d3 100644 (file)
 #include <linux/atomic.h>
 #include <asm/cacheflush.h>
 #include <asm/exception.h>
-#include <asm/system.h>
 #include <asm/unistd.h>
 #include <asm/traps.h>
 #include <asm/unwind.h>
 #include <asm/tls.h>
+#include <asm/system_misc.h>
 
 #include "signal.h"
 
@@ -271,6 +271,7 @@ void die(const char *str, struct pt_regs *regs, int err)
 {
        struct thread_info *thread = current_thread_info();
        int ret;
+       enum bug_trap_type bug_type = BUG_TRAP_TYPE_NONE;
 
        oops_enter();
 
@@ -278,7 +279,9 @@ void die(const char *str, struct pt_regs *regs, int err)
        console_verbose();
        bust_spinlocks(1);
        if (!user_mode(regs))
-               report_bug(regs->ARM_pc, regs);
+               bug_type = report_bug(regs->ARM_pc, regs);
+       if (bug_type != BUG_TRAP_TYPE_NONE)
+               str = "Oops - BUG";
        ret = __die(str, err, thread, regs);
 
        if (regs && kexec_should_crash(thread->task))