• Paul Burton's avatar
    irqchip/mips-gic: Cleanup chip and handler setup · 6a33fa2b
    Paul Burton authored
    gic_shared_irq_domain_map() is called from gic_irq_domain_alloc() where
    the wrong chip has been set, and is then overwritten. Tidy this up by
    setting the correct chip the first time, and setting the
    handle_level_irq handler from gic_irq_domain_alloc() too.
    
    gic_shared_irq_domain_map() is also called from gic_irq_domain_map(),
    which now calls irq_set_chip_and_handler() to retain its previous
    behaviour.
    
    This patch prepares for a follow-on which will call
    gic_shared_irq_domain_map() from a callback where the lock on the struct
    irq_desc is held, which without this change would cause the call to
    irq_set_chip_and_handler() to lead to a deadlock.
    
    Fixes: c98c1822 ("irqchip/mips-gic: Add device hierarchy domain")
    Signed-off-by: default avatarPaul Burton <paul.burton@imgtec.com>
    Cc: linux-mips@linux-mips.org
    Cc: Jason Cooper <jason@lakedaemon.net>
    Cc: Marc Zyngier <marc.zyngier@arm.com>
    Cc: stable@vger.kernel.org
    Link: http://lkml.kernel.org/r/20160819170715.27820-1-paul.burton@imgtec.comSigned-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
    6a33fa2b
irq-mips-gic.c 27.9 KB