Warning seen when removing a module using irqdomain framework

From: pheragu
Date: Tue Jul 23 2019 - 17:52:37 EST


I have been working on a interrupt controller driver that uses tree based mapping for its domain (irq_domain_add_tree(..)).
If I understand correctly, the clients get a mapping when they call platform_get_irq(..).
However, after these clients are removed (rmmod), when I try to remove the interrupt controller driver where it calls irq_domain_remove(..), I hit this warning from kernel/kernel/irq/irqdomain.c:: irq_domain_remove(..)
WARNING: CPU: 0 PID: 238 at /kernel/kernel/irq/irqdomain.c:246 irq_domain_remove+0x84/0x98

Also, I see that the requested IRQs by the clients are still present (in /proc/interrupts) even after they had been removed.
Hence, I just wanted to know how to handle this warning. Should the client clean up by calling irq_dispose_mapping(..) or is it the responsibility of the interrupt controller driver to dispose the mappings one by one?

Prakruthi Deepak Heragu