mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] irqdomain: Count mappings when pushing and popping domains
@ 2026-10-31 20:15 Avi Weiss
  0 siblings, 0 replies; only message in thread
From: Avi Weiss @ 2026-10-31 20:15 UTC (permalink / raw)
  To: tglx; +Cc: radu, maz, linux-kernel, Avi Weiss

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 <thnkslprpt@gmail.com>
---
 kernel/irq/irqdomain.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c
index 4fdcb6df5306..fd71ce24fca4 100644
--- a/kernel/irq/irqdomain.c
+++ b/kernel/irq/irqdomain.c
@@ -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
-- 
2.43.0


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-10-31 20:15 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-31 20:15 [PATCH] irqdomain: Count mappings when pushing and popping domains Avi Weiss

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®