From: Thomas Gleixner <tglx@linutronix.de>
To: Richard Clark <richard.xnu.clark@gmail.com>
Cc: linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
torvalds@linux-foundation.org
Subject: Re: [PATCH] irq: fix the interrupt trigger type override issue
Date: Tue, 03 Sep 2024 12:18:08 +0200 [thread overview]
Message-ID: <87frqh82hr.ffs@tglx> (raw)
In-Reply-To: <ZtbA5Adh2acTExYq@den-build>
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
prev parent reply other threads:[~2024-09-03 10:19 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-02 3:17 [PATCH] irq: fix the interrupt trigger type override issue Richard Clark
2024-09-02 7:34 ` Thomas Gleixner
2024-09-02 8:42 ` richard clark
2024-09-02 9:51 ` Thomas Gleixner
2024-09-02 12:50 ` richard clark
2024-09-02 14:39 ` Thomas Gleixner
2024-09-03 7:55 ` Richard Clark
2024-09-03 10:18 ` Thomas Gleixner [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87frqh82hr.ffs@tglx \
--to=tglx@linutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=richard.xnu.clark@gmail.com \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).