From patchwork Fri Oct 18 00:27:22 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tim Harvey X-Patchwork-Id: 3064251 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 87A239F372 for ; Fri, 18 Oct 2013 00:27:35 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B6C9D204E3 for ; Fri, 18 Oct 2013 00:27:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id ADCBF2045B for ; Fri, 18 Oct 2013 00:27:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756201Ab3JRA1c (ORCPT ); Thu, 17 Oct 2013 20:27:32 -0400 Received: from mail-pd0-f178.google.com ([209.85.192.178]:58170 "EHLO mail-pd0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755976Ab3JRA1c (ORCPT ); Thu, 17 Oct 2013 20:27:32 -0400 Received: by mail-pd0-f178.google.com with SMTP id w10so3668860pde.37 for ; Thu, 17 Oct 2013 17:27:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=kGfhwIudQsItEkAEJe/EXpJ2FklWXK9tgRrdynqMXZI=; b=foZD4uSWCgZJ8cOmW92KnRIykDFODZ26B0F88yEkKM2fufbrn5gixuetjPhR4khUbd kcih7ibfQv/hycsz18xnVKc4CMPTuEhoLkwgvhfCnIwCjbah7zbEnMZmMvPbDBWHpu8o vPGz4bmt1JguqcK7B/fLK31gIuFo0hgNqGu97+PF2i4aJXdWik9xO6hCO0HoKuSGekm1 drMzOZ0+2Pz0oVWQLwabKKYt6hNrduvnsmR5gkUKrx9lCcULOa8kN3c2oarJiMSQdCVF rJeG2ry6GiXDVvjxmHItIwuI7Xpemez/RJa0C0EAgrywG+FP64qpjTvTnoBda1yMAyok BCvA== X-Gm-Message-State: ALoCoQlZvUybY5obN09U/+Iw17WmKn59gGdjzYbbzhnODKFlgm8EQh8VsHwUY88rpNu0Gitm2EhP X-Received: by 10.68.6.198 with SMTP id d6mr142929pba.73.1382056052046; Thu, 17 Oct 2013 17:27:32 -0700 (PDT) Received: from localhost.localdomain (68-189-91-139.static.snlo.ca.charter.com. [68.189.91.139]) by mx.google.com with ESMTPSA id ik1sm56616294pbc.9.1969.12.31.16.00.00 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 17 Oct 2013 17:27:31 -0700 (PDT) From: Tim Harvey To: linux-pci@vger.kernel.org, Bjorn Helgaas Cc: Marek Vasut Subject: [PATCH] PCI: imx6: fix imprecise abort handler Date: Thu, 17 Oct 2013 17:27:22 -0700 Message-Id: <1382056042-7299-1-git-send-email-tharvey@gateworks.com> X-Mailer: git-send-email 1.7.9.5 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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. This is against linux-pci/host-imx6. Acked-by: Marek Vasut Tested-by: Marek Vasut Signed-off-by: Tim Harvey Acked-by: Shawn Guo --- drivers/pci/host/pci-imx6.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/drivers/pci/host/pci-imx6.c b/drivers/pci/host/pci-imx6.c index 966bac6..90fce05 100644 --- a/drivers/pci/host/pci-imx6.c +++ b/drivers/pci/host/pci-imx6.c @@ -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; }