]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/ppc/kernel/traps.c
Merge branch 'upstream-fixes'
[linux-2.6-omap-h63xx.git] / arch / ppc / kernel / traps.c
index 16adde6b429d2641827eade241cf016c22d2889b..6d0a1838d94cc4badc79fd46552ef6f83be106cc 100644 (file)
@@ -38,9 +38,6 @@
 #include <asm/io.h>
 #include <asm/reg.h>
 #include <asm/xmon.h>
-#ifdef CONFIG_PMAC_BACKLIGHT
-#include <asm/backlight.h>
-#endif
 #include <asm/pmc.h>
 
 #ifdef CONFIG_XMON
@@ -49,7 +46,7 @@ extern int xmon_sstep(struct pt_regs *regs);
 extern int xmon_iabr_match(struct pt_regs *regs);
 extern int xmon_dabr_match(struct pt_regs *regs);
 
-void (*debugger)(struct pt_regs *regs) = xmon;
+int (*debugger)(struct pt_regs *regs) = xmon;
 int (*debugger_bpt)(struct pt_regs *regs) = xmon_bpt;
 int (*debugger_sstep)(struct pt_regs *regs) = xmon_sstep;
 int (*debugger_iabr_match)(struct pt_regs *regs) = xmon_iabr_match;
@@ -57,7 +54,7 @@ int (*debugger_dabr_match)(struct pt_regs *regs) = xmon_dabr_match;
 void (*debugger_fault_handler)(struct pt_regs *regs);
 #else
 #ifdef CONFIG_KGDB
-void (*debugger)(struct pt_regs *regs);
+int (*debugger)(struct pt_regs *regs);
 int (*debugger_bpt)(struct pt_regs *regs);
 int (*debugger_sstep)(struct pt_regs *regs);
 int (*debugger_iabr_match)(struct pt_regs *regs);
@@ -85,12 +82,6 @@ int die(const char * str, struct pt_regs * fp, long err)
        int nl = 0;
        console_verbose();
        spin_lock_irq(&die_lock);
-#ifdef CONFIG_PMAC_BACKLIGHT
-       if (_machine == _MACH_Pmac) {
-               set_backlight_enable(1);
-               set_backlight_level(BACKLIGHT_MAX);
-       }
-#endif
        printk("Oops: %s, sig: %ld [#%d]\n", str, err, ++die_counter);
 #ifdef CONFIG_PREEMPT
        printk("PREEMPT ");
@@ -159,7 +150,7 @@ void _exception(int signr, struct pt_regs *regs, int code, unsigned long addr)
  */
 static inline int check_io_access(struct pt_regs *regs)
 {
-#ifdef CONFIG_PPC_PMAC
+#if defined CONFIG_8xx
        unsigned long msr = regs->msr;
        const struct exception_table_entry *entry;
        unsigned int *nip = (unsigned int *)regs->nip;
@@ -178,7 +169,11 @@ static inline int check_io_access(struct pt_regs *regs)
                        nip -= 2;
                else if (*nip == 0x4c00012c)    /* isync */
                        --nip;
-               if (*nip == 0x7c0004ac || (*nip >> 26) == 3) {
+               /* eieio from I/O string functions */
+               else if ((*nip) == 0x7c0006ac || *(nip+1) == 0x7c0006ac)
+                       nip += 2;
+               if (*nip == 0x7c0004ac || (*nip >> 26) == 3 ||
+                       (*(nip+1) >> 26) == 3) {
                        /* sync or twi */
                        unsigned int rb;
 
@@ -192,7 +187,7 @@ static inline int check_io_access(struct pt_regs *regs)
                        return 1;
                }
        }
-#endif /* CONFIG_PPC_PMAC */
+#endif /* CONFIG_8xx */
        return 0;
 }