• Marc Zyngier's avatar
    of: MSI: Simplify irqdomain lookup · 14a0db3c
    Marc Zyngier authored
    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: default avatarMarc Zyngier <marc.zyngier@arm.com>
    Acked-by: default avatarRob Herring <robh+dt@kernel.org>
    Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Cc: Frank Rowand <frowand.list@gmail.com>
    Cc: Grant Likely <grant.likely@linaro.org>
    Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
    Cc: Jiang Liu <jiang.liu@linux.intel.com>
    Link: http://lkml.kernel.org/r/1453816347-32720-3-git-send-email-marc.zyngier@arm.comSigned-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
    14a0db3c
irq.c 20.6 KB