]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/powerpc/kernel/traps.c
Merge branch 'i2c-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6
[linux-2.6-omap-h63xx.git] / arch / powerpc / kernel / traps.c
index f7862224fe85e92748a8f1e28a0b7ef71a57b330..d8502e3775188a2cb76eead66f79dca99fbe0211 100644 (file)
@@ -33,8 +33,8 @@
 #include <linux/kexec.h>
 #include <linux/backlight.h>
 #include <linux/bug.h>
+#include <linux/kdebug.h>
 
-#include <asm/kdebug.h>
 #include <asm/pgtable.h>
 #include <asm/uaccess.h>
 #include <asm/system.h>
@@ -72,20 +72,6 @@ EXPORT_SYMBOL(__debugger_dabr_match);
 EXPORT_SYMBOL(__debugger_fault_handler);
 #endif
 
-ATOMIC_NOTIFIER_HEAD(powerpc_die_chain);
-
-int register_die_notifier(struct notifier_block *nb)
-{
-       return atomic_notifier_chain_register(&powerpc_die_chain, nb);
-}
-EXPORT_SYMBOL(register_die_notifier);
-
-int unregister_die_notifier(struct notifier_block *nb)
-{
-       return atomic_notifier_chain_unregister(&powerpc_die_chain, nb);
-}
-EXPORT_SYMBOL(unregister_die_notifier);
-
 /*
  * Trap & Exception support
  */
@@ -163,6 +149,7 @@ int die(const char *str, struct pt_regs *regs, long err)
 
        bust_spinlocks(0);
        die.lock_owner = -1;
+       add_taint(TAINT_DIE);
        spin_unlock_irqrestore(&die.lock, flags);
 
        if (kexec_should_crash(current) ||
@@ -312,7 +299,7 @@ static inline int check_io_access(struct pt_regs *regs)
 #ifndef CONFIG_FSL_BOOKE
 #define get_mc_reason(regs)    ((regs)->dsisr)
 #else
-#define get_mc_reason(regs)    (mfspr(SPRN_MCSR))
+#define get_mc_reason(regs)    (mfspr(SPRN_MCSR) & MCSR_MASK)
 #endif
 #define REASON_FP              ESR_FP
 #define REASON_ILLEGAL         (ESR_PIL | ESR_PUO)
@@ -427,8 +414,6 @@ void machine_check_exception(struct pt_regs *regs)
                printk("Data Cache Push Parity Error\n");
        if (reason & MCSR_DCPERR)
                printk("Data Cache Parity Error\n");
-       if (reason & MCSR_GL_CI)
-               printk("Guarded Load or Cache-Inhibited stwcx.\n");
        if (reason & MCSR_BUS_IAERR)
                printk("Bus - Instruction Address Error\n");
        if (reason & MCSR_BUS_RAERR)
@@ -791,7 +776,7 @@ void __kprobes program_check_exception(struct pt_regs *regs)
                        return;
 
                if (!(regs->msr & MSR_PR) &&  /* not user-mode */
-                   report_bug(regs->nip) == BUG_TRAP_TYPE_WARN) {
+                   report_bug(regs->nip, regs) == BUG_TRAP_TYPE_WARN) {
                        regs->nip += 4;
                        return;
                }