1 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <zajec5@gmail.com>
2 Date: Tue, 8 Mar 2016 09:03:21 +0100
3 Subject: [PATCH] Revert "ARM: BCM5301X: remove workaround imprecise abort
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
9 This reverts commit 937b12306ea79044c86f2e69b3061c7279245825.
11 It seems imprecise external abort (0x1406) can be still happen on
12 BCM4709 during PCI initialization.
14 Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
17 --- a/arch/arm/mach-bcm/bcm_5301x.c
18 +++ b/arch/arm/mach-bcm/bcm_5301x.c
20 #include <asm/hardware/cache-l2x0.h>
22 #include <asm/mach/arch.h>
23 +#include <asm/siginfo.h>
24 +#include <asm/signal.h>
27 +static bool first_fault = true;
29 +static int bcm5301x_abort_handler(unsigned long addr, unsigned int fsr,
30 + struct pt_regs *regs)
32 + if ((fsr == 0x1406 || fsr == 0x1c06) && first_fault) {
33 + first_fault = false;
36 + * These faults with codes 0x1406 (BCM4709) or 0x1c06 happens
37 + * for no good reason, possibly left over from the CFE boot
40 + pr_warn("External imprecise Data abort at addr=%#lx, fsr=%#x ignored.\n",
43 + /* Returning non-zero causes fault display and panic */
47 + /* Others should cause a fault */
51 +static void __init bcm5301x_init_early(void)
53 + /* Install our hook */
54 + hook_fault_code(16 + 6, bcm5301x_abort_handler, SIGBUS, BUS_OBJERR,
55 + "imprecise external abort");
58 static const char *const bcm5301x_dt_compat[] __initconst = {
60 @@ -18,5 +52,6 @@ static const char *const bcm5301x_dt_com
61 DT_MACHINE_START(BCM5301X, "BCM5301X")
64 + .init_early = bcm5301x_init_early,
65 .dt_compat = bcm5301x_dt_compat,