Blackfin: do not configure the UART early if on wrong processor
authorRobin Getz <robin.getz@analog.com>
Wed, 10 Jun 2009 06:11:21 +0000 (06:11 +0000)
committerMike Frysinger <vapier@gentoo.org>
Sat, 13 Jun 2009 11:20:10 +0000 (07:20 -0400)
Before we configure the early 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).

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
arch/blackfin/kernel/early_printk.c

index 3302719173ca63ba39656ad5d8a5623c74994993..2ab56811841c6c6982e8cc00d1ca2724addc54d1 100644 (file)
@@ -202,11 +202,15 @@ asmlinkage void __init init_early_exception_vectors(void)
 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();
This page took 0.027098 seconds and 5 git commands to generate.