Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1482609
| From | Thomas Petazzoni <thomas.petazzoni@free-electrons.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 3/3] PCI: Xilinx NWL PCIe: Fix Error for multi function device for legacy interrupts. |
| Date | 2016-09-13 18:00 +0200 |
| Message-ID | <sgYhP-3RY-13@gated-at.bofh.it> (permalink) |
| References | (6 earlier) <sgHAl-172-15@gated-at.bofh.it> <sgHAl-172-13@gated-at.bofh.it> <sgQDD-7fb-5@gated-at.bofh.it> <sgXvs-3zH-17@gated-at.bofh.it> <sgXYt-3KE-9@gated-at.bofh.it> |
| Organization | Free Electrons |
Hello,
On Tue, 13 Sep 2016 10:34:02 -0500, Bjorn Helgaas wrote:
> > After looking at this myself, I'm not happy with this either. It feels
> > like there are bugs lurking here and we're just hiding one of them.
> >
> > Here are the callers of irq_domain_add_linear() for legacy INTx in
> > drivers/pci/host:
> >
> > advk_pcie_init_irq_domain LEGACY_IRQ_NUM (4)
> > dra7xx_pcie_init_irq_domain 4
> > ks_dw_pcie_host_init MAX_LEGACY_IRQS (4)
> > altera_pcie_init_irq_domain INTX_NUM + 1 (5)
> > nwl_pcie_init_irq_domain INTX_NUM + 1 (5)
> > xilinx_pcie_init_irq_domain 4
>
> The altera change corresponding to this was 99496bd2971f ("PCI: altera: Fix
> error when INTx is 4"). I should have noticed this inconsistency back
> then.
>
> Are aardvark, dra7xx, keystone, and xilinx (non-NWL) broken because they
> only request 4 IRQs and only INTA, INTB, and INTC work?
>
> > I think all of these use the of_irq_parse_and_map_pci() path you
> > mentioned, so if the problem is in the way that path works, I would
> > think these should *all* be requesting the same number of interrupts
> > in the domain.
> >
> > I agree with Marc that we should request 4 IRQs, because that's what
> > we need. If we can't do that for some reason, we ought to at least
> > make all these callers the same.
Thanks for Cc'ing about this issue. Indeed, the Aardvark driver
supports all of INT{A,B,C,D}, so the current situation doesn't work. As
suggested, the simplest solution is to just allocate an irq domain with
5 IRQs, like is done in the Altera driver.
However, my feeling is that a more correct solution would be to have a
translation between the PCI_INTERRUPT_PIN value (in the range 0x1 to
0x4) to the hwirq value (in the range 0x0 to 0x3).
Best regards,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [PATCH 3/3] PCI: Xilinx NWL PCIe: Fix Error for multi function device for legacy interrupts. Bjorn Helgaas <helgaas@kernel.org> - 2016-09-13 00:10 +0200
Re: [PATCH 3/3] PCI: Xilinx NWL PCIe: Fix Error for multi function device for legacy interrupts. Marc Zyngier <marc.zyngier@arm.com> - 2016-09-13 09:50 +0200
Re: [PATCH 3/3] PCI: Xilinx NWL PCIe: Fix Error for multi function device for legacy interrupts. Bjorn Helgaas <helgaas@kernel.org> - 2016-09-13 17:10 +0200
Re: [PATCH 3/3] PCI: Xilinx NWL PCIe: Fix Error for multi function device for legacy interrupts. Bjorn Helgaas <helgaas@kernel.org> - 2016-09-13 17:40 +0200
Re: [PATCH 3/3] PCI: Xilinx NWL PCIe: Fix Error for multi function device for legacy interrupts. Thomas Petazzoni <thomas.petazzoni@free-electrons.com> - 2016-09-13 18:00 +0200
Re: [PATCH 3/3] PCI: Xilinx NWL PCIe: Fix Error for multi function device for legacy interrupts. Kishon Vijay Abraham I <kishon@ti.com> - 2016-09-14 12:00 +0200
csiph-web