From patchwork Mon Mar 5 18:22:53 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gustavo Pimentel X-Patchwork-Id: 10259463 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 29AF660134 for ; Mon, 5 Mar 2018 18:23:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 182F8289F9 for ; Mon, 5 Mar 2018 18:23:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0C67A28BB6; Mon, 5 Mar 2018 18:23:24 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5E768289F9 for ; Mon, 5 Mar 2018 18:23:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751462AbeCESXW (ORCPT ); Mon, 5 Mar 2018 13:23:22 -0500 Received: from us01smtprelay-2.synopsys.com ([198.182.47.9]:37389 "EHLO smtprelay.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751311AbeCESXV (ORCPT ); Mon, 5 Mar 2018 13:23:21 -0500 Received: from mailhost.synopsys.com (mailhost2.synopsys.com [10.13.184.66]) by smtprelay.synopsys.com (Postfix) with ESMTP id 99EC824E06EA; Mon, 5 Mar 2018 10:23:19 -0800 (PST) Received: from mailhost.synopsys.com (localhost [127.0.0.1]) by mailhost.synopsys.com (Postfix) with ESMTP id 758063FC0; Mon, 5 Mar 2018 10:23:19 -0800 (PST) Received: from pt02.synopsys.com (pt02.internal.synopsys.com [10.107.23.240]) by mailhost.synopsys.com (Postfix) with ESMTP id 110AA3F9A; Mon, 5 Mar 2018 10:23:17 -0800 (PST) Received: from [127.0.0.1] (gustavo-e7480.internal.synopsys.com [10.107.25.102]) by pt02.synopsys.com (Postfix) with ESMTP id 3CD8E88A1; Mon, 5 Mar 2018 18:23:17 +0000 (WET) Subject: Re: [PATCH v9 0/3] PCI: dwc: Enables MSI-X driver support To: Lorenzo Pieralisi Cc: "marc.zyngier@arm.com" , "Joao.Pinto@synopsys.com" , "bhelgaas@google.com" , "jingoohan1@gmail.com" , "kishon@ti.com" , "linux-pci@vger.kernel.org" , "m-karicheri2@ti.com" , "thomas.petazzoni@free-electrons.com" , "minghuan.Lian@freescale.com" , "mingkai.hu@freescale.com" , "tie-fei.zang@freescale.com" , "hongxing.zhu@nxp.com" , "l.stach@pengutronix.de" , "niklas.cassel@axis.com" , "jesper.nilsson@axis.com" , "wangzhou1@hisilicon.com" , "svarbanov@mm-sol.com" , "nsekhar@ti.com" , Shawn Guo , Vignesh R , Pratyush Anand References: <20180302180320.GA5404@red-moon> From: Gustavo Pimentel Message-ID: <23de1d16-ee47-9e53-c1c4-4437f37cc358@synopsys.com> Date: Mon, 5 Mar 2018 18:22:53 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180302180320.GA5404@red-moon> Content-Language: en-US Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Hi Lorenzo, On 02/03/2018 18:03, Lorenzo Pieralisi wrote: > [+cc Shawn, Vignesh, Pratyush] > On Wed, Feb 28, 2018 at 04:10:22PM +0000, Gustavo Pimentel wrote: >> Changes into a new IRQ handler mechanism (multiplexed IRQ domain hierarchy) >> more suitable and appropriate to use on pcie-designware and on each SoC >> specific driver in order to allow new and more complex features like MSI-X. >> >> Adds Synopsys Root Complex driver support for MSI-X feature. >> >> Expands the maximum number of IRQs from 32 to 256 distributed by >> a maximum of 8 controller registers. >> >> The patch set was made against the Bjorn's master branch (v4.16-rc1). >> >> Gustavo Pimentel (3): >> PCI: dwc: Add new IRQ API >> PCI: dwc: Remove old IRQ API >> PCI: dwc: Expand maximum number of IRQs from 32 to 256 >> >> drivers/pci/dwc/pci-exynos.c | 18 -- >> drivers/pci/dwc/pci-imx6.c | 18 -- >> drivers/pci/dwc/pci-keystone-dw.c | 91 +------- >> drivers/pci/dwc/pci-keystone.c | 1 + >> drivers/pci/dwc/pci-keystone.h | 4 +- >> drivers/pci/dwc/pci-layerscape.c | 3 +- >> drivers/pci/dwc/pcie-artpec6.c | 18 -- >> drivers/pci/dwc/pcie-designware-host.c | 398 +++++++++++++++++++-------------- > > Hi Gustavo, > > I was reviewing a patch and this raised a question: > > - why pcie-histb.c is not in the list of converted drivers above, > given that it uses dw_handle_msi_irq() the same way as others > you converted ? > > Is it correct to leave pcie-histb.c as-is ? I do not think it is. At the time the first series of this patch came out there wasn't such driver and I just start working on this topic on December... Nevertheless, you are right it should follow the same procedure that others. Tested-by: Shawn Guo diff --git a/drivers/pci/dwc/pcie-histb.c b/drivers/pci/dwc/pcie-histb.c index 70b5c0b..5d47b90 100644 --- a/drivers/pci/dwc/pcie-histb.c +++ b/drivers/pci/dwc/pcie-histb.c @@ -207,13 +207,6 @@ static struct dw_pcie_host_ops histb_pcie_host_ops = { .host_init = histb_pcie_host_init, }; -static irqreturn_t histb_pcie_msi_irq_handler(int irq, void *arg) -{ - struct pcie_port *pp = arg; - - return dw_handle_msi_irq(pp); -} - static void histb_pcie_host_disable(struct histb_pcie *hipcie) { reset_control_assert(hipcie->soft_reset); @@ -393,14 +386,6 @@ static int histb_pcie_probe(struct platform_device *pdev) dev_err(dev, "Failed to get MSI IRQ\n"); return pp->msi_irq; } - - ret = devm_request_irq(dev, pp->msi_irq, - histb_pcie_msi_irq_handler, - IRQF_SHARED, "histb-pcie-msi", pp); - if (ret) { - dev_err(dev, "cannot request MSI IRQ\n"); - return ret; - } } hipcie->phy = devm_phy_get(dev, "phy");