]> git.karo-electronics.de Git - linux-beck.git/commitdiff
PCI: imx6: Fix imprecise abort handler
authorTim Harvey <tharvey@gateworks.com>
Fri, 18 Oct 2013 00:27:22 +0000 (17:27 -0700)
committerBjorn Helgaas <bhelgaas@google.com>
Tue, 29 Oct 2013 19:37:56 +0000 (13:37 -0600)
An imprecise abort is triggered when a port behind a switch is accessed
and no device is present.  At enumeration, imprecise aborts are not enabled
thus this ends up getting deferred until the kernel has completed init.  At
that point we must not adjust PC - the handler must do nothing, but a
handler must exist.

This fixes random crashes that occur right after freeing init.

Tested-by: Marek Vasut <marex@denx.de>
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Marek Vasut <marex@denx.de>
drivers/pci/host/pci-imx6.c

index 51338ac5775d0d017b209c76c801acbfe96ec698..7426ad961b817bf98bcabc7b117bb84ef6840130 100644 (file)
@@ -200,12 +200,6 @@ static int pcie_phy_write(void __iomem *dbi_base, int addr, int data)
 static int imx6q_pcie_abort_handler(unsigned long addr,
                unsigned int fsr, struct pt_regs *regs)
 {
-       /*
-        * If it was an imprecise abort, then we need to correct the
-        * return address to be _after_ the instruction.
-        */
-       if (fsr & (1 << 10))
-               regs->ARM_pc += 4;
        return 0;
 }