]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
ARM: prevent misleading message about unaligned accesses
authorLothar Waßmann <LW@KARO-electronics.de>
Mon, 7 Oct 2013 12:17:11 +0000 (14:17 +0200)
committerLothar Waßmann <LW@KARO-electronics.de>
Mon, 7 Oct 2013 12:17:11 +0000 (14:17 +0200)
arch/arm/lib/interrupts.c

index 04b70f6cc86d83c99e3d3f52fcc66faffb68f706..849a37a490d31182eb955c12661abe7c993ff5c9 100644 (file)
@@ -153,7 +153,14 @@ void do_prefetch_abort (struct pt_regs *pt_regs)
 
 void do_data_abort (struct pt_regs *pt_regs)
 {
-       printf ("data abort\n\n    MAYBE you should read doc/README.arm-unaligned-accesses\n\n");
+       unsigned long fsr;
+
+       /* Read Fault Status Register */
+       asm volatile ("mrc p15, 0, %0, c5, c0, 0" : "=r"(fsr));
+
+       printf ("data abort\n\n");
+       if (fsr & 1)
+               printf ("MAYBE you should read doc/README.arm-unaligned-accesses\n\n");
        show_regs (pt_regs);
        bad_mode ();
 }