Blackfin arch: Fix bug - HW Errors never recover on BF548

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linux Kernel Mailing List
Date: Monday, October 13, 2008 - 11:21 am

Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=1d5ff7...
Commit:     1d5ff7e27d2ca30cd3f61afd353b03dd67330818
Parent:     55f2feae3a1e075d9b4b0e73a6024f3e25717878
Author:     Robin Getz <rgetz@blackfin.uclinux.org>
AuthorDate: Thu Oct 9 17:06:32 2008 +0800
Committer:  Bryan Wu <cooloney@kernel.org>
CommitDate: Thu Oct 9 17:06:32 2008 +0800

    Blackfin arch: Fix bug - HW Errors never recover on BF548
    
    The kernel does not properly clear the EBIU Error Master (EBIU_ERRMST) Register
    on BF548, which causes the kernel to panic.
    
    We need to make sure that we clear the EBIU_ERRMST (necessary on BF54x)
    
    Signed-off-by: Robin Getz <rgetz@blackfin.uclinux.org>
    Signed-off-by: Bryan Wu <cooloney@kernel.org>
---
 arch/blackfin/kernel/traps.c          |   15 +++++++++++++--
 arch/blackfin/mach-common/interrupt.S |    9 +++++++++
 2 files changed, 22 insertions(+), 2 deletions(-)

diff --git a/arch/blackfin/kernel/traps.c b/arch/blackfin/kernel/traps.c
index 1a3c4da..709c247 100644
--- a/arch/blackfin/kernel/traps.c
+++ b/arch/blackfin/kernel/traps.c
@@ -1025,8 +1025,19 @@ void show_regs(struct pt_regs *fp)
 	printk(KERN_NOTICE "\n" KERN_NOTICE "SEQUENCER STATUS:\t\t%s\n", print_tainted());
 	printk(KERN_NOTICE " SEQSTAT: %08lx  IPEND: %04lx  SYSCFG: %04lx\n",
 		(long)fp->seqstat, fp->ipend, fp->syscfg);
-	printk(KERN_NOTICE "  HWERRCAUSE: 0x%lx\n",
-		(fp->seqstat & SEQSTAT_HWERRCAUSE) >> 14);
+	if ((fp->seqstat & SEQSTAT_EXCAUSE) == VEC_HWERR) {
+		printk(KERN_NOTICE "  HWERRCAUSE: 0x%lx\n",
+			(fp->seqstat & SEQSTAT_HWERRCAUSE) >> 14);
+#ifdef EBIU_ERRMST
+		/* If the error was from the EBIU, print it out */
+		if (bfin_read_EBIU_ERRMST() & CORE_ERROR) {
+			printk(KERN_NOTICE "  EBIU Error Reason  : 0x%04x\n",
+				bfin_read_EBIU_ERRMST());
+			printk(KERN_NOTICE "  EBIU Error Address : 0x%08x\n",
+				bfin_read_EBIU_ERRADD());
+		}
+#endif
+	}
 	printk(KERN_NOTICE "  EXCAUSE   : 0x%lx\n",
 		fp->seqstat & SEQSTAT_EXCAUSE);
 	for (i = 6; i <= 15 ; i++) {
diff --git a/arch/blackfin/mach-common/interrupt.S b/arch/blackfin/mach-common/interrupt.S
index 647f0f5..4a2ec7a 100644
--- a/arch/blackfin/mach-common/interrupt.S
+++ b/arch/blackfin/mach-common/interrupt.S
@@ -179,7 +179,16 @@ ENTRY(_evt_ivhw)
 	call _trap_c;
 	SP += 12;
 
+#ifdef EBIU_ERRMST
+	/* make sure EBIU_ERRMST is clear */
+	p0.l = LO(EBIU_ERRMST);
+	p0.h = HI(EBIU_ERRMST);
+	r0.l = (CORE_ERROR | CORE_MERROR);
+	w[p0] = r0.l;
+#endif
+
 	call _ret_from_exception;
+
 .Lcommon_restore_all_sys:
 	RESTORE_ALL_SYS
 	rti;
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Blackfin arch: Fix bug - HW Errors never recover on BF548, Linux Kernel Mailing ..., (Mon Oct 13, 11:21 am)