diff options
| -rw-r--r-- | arch/arm/mach-bcm/bcm_5301x.c | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/arch/arm/mach-bcm/bcm_5301x.c b/arch/arm/mach-bcm/bcm_5301x.c index ef9740a20883..edff69761e04 100644 --- a/arch/arm/mach-bcm/bcm_5301x.c +++ b/arch/arm/mach-bcm/bcm_5301x.c | |||
| @@ -9,8 +9,40 @@ | |||
| 9 | #include <asm/hardware/cache-l2x0.h> | 9 | #include <asm/hardware/cache-l2x0.h> |
| 10 | 10 | ||
| 11 | #include <asm/mach/arch.h> | 11 | #include <asm/mach/arch.h> |
| 12 | #include <asm/siginfo.h> | ||
| 13 | #include <asm/signal.h> | ||
| 12 | 14 | ||
| 13 | 15 | ||
| 16 | static bool first_fault = true; | ||
| 17 | |||
| 18 | static int bcm5301x_abort_handler(unsigned long addr, unsigned int fsr, | ||
| 19 | struct pt_regs *regs) | ||
| 20 | { | ||
| 21 | if (fsr == 0x1c06 && first_fault) { | ||
| 22 | first_fault = false; | ||
| 23 | |||
| 24 | /* | ||
| 25 | * These faults with code 0x1c06 happens for no good reason, | ||
| 26 | * possibly left over from the CFE boot loader. | ||
| 27 | */ | ||
| 28 | pr_warn("External imprecise Data abort at addr=%#lx, fsr=%#x ignored.\n", | ||
| 29 | addr, fsr); | ||
| 30 | |||
| 31 | /* Returning non-zero causes fault display and panic */ | ||
| 32 | return 0; | ||
| 33 | } | ||
| 34 | |||
| 35 | /* Others should cause a fault */ | ||
| 36 | return 1; | ||
| 37 | } | ||
| 38 | |||
| 39 | static void __init bcm5301x_init_early(void) | ||
| 40 | { | ||
| 41 | /* Install our hook */ | ||
| 42 | hook_fault_code(16 + 6, bcm5301x_abort_handler, SIGBUS, BUS_OBJERR, | ||
| 43 | "imprecise external abort"); | ||
| 44 | } | ||
| 45 | |||
| 14 | static void __init bcm5301x_dt_init(void) | 46 | static void __init bcm5301x_dt_init(void) |
| 15 | { | 47 | { |
| 16 | l2x0_of_init(0, ~0UL); | 48 | l2x0_of_init(0, ~0UL); |
| @@ -23,6 +55,7 @@ static const char __initconst *bcm5301x_dt_compat[] = { | |||
| 23 | }; | 55 | }; |
| 24 | 56 | ||
| 25 | DT_MACHINE_START(BCM5301X, "BCM5301X") | 57 | DT_MACHINE_START(BCM5301X, "BCM5301X") |
| 58 | .init_early = bcm5301x_init_early, | ||
| 26 | .init_machine = bcm5301x_dt_init, | 59 | .init_machine = bcm5301x_dt_init, |
| 27 | .dt_compat = bcm5301x_dt_compat, | 60 | .dt_compat = bcm5301x_dt_compat, |
| 28 | MACHINE_END | 61 | MACHINE_END |
