imx6: add initial 3.12 support
[openwrt.git] / target / linux / imx6 / patches-3.12 / 0032-PCI-imx6-fix-imprecise-abort-handler.patch
1 From 8590081d5328fe59d4f72aaadafb47fb91d8dc7c Mon Sep 17 00:00:00 2001
2 From: Tim Harvey <tharvey@gateworks.com>
3 Date: Thu, 17 Oct 2013 15:52:16 -0700
4 Subject: [PATCH] PCI: imx6: fix imprecise abort handler
5
6 An imprecise abort is triggered when a port behind a switch is accessed
7 and no device is present.  At enumeration, imprecise aborts are not enabled
8 thus this ends up getting deferred until the kernel has completed init.  At
9 that point we must not adjust PC - the handler must do nothing, but a handler
10 must exist.
11
12 This fixes random crashes that occur right after freeing init.
13 This is against linux-pci/host-imx6.
14
15 Acked-by: Marek Vasut <marex@denx.de>
16 Tested-by: Marek Vasut <marex@denx.de>
17 Signed-off-by: Tim Harvey <tharvey@gateworks.com>
18 ---
19  drivers/pci/host/pci-imx6.c |    6 ------
20  1 file changed, 6 deletions(-)
21
22 --- a/drivers/pci/host/pci-imx6.c
23 +++ b/drivers/pci/host/pci-imx6.c
24 @@ -200,12 +200,6 @@ static int pcie_phy_write(void __iomem *
25  static int imx6q_pcie_abort_handler(unsigned long addr,
26                 unsigned int fsr, struct pt_regs *regs)
27  {
28 -       /*
29 -        * If it was an imprecise abort, then we need to correct the
30 -        * return address to be _after_ the instruction.
31 -        */
32 -       if (fsr & (1 << 10))
33 -               regs->ARM_pc += 4;
34         return 0;
35  }
36