[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <87frqh82hr.ffs@tglx>
Date: Tue, 03 Sep 2024 12:18:08 +0200
From: Thomas Gleixner <tglx@...utronix.de>
To: Richard Clark <richard.xnu.clark@...il.com>
Cc: linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
torvalds@...ux-foundation.org
Subject: Re: [PATCH] irq: fix the interrupt trigger type override issue
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
Powered by blists - more mailing lists