Re: [PATCH v5 2/6] irqchip: Add the Sky1 AUDSS auxiliary interrupt controller
From: Thomas Gleixner
Date: Thu Dec 03 2026 - 06:22:37 EST
On Thu, Dec 03 2026 at 11:07, Thomas Gleixner wrote:
> On Wed, Dec 02 2026 at 20:37, Jelly Jia wrote:
>>>> +static int sky1_audss_irq_request_resources(struct irq_data *d)
>>>> +{
>>>> + return try_module_get(THIS_MODULE) ? 0 : -ENODEV;
>>>> +}
>>>> +
>>>> +static void sky1_audss_irq_release_resources(struct irq_data *d)
>>>> +{
>>>> + module_put(THIS_MODULE);
>>>> +}
>>>
>>> What's the point of this exercise?
>>
>> These callbacks pin the IRQ driver module while a child IRQ is
>> requested, preventing the provider from being unloaded while a DMA
>> consumer still owns an IRQ. Runtime PM references do not pin the module.
>> This follows the same pattern as irq-pruss-intc.c.
>
> Ok. I wonder if this should be made generic as that's a general life
> time problem for all modular interrupt chip drivers. Let me think about
> it.
It's worse. module_get() on interrupt request is not sufficient because
there still might be an interrupt mapped, even if not requested.
But that's not a driver level problem. This needs to be addressed in the
generic infrastructure.
Thanks,
tglx