800-PCI-iproc-Ignore-ARM-core-aborts-when-running-on-bcm.patch 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <zajec5@gmail.com>
  2. Subject: [PATCH] PCI: iproc: Ignore ARM core aborts when running on bcma bus
  3. MIME-Version: 1.0
  4. Content-Type: text/plain; charset=UTF-8
  5. Content-Transfer-Encoding: 8bit
  6. Northstar devices have host bridges that forward errors to the ARM core.
  7. These errors happen during PCI bus probing (device enumeration) and are
  8. expected. There is no reason for them to cause a die() so this patch
  9. adds a handler silencing them.
  10. Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
  11. ---
  12. --- a/drivers/pci/host/pcie-iproc-bcma.c
  13. +++ b/drivers/pci/host/pcie-iproc-bcma.c
  14. @@ -40,6 +40,15 @@ static int iproc_pcie_bcma_map_irq(const
  15. return bcma_core_irq(bdev, 5);
  16. }
  17. +static int iproc_pcie_bcma_abort_handler(unsigned long addr, unsigned int fsr,
  18. + struct pt_regs *regs)
  19. +{
  20. + if (fsr == 0x1406)
  21. + return 0;
  22. +
  23. + return 1;
  24. +}
  25. +
  26. static int iproc_pcie_bcma_probe(struct bcma_device *bdev)
  27. {
  28. struct iproc_pcie *pcie;
  29. @@ -65,6 +74,9 @@ static int iproc_pcie_bcma_probe(struct
  30. pcie->map_irq = iproc_pcie_bcma_map_irq;
  31. + hook_fault_code(16 + 6, iproc_pcie_bcma_abort_handler, SIGBUS, BUS_OBJERR,
  32. + "imprecise external abort");
  33. +
  34. ret = iproc_pcie_setup(pcie, &res);
  35. if (ret)
  36. dev_err(pcie->dev, "PCIe controller setup failed\n");