powerpc/fsl_pci: Correct fsl_pci_mcheck_exception
authorJoakim Tjernlund <joakim.tjernlund@infinera.com>
Tue, 5 Sep 2017 11:59:43 +0000 (13:59 +0200)
committerScott Wood <oss@buserror.net>
Sun, 21 Jan 2018 05:08:43 +0000 (23:08 -0600)
get_user() had it args reversed causing NIP to be NULL:ed instead
of fixing up the PCI access.

Note: This still hangs my P1020 Freescale CPU hard, but at least
I get a NIP now.

Signed-off-by: Joakim Tjernlund <joakim.tjernlund@infinera.com>
Acked-by: Li Yang <leoyang.li@nxp.com>
Signed-off-by: Scott Wood <oss@buserror.net>
arch/powerpc/sysdev/fsl_pci.c

index 1e57edd..0c524c2 100644 (file)
@@ -1070,7 +1070,7 @@ int fsl_pci_mcheck_exception(struct pt_regs *regs)
        if (is_in_pci_mem_space(addr)) {
                if (user_mode(regs)) {
                        pagefault_disable();
-                       ret = get_user(regs->nip, &inst);
+                       ret = get_user(inst, (__u32 __user *)regs->nip);
                        pagefault_enable();
                } else {
                        ret = probe_kernel_address((void *)regs->nip, inst);