Title: [6621] trunk/arch/blackfin/kernel/early_printk.c: Before we configure the UART, check to make sure we are running on the
Revision
6621
Author
rgetz
Date
2009-06-10 01:11:21 -0500 (Wed, 10 Jun 2009)

Log Message

Before we configure the UART, check to make sure we are running on the
expected processor - otherwise, we cause problems by configuring pins
that don't exist (and causing an infinite loop of faults).

Modified Paths

Diff

Modified: trunk/arch/blackfin/kernel/early_printk.c (6620 => 6621)


--- trunk/arch/blackfin/kernel/early_printk.c	2009-06-09 18:40:12 UTC (rev 6620)
+++ trunk/arch/blackfin/kernel/early_printk.c	2009-06-10 06:11:21 UTC (rev 6621)
@@ -202,11 +202,15 @@
 asmlinkage void __init early_trap_c(struct pt_regs *fp, void *retaddr)
 {
 	/* This can happen before the uart is initialized, so initialize
-	 * the UART now
+	 * the UART now (but only if we are running on the processor we think
+	 * we are compiled for - otherwise we write to MMRs that don't exist,
+	 * and cause other problems. Nothing comes out the UART, but it does
+	 * end up in the __buf_log.
 	 */
-	if (likely(early_console == NULL))
+	if (likely(early_console == NULL) && CPUID == bfin_cpuid())
 		setup_early_printk(DEFAULT_EARLY_PORT);
 
+	printk(KERN_EMERG "Early panic\n");
 	dump_bfin_mem(fp);
 	show_regs(fp);
 	dump_bfin_trace_buffer();
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits

Reply via email to