Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1318070
| From | Thomas Petazzoni <thomas.petazzoni@free-electrons.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 2/3] of: MSI: Simplify irqdomain lookup |
| Date | 2016-01-26 16:40 +0100 |
| Message-ID | <qVdSP-644-35@gated-at.bofh.it> (permalink) |
| References | <qVck1-4Sm-1@gated-at.bofh.it> <qVck2-4Sm-7@gated-at.bofh.it> |
| Organization | Free Electrons |
Dear Marc Zyngier, On Tue, 26 Jan 2016 13:52:26 +0000, Marc Zyngier wrote: > So far, when trying to associate a device with its MSI domain, > we first lookup the domain using a MSI token, and if this > doesn't return anything useful, we pick up any domain matching > the same node. > > This logic is broken for two reasons: > 1) Only the generic MSI code (PCI or platform) sets this token > to PCI/MSI or platform MSI. So we're guaranteed that if there > is something to be found, we will find it with the first call. > 2) If we have a convoluted situation where: > - a single node implements both wired and MSI interrupts > - MSI support for that HW hasn't been compiled in > we'll end up using the wired domain for MSIs anyway, and things > break badly. > > So let's just remove __of_get_msi_domain, and replace it by a direct > call to irq_find_matching_host, because that's what we really want. > > Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> Tested-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> (same testing as for PATCH 1/3) Thanks a lot! Thomas -- Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/3] irqdomain fixes for 4.5-rc1 Marc Zyngier <marc.zyngier@arm.com> - 2016-01-26 15:00 +0100
[PATCH 2/3] of: MSI: Simplify irqdomain lookup Marc Zyngier <marc.zyngier@arm.com> - 2016-01-26 15:00 +0100
Re: [PATCH 2/3] of: MSI: Simplify irqdomain lookup Rob Herring <robh+dt@kernel.org> - 2016-01-26 15:50 +0100
[tip:irq/urgent] of: MSI: Simplify irqdomain lookup tip-bot for Marc Zyngier <tipbot@zytor.com> - 2016-01-26 16:10 +0100
Re: [PATCH 2/3] of: MSI: Simplify irqdomain lookup Thomas Petazzoni <thomas.petazzoni@free-electrons.com> - 2016-01-26 16:40 +0100
[PATCH 1/3] irqdomain: Allow domain lookup with DOMAIN_BUS_WIRED token Marc Zyngier <marc.zyngier@arm.com> - 2016-01-26 15:00 +0100
[tip:irq/urgent] irqdomain: Allow domain lookup with DOMAIN_BUS_WIRED token tip-bot for Marc Zyngier <tipbot@zytor.com> - 2016-01-26 16:10 +0100
Re: [PATCH 1/3] irqdomain: Allow domain lookup with DOMAIN_BUS_WIRED token Thomas Petazzoni <thomas.petazzoni@free-electrons.com> - 2016-01-26 16:40 +0100
[PATCH 3/3] base: Export platform_msi_domain_{alloc,free}_irqs Marc Zyngier <marc.zyngier@arm.com> - 2016-01-26 15:00 +0100
[tip:irq/urgent] base: Export platform_msi_domain_%7Balloc, free%7D_irqs tip-bot for Thomas Petazzoni <tipbot@zytor.com> - 2016-01-26 16:10 +0100
[tip:irq/urgent] base: Export platform_msi_domain_[alloc,free] _irqs tip-bot for Thomas Petazzoni <tipbot@zytor.com> - 2016-01-26 16:40 +0100
csiph-web