[PATCH] irq: fix the interrupt trigger type override issue
Thomas Gleixner
tglx at linutronix.de
Tue Sep 3 03:18:08 PDT 2024
Richard!
On Tue, Sep 03 2024 at 15:55, Richard Clark wrote:
> On Mon, Sep 02, 2024 at 04:39:33PM +0200, Thomas Gleixner wrote:
>> So the mapping and the interrupt allocation persist even if nothing uses
>> them. What a waste.
>>
> I checked the code and found that it's not the kernel to create the mapping,
> it's by the driver calling platform_get_irq(...)/of_irq_get(...) to
> create.
:)
> Ah, the mapping is created from of_irq_get(...) by driver, the kernel also
> provides the mapping teardown interface - irq_dispose_mapping.
> IMO, the right way for the driver is:
> 1) driver calls of_irq_get() to get the irq and create the mapping
> 2) driver *should* call irq_dispose_mapping() as the teardown of step 1.
> 3) free_irq is the teardown of the request_irq to free the irq and
> its action.
Correct.
Thanks,
tglx
More information about the linux-arm-kernel
mailing list