Received: by 2002:ac0:8c9a:0:0:0:0:0 with SMTP id r26csp4654955ima; Mon, 4 Feb 2019 22:09:21 -0800 (PST) X-Google-Smtp-Source: AHgI3IZue1UTdxOL9mhK48dWqP0RXi+yB4D0RbgqlX++4yZiZunSsok5030AONaKUHa3OvhlLUdu X-Received: by 2002:a62:9305:: with SMTP id b5mr3299680pfe.10.1549346961695; Mon, 04 Feb 2019 22:09:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549346961; cv=none; d=google.com; s=arc-20160816; b=soZuYxCoCragnTLw1K34Lhqe9vhnoBVybxB9mk+zu/Tr3yCLepl+irf+efkvSUZ+bL 2ZzZnaDRc9kHUXYECKqBRdLaBLdAcvO+WR6B4m+NAW7Zh1tpNhd8oLqIiIXpMF875h+D HXyUJmadBh3arWtANMknJsKzcyPOJ4nN1jFA29QXXAgdORA8AoVtEQFeanLLXg5YtOjn CgpccnJNFNFkvnqs4wDvZCimSN4VK7dUtWBvi7r6Udi/nnprz9QrPgDGQE6yJYFFgBzT 1iiTY4lCJ4PgUNz2ur2JmV1YnYpJKrcNHb/ZB6kq8pgDtJKeVXf8+Di82U+/h5pryLBq vSkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=ELibCrneAOqwWPIu61khxaNFyTEmcNLtmVqUCXdZgZI=; b=Qx7NEIx3XlIkKE2vhi6eo8jwatfjWAOOTYfMsbbsAZYmamDJ8SQJtuOmEiB4FA7itq mN9K07KZQS7ODF8LL5xceVcVw6Hl1Sm3Soa9lpbZVX3OXAZ8DlADrCyrnlv3Veff6zSP 0jbi7WNsIIADEriO13HE7bemLq5zDw8qzu3BI8u8M2R8z8w6AfXY+Gl2zpOx/YXhjGLR yxU4mFLVYc7cAlQeOUGGREQlUPz45a8VdKJdB8RQ0OCa19M89OdlCKA+3n58t0WfJ6K2 /xBmf/93jTPLNuS5Ck/weC0zvW1QG9avLCs+T5Q20Qzq1WlmZT3q40l54ji4++YnVQu3 3ppw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mobiveil.co.in header.s=google header.b=p9GLObg0; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l185si2208663pgd.253.2019.02.04.22.09.05; Mon, 04 Feb 2019 22:09:21 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@mobiveil.co.in header.s=google header.b=p9GLObg0; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727379AbfBEGIy (ORCPT + 99 others); Tue, 5 Feb 2019 01:08:54 -0500 Received: from mail-wm1-f66.google.com ([209.85.128.66]:36651 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725934AbfBEGIx (ORCPT ); Tue, 5 Feb 2019 01:08:53 -0500 Received: by mail-wm1-f66.google.com with SMTP id p6so2304744wmc.1 for ; Mon, 04 Feb 2019 22:08:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mobiveil.co.in; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ELibCrneAOqwWPIu61khxaNFyTEmcNLtmVqUCXdZgZI=; b=p9GLObg0JIzLvnYv92UNo3hutvaKV76mneDoQ2L9/iTDSMkv3BmHlcM2r2diWaexun +bwDe1L79unhjKqIc7PdW6AxCpdjScxefjOqXn1Bp2WyEuEvsc8rTypwqcYBZfdaGNcp 1avY7a1g6ehg1Q1DcR74Aj1fpp0U0Op9aInUY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ELibCrneAOqwWPIu61khxaNFyTEmcNLtmVqUCXdZgZI=; b=gQJKEzFcXENUBDRkiRovSwQpTLSgVN7lVNuQJntGuftrIlK7vJuPMUdluALRxaUlDL Wea4oeLPinH19Lwr+PHHWQ7DX/WCHa9sa5ZMx/Y7nJiv+yysGzGeDIFj5/wPruZk1j2m 1iLNvAfOugfP24nVC+hYl8pAsKb6VTjLCQgiMXsJAS8IvbsGlcSCNJ1P4+1PwGWoZkAz EMZ4RD+XOTrYopwisIQqKFkCb1VO0tWKQPIhXDKDxgPHdrw7N+grskx/Ra4LaRQx1MDu 6stBu4boMfB7cHrdAXhoBUb4QGfkMNrQ2SllppfDu+I1RmhZDXvQUn2EPoZdks4Z2kwW nw+g== X-Gm-Message-State: AHQUAuYxGVXvA9bKopICI7dTpNzjpNMXiRw6SX6ZUgjQQhAdJhrnS+hY 5FIr6bzPnkUD4E1inQpAarz1HQwS+h1qFfkb/Kf4FC1c50SgAw== X-Received: by 2002:a1c:2e43:: with SMTP id u64mr2221588wmu.52.1549346931639; Mon, 04 Feb 2019 22:08:51 -0800 (PST) MIME-Version: 1.0 References: <20190129080926.36773-1-Zhiqiang.Hou@nxp.com> <20190129080926.36773-11-Zhiqiang.Hou@nxp.com> In-Reply-To: <20190129080926.36773-11-Zhiqiang.Hou@nxp.com> From: Subrahmanya Lingappa Date: Tue, 5 Feb 2019 11:41:25 +0530 Message-ID: Subject: Re: [PATCHv3 10/27] PCI: mobiveil: fix the INTx process error To: "Z.q. Hou" Cc: "linux-pci@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "bhelgaas@google.com" , "robh+dt@kernel.org" , "mark.rutland@arm.com" , "shawnguo@kernel.org" , Leo Li , "lorenzo.pieralisi@arm.com" , "catalin.marinas@arm.com" , "will.deacon@arm.com" , Mingkai Hu , "M.h. Lian" , Xiaowei Bao Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Reviewed-by: Subrahmanya Lingappa On Tue, Jan 29, 2019 at 1:39 PM Z.q. Hou wrote: > > From: Hou Zhiqiang > > In the loop block, there is not code change the loop key, > this patch updated the loop key by re-read the INTx status > register. > > This patch also change to clear the handled INTx status. > > Note: Need MV to test this fix. > > Fixes: 9af6bcb11e12 ("PCI: mobiveil: Add Mobiveil PCIe Host > Bridge IP driver") > Signed-off-by: Hou Zhiqiang > Reviewed-by: Minghuan Lian > --- > V3: > - No change > > drivers/pci/controller/pcie-mobiveil.c | 13 +++++++++---- > 1 file changed, 9 insertions(+), 4 deletions(-) > > diff --git a/drivers/pci/controller/pcie-mobiveil.c b/drivers/pci/controller/pcie-mobiveil.c > index 4ba458474e42..78e575e71f4d 100644 > --- a/drivers/pci/controller/pcie-mobiveil.c > +++ b/drivers/pci/controller/pcie-mobiveil.c > @@ -361,6 +361,7 @@ static void mobiveil_pcie_isr(struct irq_desc *desc) > /* Handle INTx */ > if (intr_status & PAB_INTP_INTX_MASK) { > shifted_status = csr_readl(pcie, PAB_INTP_AMBA_MISC_STAT); > + shifted_status &= PAB_INTP_INTX_MASK; > shifted_status >>= PAB_INTX_START; > do { > for_each_set_bit(bit, &shifted_status, PCI_NUM_INTX) { > @@ -372,12 +373,16 @@ static void mobiveil_pcie_isr(struct irq_desc *desc) > dev_err_ratelimited(dev, "unexpected IRQ, INT%d\n", > bit); > > - /* clear interrupt */ > - csr_writel(pcie, > - shifted_status << PAB_INTX_START, > + /* clear interrupt handled */ > + csr_writel(pcie, 1 << (PAB_INTX_START + bit), > PAB_INTP_AMBA_MISC_STAT); > } > - } while ((shifted_status >> PAB_INTX_START) != 0); > + > + shifted_status = csr_readl(pcie, > + PAB_INTP_AMBA_MISC_STAT); > + shifted_status &= PAB_INTP_INTX_MASK; > + shifted_status >>= PAB_INTX_START; > + } while (shifted_status != 0); > } > > /* read extra MSI status register */ > -- > 2.17.1 >