diff options
author | Arnd Bergmann <arnd@arndb.de> | 2016-11-30 11:49:17 -0500 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2016-11-30 11:49:17 -0500 |
commit | 9442091ed031f79df0ddc44c8dafd7537faeb4e7 (patch) | |
tree | a582c72e32688673d20b95fdd07664dfb2be836e | |
parent | 196249beabe34066fc4655af8bacbb5ab8b77224 (diff) | |
parent | 09f3510fb70a46c8921f2cf4a90dbcae460a6820 (diff) |
Merge tag 'arm-soc/for-4.10/soc' of http://github.com/Broadcom/stblinux into next/soc
Merge "Broadcom soc changes for 4.10" from Florian Fainelli:
This pull request contains Broadcom ARM-based SoC changes for 4.10, please pull
the following:
- Rafal adds back the abort handler hook on BCM5301x which is required to silence
errors forwared from the PCIe controller that cannot be silenced at the PCIe RC level
* tag 'arm-soc/for-4.10/soc' of http://github.com/Broadcom/stblinux:
ARM: BCM5301X: Add back handler ignoring external imprecise aborts
-rw-r--r-- | arch/arm/mach-bcm/bcm_5301x.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/arch/arm/mach-bcm/bcm_5301x.c b/arch/arm/mach-bcm/bcm_5301x.c index c8830a2b0d60..fe067f6cebb6 100644 --- a/arch/arm/mach-bcm/bcm_5301x.c +++ b/arch/arm/mach-bcm/bcm_5301x.c | |||
@@ -9,14 +9,42 @@ | |||
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> | ||
14 | |||
15 | #define FSR_EXTERNAL (1 << 12) | ||
16 | #define FSR_READ (0 << 10) | ||
17 | #define FSR_IMPRECISE 0x0406 | ||
12 | 18 | ||
13 | static const char *const bcm5301x_dt_compat[] __initconst = { | 19 | static const char *const bcm5301x_dt_compat[] __initconst = { |
14 | "brcm,bcm4708", | 20 | "brcm,bcm4708", |
15 | NULL, | 21 | NULL, |
16 | }; | 22 | }; |
17 | 23 | ||
24 | static int bcm5301x_abort_handler(unsigned long addr, unsigned int fsr, | ||
25 | struct pt_regs *regs) | ||
26 | { | ||
27 | /* | ||
28 | * We want to ignore aborts forwarded from the PCIe bus that are | ||
29 | * expected and shouldn't really be passed by the PCIe controller. | ||
30 | * The biggest disadvantage is the same FSR code may be reported when | ||
31 | * reading non-existing APB register and we shouldn't ignore that. | ||
32 | */ | ||
33 | if (fsr == (FSR_EXTERNAL | FSR_READ | FSR_IMPRECISE)) | ||
34 | return 0; | ||
35 | |||
36 | return 1; | ||
37 | } | ||
38 | |||
39 | static void __init bcm5301x_init_early(void) | ||
40 | { | ||
41 | hook_fault_code(16 + 6, bcm5301x_abort_handler, SIGBUS, BUS_OBJERR, | ||
42 | "imprecise external abort"); | ||
43 | } | ||
44 | |||
18 | DT_MACHINE_START(BCM5301X, "BCM5301X") | 45 | DT_MACHINE_START(BCM5301X, "BCM5301X") |
19 | .l2c_aux_val = 0, | 46 | .l2c_aux_val = 0, |
20 | .l2c_aux_mask = ~0, | 47 | .l2c_aux_mask = ~0, |
21 | .dt_compat = bcm5301x_dt_compat, | 48 | .dt_compat = bcm5301x_dt_compat, |
49 | .init_early = bcm5301x_init_early, | ||
22 | MACHINE_END | 50 | MACHINE_END |