bc115b11f8c4eae50fd824c3e10fc9c9f2f08718
[openwrt.git] / target / linux / bcm53xx / patches-4.4 / 020-ARM-BCM5301X-remove-workaround-imprecise-abort-fault.patch
1 From 937b12306ea79044c86f2e69b3061c7279245825 Mon Sep 17 00:00:00 2001
2 From: Lucas Stach <l.stach@pengutronix.de>
3 Date: Thu, 15 Oct 2015 12:32:22 +0200
4 Subject: [PATCH] ARM: BCM5301X: remove workaround imprecise abort fault
5  handler
6
7 This is not needed anymore. Handling a potentially pending imprecise external
8 abort left behind by the bootloader is now done in a slightly safer way inside
9 the common ARM startup code.
10
11 Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
12 Acked-by: Hauke Mehrtens <hauke@hauke-m.de>
13 Tested-by: Tyler Baker <tyler.baker@linaro.org>
14 Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
15 ---
16  arch/arm/mach-bcm/bcm_5301x.c | 35 -----------------------------------
17  1 file changed, 35 deletions(-)
18
19 --- a/arch/arm/mach-bcm/bcm_5301x.c
20 +++ b/arch/arm/mach-bcm/bcm_5301x.c
21 @@ -9,40 +9,6 @@
22  #include <asm/hardware/cache-l2x0.h>
23  
24  #include <asm/mach/arch.h>
25 -#include <asm/siginfo.h>
26 -#include <asm/signal.h>
27 -
28 -
29 -static bool first_fault = true;
30 -
31 -static int bcm5301x_abort_handler(unsigned long addr, unsigned int fsr,
32 -                                struct pt_regs *regs)
33 -{
34 -       if ((fsr == 0x1406 || fsr == 0x1c06) && first_fault) {
35 -               first_fault = false;
36 -
37 -               /*
38 -                * These faults with codes 0x1406 (BCM4709) or 0x1c06 happens
39 -                * for no good reason, possibly left over from the CFE boot
40 -                * loader.
41 -                */
42 -               pr_warn("External imprecise Data abort at addr=%#lx, fsr=%#x ignored.\n",
43 -                       addr, fsr);
44 -
45 -               /* Returning non-zero causes fault display and panic */
46 -               return 0;
47 -       }
48 -
49 -       /* Others should cause a fault */
50 -       return 1;
51 -}
52 -
53 -static void __init bcm5301x_init_early(void)
54 -{
55 -       /* Install our hook */
56 -       hook_fault_code(16 + 6, bcm5301x_abort_handler, SIGBUS, BUS_OBJERR,
57 -                       "imprecise external abort");
58 -}
59  
60  static const char *const bcm5301x_dt_compat[] __initconst = {
61         "brcm,bcm4708",
62 @@ -52,6 +18,5 @@ static const char *const bcm5301x_dt_compat[] __initconst = {
63  DT_MACHINE_START(BCM5301X, "BCM5301X")
64         .l2c_aux_val    = 0,
65         .l2c_aux_mask   = ~0,
66 -       .init_early     = bcm5301x_init_early,
67         .dt_compat      = bcm5301x_dt_compat,
68  MACHINE_END