From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932156AbcGAOWw (ORCPT ); Fri, 1 Jul 2016 10:22:52 -0400 Received: from mail-db5eur01on0060.outbound.protection.outlook.com ([104.47.2.60]:44064 "EHLO EUR01-DB5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750702AbcGAOWc (ORCPT ); Fri, 1 Jul 2016 10:22:32 -0400 From: Po Liu To: Po Liu , Bjorn Helgaas CC: "linux-pci@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" , "devicetree@vger.kernel.org" , Bjorn Helgaas , Shawn Guo , Marc Zyngier , Rob Herring , Roy Zang , Mingkai Hu , Stuart Yoder , Yang-Leo Li , Arnd Bergmann , Minghuan Lian , Murali Karicheri Subject: RE: [PATCH v2 2/2] pci/aer: interrupt fixup in the quirk Thread-Topic: [PATCH v2 2/2] pci/aer: interrupt fixup in the quirk Thread-Index: AQHRxgU+yq59zqnryUiV9LybcFtHU5/sIR4AgADHxgCAFnQIAA== Date: Fri, 1 Jul 2016 08:46:31 +0000 Message-ID: References: <1464242406-20203-1-git-send-email-po.liu@nxp.com> <1465884747-1517-1-git-send-email-po.liu@nxp.com> <1465884747-1517-2-git-send-email-po.liu@nxp.com> <20160616135420.GA31343@localhost> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=po.liu@nxp.com; x-originating-ip: [199.59.231.64] x-ms-office365-filtering-correlation-id: e190e767-d075-4ee1-6de0-08d3a18c3372 x-microsoft-exchange-diagnostics: 1;VI1PR0401MB1712;6:De7OilGqbKBhnamgS584WgpEUEEkq0AVk/CCucGIHLDVGT2tx760r0GBB93enmMFlZ8SXNbw0mPL+beE0GxHV12rEQV+4ExQI0m/JrHHYIJjt5GC951RyGxlHOj6Kv2AvcLq3O56CrtrvxRoKTZ34aIsxbIfDQndE2snbKzFhlCd3yJaiybwrAUirKKEkk4ELS7mgDFwJsb59pT6oYtSEGwbcrbw/zAPiprgM4tK1X+nvHwnz3ai56qytrLqlaKg4iz6ldkAsx9H4y/Mt+0ia2pSSx1IG9tEA5zDS6cZBobsPQjy3vo6Gk6Bk5fef54o4SAggpPAg6+file7yP480Q==;5:J0sDZuaDFPqokvvuWnC6aCtxAeOsQKGzm8dsCvzJOIVh4mEdGLuFVC5DvC8SIA+17euaxWgTChRgDFj637M/Des1tmyRSMCPFmlpjgANYB/GseiMrv39gdTcLa5O5rbDvQ0iD3V3X5AIIOwzZnlPJg==;24:i3T+hEmLo/T0SO4/M6nZwuSbJ/BpMHuRFTNAmVDlvqdy32285zwHGVb0TILJWLJCWfLDZDmaT6nkJrIGPExgOAupU57np5Ssi27tHSCES80=;7:szhB2uKWEvYgT362svO574f+lM9NC9Is+7Uwi3j1HuYn5hNHI0bltwlutadEvUuvmNfuz4DHoY0ETOinAcFCn4q2TPOz4KfDb2wjSMqJxQ6vF1oLsiDThLdekycsOym5xPu0BfuCvqzAdu/2Xxr87Y10rXX6cBrzmgEi+LQc38FJEmjXCFZrw1Dw6VL7oKbjDpsr/Uo5X8hf3wOiPqWdmiI59fzBq2UMkzyF45s0+sfVWwwJbD9nnq4Q1HAwWbgl x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:VI1PR0401MB1712; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(9452136761055)(185117386973197)(258649278758335); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(601004)(2401047)(5005006)(8121501046)(10201501046)(3002001)(6055026);SRVR:VI1PR0401MB1712;BCL:0;PCL:0;RULEID:;SRVR:VI1PR0401MB1712; x-forefront-prvs: 0990C54589 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(979002)(6009001)(7916002)(377454003)(199003)(13464003)(24454002)(189002)(106356001)(66066001)(189998001)(92566002)(122556002)(19580395003)(19580405001)(97736004)(105586002)(5001770100001)(8936002)(3660700001)(11100500001)(93886004)(74316002)(86362001)(3280700002)(3900700001)(76576001)(33656002)(2906002)(87936001)(9686002)(4326007)(6116002)(102836003)(101416001)(54356999)(106116001)(10400500002)(586003)(5002640100001)(3846002)(2900100001)(7846002)(7736002)(7696003)(305945005)(5003600100003)(15975445007)(81166006)(81156014)(8676002)(77096005)(50986999)(68736007)(76176999)(422495003)(969003)(989001)(999001)(1009001)(1019001);DIR:OUT;SFP:1101;SCL:1;SRVR:VI1PR0401MB1712;H:VI1PR0401MB1709.eurprd04.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-originalarrivaltime: 01 Jul 2016 08:46:31.7360 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0401MB1712 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by mail.home.local id u61EN2BG002022 Hi Bjorn, So could we keep it in the pci/quirk.c ? If yes, I would only move the binding description in the documentation into this driver the next version. > -----Original Message----- > From: Po Liu > Sent: Friday, June 17, 2016 11:31 AM > To: 'Bjorn Helgaas' > Cc: linux-pci@vger.kernel.org; linux-arm-kernel@lists.infradead.org; > linux-kernel@vger.kernel.org; devicetree@vger.kernel.org; Bjorn Helgaas; > Shawn Guo; Marc Zyngier; Rob Herring; Roy Zang; Mingkai Hu; Stuart Yoder; > Yang-Leo Li; Arnd Bergmann; Minghuan Lian; Murali Karicheri > Subject: RE: [PATCH v2 2/2] pci/aer: interrupt fixup in the quirk > > > > > -----Original Message----- > > From: Bjorn Helgaas [mailto:helgaas@kernel.org] > > Sent: Thursday, June 16, 2016 9:54 PM > > To: Po Liu > > Cc: linux-pci@vger.kernel.org; linux-arm-kernel@lists.infradead.org; > > linux-kernel@vger.kernel.org; devicetree@vger.kernel.org; Bjorn > > Helgaas; Shawn Guo; Marc Zyngier; Rob Herring; Roy Zang; Mingkai Hu; > > Stuart Yoder; Yang-Leo Li; Arnd Bergmann; Minghuan Lian; Murali > > Karicheri > > Subject: Re: [PATCH v2 2/2] pci/aer: interrupt fixup in the quirk > > > > On Tue, Jun 14, 2016 at 02:12:27PM +0800, Po Liu wrote: > > > On some platforms, root port doesn't support MSI/MSI-X/INTx in RC > mode. > > > When chip support the aer interrupt with none MSI/MSI-X/INTx mode, > > > maybe there is interrupt line for aer pme etc. Search the interrupt > > > number in the fdt file. Then fixup the dev->irq with it. > > > > > > Signed-off-by: Po Liu > --- > changes for V2: > > > - Move to the quirk file > > > > > > drivers/pci/quirks.c | 23 +++++++++++++++++++++++ > 1 file > > changed, 23 insertions(+) > > diff --git a/drivers/pci/quirks.c > > b/drivers/pci/quirks.c index > ee72ebe..909d479 100644 > --- > > a/drivers/pci/quirks.c > +++ b/drivers/pci/quirks.c > > > > Is there any possibility of this part being used on different arches, > > or will it only ever be on arm64 (or whatever it is)? If the latter, > > it could go somewhere like arch/arm64/kernel/quirks.c (which doesn't > > exist yet). > > NXP Layerscape1 is base on the arm 32bit design. Also need the fixup. > > > > > > @@ -25,6 +25,7 @@ > > > #include > > > #include > > > #include > > > +#include > > > #include /* isa_dma_bridge_buggy */ > > > #include "pci.h" > > > > > > @@ -4419,3 +4420,25 @@ static void quirk_intel_qat_vf_cap(struct > > pci_dev *pdev) > > > } > > > } > > > DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x443, > > > quirk_intel_qat_vf_cap); > + > +/* If root port doesn't support > > MSI/MSI-X/INTx in RC mode, > + * but use standalone irq. Read the > > device tree for the aer > + * interrupt number. > > > + */ > > > +static void quirk_aer_interrupt(struct pci_dev *dev) { > > > + int ret; > > > + struct device_node *np = NULL; > > > + > > > + if (dev->bus->dev.of_node) > > > + np = dev->bus->dev.of_node; > > > + > > > + if (IS_ENABLED(CONFIG_OF_IRQ) && np) { > > > + ret = of_irq_get_byname(np, "aer"); > > > + if (ret > 0) { > > > + dev->no_msi = 1; > > > + dev->irq = ret; > > > + } > > > + } > > > > What does this mean for the other PCIe services, e.g., PME? I guess > > this makes the existing AER code work unchanged. But I thought PME > > had a similar situation and was connected up to a different interrupt > > than AER was. > > Yes, PME is similar, HP is not support. I think better to disable the > PME service irq in the quirk. > But seems it is no use because quirk fixup is only running in init phase > time(except suspend, resume). > > > > > > +} > > > +DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_FREESCALE, PCI_ANY_ID, > > > +quirk_aer_interrupt); > -- > 2.1.0.27.g96db324 > > -- > To > > unsubscribe from this list: send the line "unsubscribe linux-pci" > > > in the body of a message to majordomo@vger.kernel.org More > > majordomo > info at http://vger.kernel.org/majordomo-info.html