irqdomain: Count mappings when pushing and popping domains
Subsystems (2)
PATCH 1/1 irqdomain: Count mappings when pushing and popping domains
irq_domain_push_irq() installs a mapping in the pushed domain without incrementing its mapcount, so debugfs reports no mapped interrupts for a domain that has active mappings.
Increment mapcount after a successful push and decrement it when the domain is popped, as done by the normal hierarchy mapping paths.
Fixes 495c38d3001f ("irqdomain: Add irq_domain_{push,pop}_irq() functions")
Signed-off-by Avi Weiss <[email protected]>
--- kernel/irq/irqdomain.c | 2 ++ 1 file changed, 2 insertions(+)
kernel/irq/irqdomain.c +2 -0
@@ -1816,6 +1816,7 @@ int irq_domain_push_irq(struct irq_domain *domain, int virq, void *arg) }irq_domain_fix_revmap (parent_irq_data); + domain->mapcount++;irq_domain_set_mapping (domain, irq_data->hwirq, irq_data); error:mutex_unlock (&domain->root->mutex);
@@ -1877,6 +1878,7 @@ int irq_domain_pop_irq(struct irq_domain *domain, int virq) irq_data->parent_data =NULL ; + domain->mapcount--;irq_domain_clear_mapping (domain, irq_data->hwirq);irq_domain_free_irqs_hierarchy (domain, virq,1 );
base-commit: 36aad21d50d1af3f6954bb0c988257a908202477
Signature · 1 line
2.43.0