Re: [PATCH v5 2/6] irqchip: Add the Sky1 AUDSS auxiliary interrupt controller

From: Jelly Jia

Date: Fri Dec 04 2026 - 03:49:40 EST


Hi Thomas,

On Thu, Dec 03 2026, Thomas Gleixner wrote:
> 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.

Understood. An IRQ mapping can exist without a requested handler,
so these callbacks do not cover the full lifetime of the mapping.

Also, regarding the other points in your earlier reply:

>> INFO_AP_IRQC at offset 0x54 is an enable register, not a pending register.
>> The hardware documentation defines bits 0-7 as read/write AP DMA channel
>> interrupt enables, with a reset value of zero.
>
> Misread that.
>
>> We therefore dispatch all enabled channels and let each DMA handler
>> check its actual status. IRQ_IS_POLLED avoids spurious-IRQ accounting
>> for the expected IRQ_NONE returns. I'll clarify this in the comments.
>
> Yes, please.

I'll make the enable-versus-pending distinction explicit in the comments
and explain why we dispatch all enabled channels.

>> My understanding is that this waits until the resource accesses have
>> finished before suspend or teardown continues. This relies on GICv3's
>> ACTIVE-state support.
>
> So it works by chance and not by design.
>
> I don't think so, but this needs a big fat comment....

I'll add a prominent comment explaining the dependency on the parent
GICv3 ACTIVE-state synchronization. It will also document that all CRU
accesses and child IRQ dispatches must finish before chained_irq_exit()
deactivates the parent interrupt.

The next revision will also include the tabular alignment and line-break
fixes discussed earlier.

Thanks for taking a closer look.

Best regards,
Jelly