irq_create_of_mapping() requires an irqdomain to be registered for each interrupt controller node. While extending devicetree usage on x86 to devices with MSI irqs, [at least] an msi interrupt controller node had to be added together with the relevant irqdomain. Registering a nomap irqdomain for each msi controller and adding irqs to such domain in native_setup_msi_irqs() via irq_domain_associate() looked like the simplest and safest solution to the problem, but then of course irq_domain_disassociate() must be called by native_teardown_msi_irq(). Signed-off-by: Davide Ciminaghi <ciminaghi@xxxxxxxxx> Acked-by: Giancarlo Asnaghi <giancarlo.asnaghi@xxxxxx> --- include/linux/irqdomain.h | 3 +++ kernel/irq/irqdomain.c | 3 ++- 2 files changed, 5 insertions(+), 1 deletions(-) diff --git a/include/linux/irqdomain.h b/include/linux/irqdomain.h index c983ed1..b7f0df4 100644 --- a/include/linux/irqdomain.h +++ b/include/linux/irqdomain.h @@ -172,6 +172,9 @@ extern int irq_domain_associate(struct irq_domain *domain, unsigned int irq, extern void irq_domain_associate_many(struct irq_domain *domain, unsigned int irq_base, irq_hw_number_t hwirq_base, int count); +extern void irq_domain_disassociate(struct irq_domain *domain, + unsigned int irq); + extern unsigned int irq_create_mapping(struct irq_domain *host, irq_hw_number_t hwirq); diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c index 706724e..a33e29c 100644 --- a/kernel/irq/irqdomain.c +++ b/kernel/irq/irqdomain.c @@ -230,7 +230,7 @@ void irq_set_default_host(struct irq_domain *domain) } EXPORT_SYMBOL_GPL(irq_set_default_host); -static void irq_domain_disassociate(struct irq_domain *domain, unsigned int irq) +void irq_domain_disassociate(struct irq_domain *domain, unsigned int irq) { struct irq_data *irq_data = irq_get_irq_data(irq); irq_hw_number_t hwirq; @@ -265,6 +265,7 @@ static void irq_domain_disassociate(struct irq_domain *domain, unsigned int irq) mutex_unlock(&revmap_trees_mutex); } } +EXPORT_SYMBOL(irq_domain_disassociate); int irq_domain_associate(struct irq_domain *domain, unsigned int virq, irq_hw_number_t hwirq) -- 1.7.7.2 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html