lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <AS8PR04MB89468674CFDEF98C6B45039F8F689@AS8PR04MB8946.eurprd04.prod.outlook.com>
Date:   Wed, 1 Dec 2021 23:34:50 +0000
From:   Leo Li <leoyang.li@....com>
To:     Rob Herring <robh@...nel.org>
CC:     Bjorn Helgaas <bhelgaas@...gle.com>,
        "linux-pci@...r.kernel.org" <linux-pci@...r.kernel.org>,
        "devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "Z.Q. Hou" <zhiqiang.hou@....com>
Subject: RE: [PATCH 4/4] dt-bindings: pci: layerscape-pci: define aer/pme
 interrupts



> -----Original Message-----
> From: Rob Herring <robh@...nel.org>
> Sent: Tuesday, November 30, 2021 7:47 AM
> To: Leo Li <leoyang.li@....com>
> Cc: Bjorn Helgaas <bhelgaas@...gle.com>; linux-pci@...r.kernel.org;
> devicetree@...r.kernel.org; linux-kernel@...r.kernel.org; Z.Q. Hou
> <zhiqiang.hou@....com>
> Subject: Re: [PATCH 4/4] dt-bindings: pci: layerscape-pci: define aer/pme
> interrupts
> 
> On Mon, Nov 29, 2021 at 9:35 PM Leo Li <leoyang.li@....com> wrote:
> >
> >
> >
> > > -----Original Message-----
> > > From: Rob Herring <robh@...nel.org>
> > > Sent: Monday, November 29, 2021 8:02 PM
> > > To: Leo Li <leoyang.li@....com>
> > > Cc: Bjorn Helgaas <bhelgaas@...gle.com>; linux-pci@...r.kernel.org;
> > > devicetree@...r.kernel.org; linux-kernel@...r.kernel.org; Z.Q. Hou
> > > <zhiqiang.hou@....com>
> > > Subject: Re: [PATCH 4/4] dt-bindings: pci: layerscape-pci: define
> > > aer/pme interrupts
> > >
> > > On Fri, Nov 19, 2021 at 06:16:21PM -0600, Li Yang wrote:
> > > > Some platforms using this controller have separated interrupt
> > > > lines for aer or pme events instead of having a single interrupt
> > > > line for miscellaneous events.  Define interrupts in the binding
> > > > for these interrupt lines.
> > > >
> > > > Signed-off-by: Li Yang <leoyang.li@....com>
> > > > ---
> > > >  .../devicetree/bindings/pci/layerscape-pci.txt     | 14 ++++++++++----
> > > >  1 file changed, 10 insertions(+), 4 deletions(-)
> > > >
> > > > diff --git
> > > > a/Documentation/devicetree/bindings/pci/layerscape-pci.txt
> > > > b/Documentation/devicetree/bindings/pci/layerscape-pci.txt
> > > > index 8fd6039a826b..bcf11bfc4bab 100644
> > > > --- a/Documentation/devicetree/bindings/pci/layerscape-pci.txt
> > > > +++ b/Documentation/devicetree/bindings/pci/layerscape-pci.txt
> > > > @@ -31,8 +31,13 @@ Required properties:
> > > >  - reg: base addresses and lengths of the PCIe controller register blocks.
> > > >  - interrupts: A list of interrupt outputs of the controller. Must contain
> an
> > > >    entry for each entry in the interrupt-names property.
> > > > -- interrupt-names: Must include the following entries:
> > > > -  "intr": The interrupt that is asserted for controller
> > > > interrupts
> > > > +- interrupt-names: It could include the following entries:
> > > > +  "aer": For interrupt line reporting aer events when non
> > > > +MSI/MSI-X/INTx
> > > mode
> > > > +           is used
> > > > +  "pme": For interrupt line reporting pme events when non
> > > > + MSI/MSI-
> > > X/INTx mode
> > > > +           is used
> > > > +  "intr": For interrupt line reporting miscellaneous controller
> > > > +events
> > > > +  ......
> > > >  - fsl,pcie-scfg: Must include two entries.
> > > >    The first entry must be a link to the SCFG device node
> > > >    The second entry is the physical PCIe controller index starting from '0'.
> > > > @@ -52,8 +57,9 @@ Example:
> > > >             reg = <0x00 0x03400000 0x0 0x00010000   /* controller
> > > registers */
> > > >                    0x40 0x00000000 0x0 0x00002000>; /*
> > > > configuration space
> > > */
> > > >             reg-names = "regs", "config";
> > > > -           interrupts = <GIC_SPI 177 IRQ_TYPE_LEVEL_HIGH>; /*
> > > controller interrupt */
> > > > -           interrupt-names = "intr";
> > > > +           interrupts = <GIC_SPI 176 IRQ_TYPE_LEVEL_HIGH>, /* aer
> > > interrupt */
> > > > +                   <GIC_SPI 177 IRQ_TYPE_LEVEL_HIGH>; /* pme
> > > interrupt */
> > > > +           interrupt-names = "aer", "pme";
> > >
> > > This isn't a compatible change. The h/w suddenly has no 'intr'
> > > interrupt?
> >
> > The original 'intr' was just a place holder for a HW interrupt signal without a
> clear definition of events associated.  Some later SoC has more interrupt
> signals to associate with more specific events.
> 
> 'Later SoC' means new compatible, but you're not changing the compatible. If
> it was just wrong for all SoCs, then state that in the commit message. Please
> define all the interrupts on all SoCs, so it is not changing again.

Different SoCs could have different number of interrupt lines and the events routing could also be different among SoCs.  It is really hard to name the interrupt lines properly that works for all SoCs.  That is probably why we chose to name key events instead of interrupt lines.

The HW documentation is also not very clear on this part.  But I will try to summarize the situation better in next version, for example:

"aer": Used for interrupt line which reports AER events when non MSI/MSI-X/INTx mode is used
"pme": Used for interrupt line which reports PME events when non MSI/MSI-X/INTx mode is used
"intr": Used for SoC(like ls2080a, lx2160, ls2080, ls2088, ls1088) which has a single interrupt line for miscellaneous controller events(which could include AER and PME events).

> 
> > If needed, we can keep the "intr" interrupt-name there just for backward
> compatibility although it was never used in Linux.
> 
> What about other OSs?
> 
> Rob

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ