020-ARM-BCM5301X-remove-workaround-imprecise-abort-fault.patch 2.0 KB

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