mbox series

[v4,00/12] PCI: mvebu: subsystem ids, AER and INTx

Message ID 20220222155030.988-1-pali@kernel.org
Headers show
Series PCI: mvebu: subsystem ids, AER and INTx | expand

Message

Pali Rohár Feb. 22, 2022, 3:50 p.m. UTC
This patch series extends pci-bridge-emul.c driver to emulate PCI Subsystem
Vendor ID capability and PCIe extended capabilities. And then implement
in pci-mvebu.c driver support for PCI Subsystem Vendor IDs, PCIe AER
registers, support for legacy INTx interrupts, configuration for X1/X4
mode and usage of new PCI child_ops API.

Changes in v4:
* rebased on c3bd7dc553eea5a3595ca3aa0adee9bf83622a1f

Changes in v3:
* add Marek's Reviewed-by for first two patches
* split comments from "PCI: mvebu: Implement support for legacy INTx
  interrupts" patch into separate patch

Changes in v2:
* use static structures for INTx interrupts
* remove INTx domain after unregistering INTx handler

Pali Rohár (10):
  PCI: pci-bridge-emul: Add support for PCI Bridge Subsystem Vendor ID
    capability
  dt-bindings: PCI: mvebu: Add num-lanes property
  PCI: mvebu: Correctly configure x1/x4 mode
  PCI: mvebu: Add support for PCI Bridge Subsystem Vendor ID on emulated
    bridge
  PCI: mvebu: Add support for Advanced Error Reporting registers on
    emulated bridge
  PCI: mvebu: Use child_ops API
  dt-bindings: PCI: mvebu: Update information about intx interrupts
  PCI: mvebu: Fix macro names and comments about legacy interrupts
  PCI: mvebu: Implement support for legacy INTx interrupts
  ARM: dts: armada-385.dtsi: Add definitions for PCIe legacy INTx
    interrupts

Russell King (2):
  PCI: pci-bridge-emul: Re-arrange register tests
  PCI: pci-bridge-emul: Add support for PCIe extended capabilities

 .../devicetree/bindings/pci/mvebu-pci.txt     |  16 +
 arch/arm/boot/dts/armada-385.dtsi             |  52 ++-
 drivers/pci/controller/pci-mvebu.c            | 350 +++++++++++++++---
 drivers/pci/pci-bridge-emul.c                 | 167 ++++++---
 drivers/pci/pci-bridge-emul.h                 |  17 +
 5 files changed, 493 insertions(+), 109 deletions(-)

Comments

Lorenzo Pieralisi Feb. 22, 2022, 4:06 p.m. UTC | #1
On Tue, 22 Feb 2022 16:50:18 +0100, Pali Rohár wrote:
> This patch series extends pci-bridge-emul.c driver to emulate PCI Subsystem
> Vendor ID capability and PCIe extended capabilities. And then implement
> in pci-mvebu.c driver support for PCI Subsystem Vendor IDs, PCIe AER
> registers, support for legacy INTx interrupts, configuration for X1/X4
> mode and usage of new PCI child_ops API.
> 
> Changes in v4:
> * rebased on c3bd7dc553eea5a3595ca3aa0adee9bf83622a1f
> 
> [...]

I can't apply dts changes, patch 12 should go via the arm-soc tree.

Applied the others to pci/mvebu, thanks.

[01/12] PCI: pci-bridge-emul: Re-arrange register tests
        https://git.kernel.org/lpieralisi/pci/c/c453bf6f9b
[02/12] PCI: pci-bridge-emul: Add support for PCIe extended capabilities
        https://git.kernel.org/lpieralisi/pci/c/c0bd419732
[03/12] PCI: pci-bridge-emul: Add support for PCI Bridge Subsystem Vendor ID capability
        https://git.kernel.org/lpieralisi/pci/c/3767a90242
[04/12] dt-bindings: PCI: mvebu: Add num-lanes property
        https://git.kernel.org/lpieralisi/pci/c/26b982ca83
[05/12] PCI: mvebu: Correctly configure x1/x4 mode
        https://git.kernel.org/lpieralisi/pci/c/2a81dd9fd9
[06/12] PCI: mvebu: Add support for PCI Bridge Subsystem Vendor ID on emulated bridge
        https://git.kernel.org/lpieralisi/pci/c/e3e13c9135
[07/12] PCI: mvebu: Add support for Advanced Error Reporting registers on emulated bridge
        https://git.kernel.org/lpieralisi/pci/c/2b6ee04c0a
[08/12] PCI: mvebu: Use child_ops API
        https://git.kernel.org/lpieralisi/pci/c/c099c2a761
[09/12] dt-bindings: PCI: mvebu: Update information about intx interrupts
        https://git.kernel.org/lpieralisi/pci/c/0124989220
[10/12] PCI: mvebu: Fix macro names and comments about legacy interrupts
        https://git.kernel.org/lpieralisi/pci/c/d00ea94e62
[11/12] PCI: mvebu: Implement support for legacy INTx interrupts
        https://git.kernel.org/lpieralisi/pci/c/ec07526264

Thanks,
Lorenzo
Pali Rohár Feb. 22, 2022, 4:11 p.m. UTC | #2
On Tuesday 22 February 2022 16:06:20 Lorenzo Pieralisi wrote:
> On Tue, 22 Feb 2022 16:50:18 +0100, Pali Rohár wrote:
> > This patch series extends pci-bridge-emul.c driver to emulate PCI Subsystem
> > Vendor ID capability and PCIe extended capabilities. And then implement
> > in pci-mvebu.c driver support for PCI Subsystem Vendor IDs, PCIe AER
> > registers, support for legacy INTx interrupts, configuration for X1/X4
> > mode and usage of new PCI child_ops API.
> > 
> > Changes in v4:
> > * rebased on c3bd7dc553eea5a3595ca3aa0adee9bf83622a1f
> > 
> > [...]
> 
> I can't apply dts changes, patch 12 should go via the arm-soc tree.

Gregory already wrote about this dts change:
https://lore.kernel.org/linux-pci/87tud1jwpr.fsf@BL-laptop/
"So the easier is to let merge it through the PCI subsystem with the
other patches from this series."

Are there any issues with applying this dts change via pci tree?

> Applied the others to pci/mvebu, thanks.
> 
> [01/12] PCI: pci-bridge-emul: Re-arrange register tests
>         https://git.kernel.org/lpieralisi/pci/c/c453bf6f9b
> [02/12] PCI: pci-bridge-emul: Add support for PCIe extended capabilities
>         https://git.kernel.org/lpieralisi/pci/c/c0bd419732
> [03/12] PCI: pci-bridge-emul: Add support for PCI Bridge Subsystem Vendor ID capability
>         https://git.kernel.org/lpieralisi/pci/c/3767a90242
> [04/12] dt-bindings: PCI: mvebu: Add num-lanes property
>         https://git.kernel.org/lpieralisi/pci/c/26b982ca83
> [05/12] PCI: mvebu: Correctly configure x1/x4 mode
>         https://git.kernel.org/lpieralisi/pci/c/2a81dd9fd9
> [06/12] PCI: mvebu: Add support for PCI Bridge Subsystem Vendor ID on emulated bridge
>         https://git.kernel.org/lpieralisi/pci/c/e3e13c9135
> [07/12] PCI: mvebu: Add support for Advanced Error Reporting registers on emulated bridge
>         https://git.kernel.org/lpieralisi/pci/c/2b6ee04c0a
> [08/12] PCI: mvebu: Use child_ops API
>         https://git.kernel.org/lpieralisi/pci/c/c099c2a761
> [09/12] dt-bindings: PCI: mvebu: Update information about intx interrupts
>         https://git.kernel.org/lpieralisi/pci/c/0124989220
> [10/12] PCI: mvebu: Fix macro names and comments about legacy interrupts
>         https://git.kernel.org/lpieralisi/pci/c/d00ea94e62
> [11/12] PCI: mvebu: Implement support for legacy INTx interrupts
>         https://git.kernel.org/lpieralisi/pci/c/ec07526264
> 
> Thanks,
> Lorenzo
Lorenzo Pieralisi Feb. 22, 2022, 4:15 p.m. UTC | #3
On Tue, Feb 22, 2022 at 05:11:43PM +0100, Pali Rohár wrote:
> On Tuesday 22 February 2022 16:06:20 Lorenzo Pieralisi wrote:
> > On Tue, 22 Feb 2022 16:50:18 +0100, Pali Rohár wrote:
> > > This patch series extends pci-bridge-emul.c driver to emulate PCI Subsystem
> > > Vendor ID capability and PCIe extended capabilities. And then implement
> > > in pci-mvebu.c driver support for PCI Subsystem Vendor IDs, PCIe AER
> > > registers, support for legacy INTx interrupts, configuration for X1/X4
> > > mode and usage of new PCI child_ops API.
> > > 
> > > Changes in v4:
> > > * rebased on c3bd7dc553eea5a3595ca3aa0adee9bf83622a1f
> > > 
> > > [...]
> > 
> > I can't apply dts changes, patch 12 should go via the arm-soc tree.
> 
> Gregory already wrote about this dts change:
> https://lore.kernel.org/linux-pci/87tud1jwpr.fsf@BL-laptop/
> "So the easier is to let merge it through the PCI subsystem with the
> other patches from this series."
> 
> Are there any issues with applying this dts change via pci tree?

I don't usually take dts changes through the PCI tree since they
can conflict with arm-soc, that's the issue - dts changes should
be managed by platform maintainers.

Thanks,
Lorenzo

> > Applied the others to pci/mvebu, thanks.
> > 
> > [01/12] PCI: pci-bridge-emul: Re-arrange register tests
> >         https://git.kernel.org/lpieralisi/pci/c/c453bf6f9b
> > [02/12] PCI: pci-bridge-emul: Add support for PCIe extended capabilities
> >         https://git.kernel.org/lpieralisi/pci/c/c0bd419732
> > [03/12] PCI: pci-bridge-emul: Add support for PCI Bridge Subsystem Vendor ID capability
> >         https://git.kernel.org/lpieralisi/pci/c/3767a90242
> > [04/12] dt-bindings: PCI: mvebu: Add num-lanes property
> >         https://git.kernel.org/lpieralisi/pci/c/26b982ca83
> > [05/12] PCI: mvebu: Correctly configure x1/x4 mode
> >         https://git.kernel.org/lpieralisi/pci/c/2a81dd9fd9
> > [06/12] PCI: mvebu: Add support for PCI Bridge Subsystem Vendor ID on emulated bridge
> >         https://git.kernel.org/lpieralisi/pci/c/e3e13c9135
> > [07/12] PCI: mvebu: Add support for Advanced Error Reporting registers on emulated bridge
> >         https://git.kernel.org/lpieralisi/pci/c/2b6ee04c0a
> > [08/12] PCI: mvebu: Use child_ops API
> >         https://git.kernel.org/lpieralisi/pci/c/c099c2a761
> > [09/12] dt-bindings: PCI: mvebu: Update information about intx interrupts
> >         https://git.kernel.org/lpieralisi/pci/c/0124989220
> > [10/12] PCI: mvebu: Fix macro names and comments about legacy interrupts
> >         https://git.kernel.org/lpieralisi/pci/c/d00ea94e62
> > [11/12] PCI: mvebu: Implement support for legacy INTx interrupts
> >         https://git.kernel.org/lpieralisi/pci/c/ec07526264
> > 
> > Thanks,
> > Lorenzo
Pali Rohár Feb. 22, 2022, 4:18 p.m. UTC | #4
+ Gregory

On Tuesday 22 February 2022 16:15:39 Lorenzo Pieralisi wrote:
> On Tue, Feb 22, 2022 at 05:11:43PM +0100, Pali Rohár wrote:
> > On Tuesday 22 February 2022 16:06:20 Lorenzo Pieralisi wrote:
> > > On Tue, 22 Feb 2022 16:50:18 +0100, Pali Rohár wrote:
> > > > This patch series extends pci-bridge-emul.c driver to emulate PCI Subsystem
> > > > Vendor ID capability and PCIe extended capabilities. And then implement
> > > > in pci-mvebu.c driver support for PCI Subsystem Vendor IDs, PCIe AER
> > > > registers, support for legacy INTx interrupts, configuration for X1/X4
> > > > mode and usage of new PCI child_ops API.
> > > > 
> > > > Changes in v4:
> > > > * rebased on c3bd7dc553eea5a3595ca3aa0adee9bf83622a1f
> > > > 
> > > > [...]
> > > 
> > > I can't apply dts changes, patch 12 should go via the arm-soc tree.
> > 
> > Gregory already wrote about this dts change:
> > https://lore.kernel.org/linux-pci/87tud1jwpr.fsf@BL-laptop/
> > "So the easier is to let merge it through the PCI subsystem with the
> > other patches from this series."
> > 
> > Are there any issues with applying this dts change via pci tree?
> 
> I don't usually take dts changes through the PCI tree since they
> can conflict with arm-soc, that's the issue - dts changes should
> be managed by platform maintainers.

Gregory, could you please take patch 12/12?
https://lore.kernel.org/linux-pci/20220222155030.988-13-pali@kernel.org/
You have already Acked-by (see above previous link)

> Thanks,
> Lorenzo
> 
> > > Applied the others to pci/mvebu, thanks.
> > > 
> > > [01/12] PCI: pci-bridge-emul: Re-arrange register tests
> > >         https://git.kernel.org/lpieralisi/pci/c/c453bf6f9b
> > > [02/12] PCI: pci-bridge-emul: Add support for PCIe extended capabilities
> > >         https://git.kernel.org/lpieralisi/pci/c/c0bd419732
> > > [03/12] PCI: pci-bridge-emul: Add support for PCI Bridge Subsystem Vendor ID capability
> > >         https://git.kernel.org/lpieralisi/pci/c/3767a90242
> > > [04/12] dt-bindings: PCI: mvebu: Add num-lanes property
> > >         https://git.kernel.org/lpieralisi/pci/c/26b982ca83
> > > [05/12] PCI: mvebu: Correctly configure x1/x4 mode
> > >         https://git.kernel.org/lpieralisi/pci/c/2a81dd9fd9
> > > [06/12] PCI: mvebu: Add support for PCI Bridge Subsystem Vendor ID on emulated bridge
> > >         https://git.kernel.org/lpieralisi/pci/c/e3e13c9135
> > > [07/12] PCI: mvebu: Add support for Advanced Error Reporting registers on emulated bridge
> > >         https://git.kernel.org/lpieralisi/pci/c/2b6ee04c0a
> > > [08/12] PCI: mvebu: Use child_ops API
> > >         https://git.kernel.org/lpieralisi/pci/c/c099c2a761
> > > [09/12] dt-bindings: PCI: mvebu: Update information about intx interrupts
> > >         https://git.kernel.org/lpieralisi/pci/c/0124989220
> > > [10/12] PCI: mvebu: Fix macro names and comments about legacy interrupts
> > >         https://git.kernel.org/lpieralisi/pci/c/d00ea94e62
> > > [11/12] PCI: mvebu: Implement support for legacy INTx interrupts
> > >         https://git.kernel.org/lpieralisi/pci/c/ec07526264
> > > 
> > > Thanks,
> > > Lorenzo
Gregory CLEMENT Feb. 28, 2022, 4:11 p.m. UTC | #5
Hello,

> + Gregory
>
> On Tuesday 22 February 2022 16:15:39 Lorenzo Pieralisi wrote:
>> On Tue, Feb 22, 2022 at 05:11:43PM +0100, Pali Rohár wrote:
>> > On Tuesday 22 February 2022 16:06:20 Lorenzo Pieralisi wrote:
>> > > On Tue, 22 Feb 2022 16:50:18 +0100, Pali Rohár wrote:
>> > > > This patch series extends pci-bridge-emul.c driver to emulate PCI Subsystem
>> > > > Vendor ID capability and PCIe extended capabilities. And then implement
>> > > > in pci-mvebu.c driver support for PCI Subsystem Vendor IDs, PCIe AER
>> > > > registers, support for legacy INTx interrupts, configuration for X1/X4
>> > > > mode and usage of new PCI child_ops API.
>> > > > 
>> > > > Changes in v4:
>> > > > * rebased on c3bd7dc553eea5a3595ca3aa0adee9bf83622a1f
>> > > > 
>> > > > [...]
>> > > 
>> > > I can't apply dts changes, patch 12 should go via the arm-soc tree.
>> > 
>> > Gregory already wrote about this dts change:
>> > https://lore.kernel.org/linux-pci/87tud1jwpr.fsf@BL-laptop/
>> > "So the easier is to let merge it through the PCI subsystem with the
>> > other patches from this series."
>> > 
>> > Are there any issues with applying this dts change via pci tree?
>> 
>> I don't usually take dts changes through the PCI tree since they
>> can conflict with arm-soc, that's the issue - dts changes should
>> be managed by platform maintainers.
>
> Gregory, could you please take patch 12/12?
> https://lore.kernel.org/linux-pci/20220222155030.988-13-pali@kernel.org/
> You have already Acked-by (see above previous link)


Applied on mvebu/dt

let's hope the PCI branch will be merged before the ARM branch.

Thanks,

Gregory


>
>> Thanks,
>> Lorenzo
>> 
>> > > Applied the others to pci/mvebu, thanks.
>> > > 
>> > > [01/12] PCI: pci-bridge-emul: Re-arrange register tests
>> > >         https://git.kernel.org/lpieralisi/pci/c/c453bf6f9b
>> > > [02/12] PCI: pci-bridge-emul: Add support for PCIe extended capabilities
>> > >         https://git.kernel.org/lpieralisi/pci/c/c0bd419732
>> > > [03/12] PCI: pci-bridge-emul: Add support for PCI Bridge Subsystem Vendor ID capability
>> > >         https://git.kernel.org/lpieralisi/pci/c/3767a90242
>> > > [04/12] dt-bindings: PCI: mvebu: Add num-lanes property
>> > >         https://git.kernel.org/lpieralisi/pci/c/26b982ca83
>> > > [05/12] PCI: mvebu: Correctly configure x1/x4 mode
>> > >         https://git.kernel.org/lpieralisi/pci/c/2a81dd9fd9
>> > > [06/12] PCI: mvebu: Add support for PCI Bridge Subsystem Vendor ID on emulated bridge
>> > >         https://git.kernel.org/lpieralisi/pci/c/e3e13c9135
>> > > [07/12] PCI: mvebu: Add support for Advanced Error Reporting registers on emulated bridge
>> > >         https://git.kernel.org/lpieralisi/pci/c/2b6ee04c0a
>> > > [08/12] PCI: mvebu: Use child_ops API
>> > >         https://git.kernel.org/lpieralisi/pci/c/c099c2a761
>> > > [09/12] dt-bindings: PCI: mvebu: Update information about intx interrupts
>> > >         https://git.kernel.org/lpieralisi/pci/c/0124989220
>> > > [10/12] PCI: mvebu: Fix macro names and comments about legacy interrupts
>> > >         https://git.kernel.org/lpieralisi/pci/c/d00ea94e62
>> > > [11/12] PCI: mvebu: Implement support for legacy INTx interrupts
>> > >         https://git.kernel.org/lpieralisi/pci/c/ec07526264
>> > > 
>> > > Thanks,
>> > > Lorenzo
Rob Herring Feb. 28, 2022, 5:03 p.m. UTC | #6
On Mon, Feb 28, 2022 at 10:11 AM Gregory CLEMENT
<gregory.clement@bootlin.com> wrote:
>
> Hello,
>
> > + Gregory
> >
> > On Tuesday 22 February 2022 16:15:39 Lorenzo Pieralisi wrote:
> >> On Tue, Feb 22, 2022 at 05:11:43PM +0100, Pali Rohár wrote:
> >> > On Tuesday 22 February 2022 16:06:20 Lorenzo Pieralisi wrote:
> >> > > On Tue, 22 Feb 2022 16:50:18 +0100, Pali Rohár wrote:
> >> > > > This patch series extends pci-bridge-emul.c driver to emulate PCI Subsystem
> >> > > > Vendor ID capability and PCIe extended capabilities. And then implement
> >> > > > in pci-mvebu.c driver support for PCI Subsystem Vendor IDs, PCIe AER
> >> > > > registers, support for legacy INTx interrupts, configuration for X1/X4
> >> > > > mode and usage of new PCI child_ops API.
> >> > > >
> >> > > > Changes in v4:
> >> > > > * rebased on c3bd7dc553eea5a3595ca3aa0adee9bf83622a1f
> >> > > >
> >> > > > [...]
> >> > >
> >> > > I can't apply dts changes, patch 12 should go via the arm-soc tree.
> >> >
> >> > Gregory already wrote about this dts change:
> >> > https://lore.kernel.org/linux-pci/87tud1jwpr.fsf@BL-laptop/
> >> > "So the easier is to let merge it through the PCI subsystem with the
> >> > other patches from this series."
> >> >
> >> > Are there any issues with applying this dts change via pci tree?
> >>
> >> I don't usually take dts changes through the PCI tree since they
> >> can conflict with arm-soc, that's the issue - dts changes should
> >> be managed by platform maintainers.
> >
> > Gregory, could you please take patch 12/12?
> > https://lore.kernel.org/linux-pci/20220222155030.988-13-pali@kernel.org/
> > You have already Acked-by (see above previous link)
>
>
> Applied on mvebu/dt
>
> let's hope the PCI branch will be merged before the ARM branch.

Why does that matter? AIUI, legacy interrupts didn't work before and
you need both dt and kernel to enable. Or am I misled by the commit
messages?

Rob