From patchwork Tue Sep 5 11:59:43 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joakim Tjernlund X-Patchwork-Id: 810092 X-Patchwork-Delegate: scottwood@freescale.com Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3xmlnB48Zlz9sPt for ; Tue, 5 Sep 2017 22:06:38 +1000 (AEST) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3xmlnB38fYzDrRw for ; Tue, 5 Sep 2017 22:06:38 +1000 (AEST) X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Authentication-Results: ozlabs.org; spf=permerror (mailfrom) smtp.mailfrom=infinera.com (client-ip=31.15.61.139; helo=smtp.transmode.se; envelope-from=joakim.tjernlund@infinera.com; receiver=) X-Greylist: delayed 317 seconds by postgrey-1.36 at bilbo; Tue, 05 Sep 2017 22:05:10 AEST Received: from smtp.transmode.se (smtp.transmode.se [31.15.61.139]) by lists.ozlabs.org (Postfix) with ESMTP id 3xmllV6t0yzDrJF for ; Tue, 5 Sep 2017 22:05:10 +1000 (AEST) Received: from gentoo-jocke.infinera.com (gentoo-jocke.infinera.com [10.210.73.93]) by smtp.transmode.se (Postfix) with ESMTP id E3EFA11870D7; Tue, 5 Sep 2017 13:59:46 +0200 (CEST) Received: from gentoo-jocke.infinera.com (gentoo-jocke.infinera.com [127.0.0.1]) by gentoo-jocke.infinera.com (8.14.9/8.14.9) with ESMTP id v85Bxk2Z019986; Tue, 5 Sep 2017 13:59:46 +0200 Received: (from jocke@localhost) by gentoo-jocke.infinera.com (8.14.9/8.14.9/Submit) id v85Bxkfq019985; Tue, 5 Sep 2017 13:59:46 +0200 From: Joakim Tjernlund To: linuxppc-dev linuxppc-dev , York Sun Subject: [PATCH] fsl_pci: Correct fsl_pci_mcheck_exception Date: Tue, 5 Sep 2017 13:59:43 +0200 Message-Id: <20170905115943.19919-1-joakim.tjernlund@infinera.com> X-Mailer: git-send-email 2.13.5 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" 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 Acked-by: Li Yang --- arch/powerpc/sysdev/fsl_pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/sysdev/fsl_pci.c b/arch/powerpc/sysdev/fsl_pci.c index 7c8b779c329a..9e64c12dff6a 100644 --- a/arch/powerpc/sysdev/fsl_pci.c +++ b/arch/powerpc/sysdev/fsl_pci.c @@ -996,7 +996,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(regs->nip, inst);