From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D20FCCD13CF for ; Tue, 3 Sep 2024 10:19:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type:MIME-Version: Message-ID:Date:References:In-Reply-To:Subject:Cc:To:From:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=jNVIqcDLxz61SVBVBrBMf8gNYwUrcDD4lBZuIAOFBsw=; b=XfMyHxq9xnQxQq5y/Q55Bz7jD6 HJ62bWnGpXWWD180aYSO3NV2EamA7KxO9cAH7J3JHJeQ1UgEsNMNqB4uqeA+aCRhvHuo/7RAC2LAz s/kFoWQ+gtW6eYgSRQ+ElIehUCuyQPQJNYFBht0JYTcmylNXlaTPvqTHwaPDHG4VUGI44Q+aR1r9K JW1kPcTad+BIB291BY1+pQh6zpKyNKORwqRLsYbrHjsyX7wAKAD48dKnsvZXQ6EoJmt4Ni1yckqL+ gt1xBucfn3yJsQk5mloJ0/Uqa0a12W/2zZB0v3YxVbQjNcSFZrQ50Cw9jfcopJFhO6ntiVLmRosao kaRA9Dxw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1slQcx-0000000HJK8-0R6L; Tue, 03 Sep 2024 10:19:11 +0000 Received: from galois.linutronix.de ([2a0a:51c0:0:12e:550::1]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1slQc0-0000000HJAx-0aN2 for linux-arm-kernel@lists.infradead.org; Tue, 03 Sep 2024 10:18:15 +0000 From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1725358689; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=jNVIqcDLxz61SVBVBrBMf8gNYwUrcDD4lBZuIAOFBsw=; b=m1c1pdGKmmiKr/nLNpMHM2+cMw0nCX5sG87ZuQlHfIGpPiwWmWjim2UljimOqZ06o3xZSt hTWT5fIlZYPYksZqvK8XQuSocfSqiZY3EkPH3Rc7KhgZ0e+4oe6HaJntdXUpdj5Y5TtfHO s9ax7XmDK+U256hCDzkHhzOpfBTeNuHFuXHWgvswF8Lk/oJJTHtHQC8tprF2jjJJHYa6GG A3WPunWHX++BTFv3oftzxCyz+f/+7yiQF0/ZwWqLspm7IH5t5BojqSZu4YB2i0iY4UCS/v 4bAi3XtDQFWlPdnHJQftOYKw1VGlhZjGjbtyxuT6A1N5XlcJkgkmxov1cxs/Wg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1725358689; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=jNVIqcDLxz61SVBVBrBMf8gNYwUrcDD4lBZuIAOFBsw=; b=ViFdWnouOKy9ULcbcnaH/vJcYEV5dl8YNUnR9/1pmq4YsWPeCDf8gxrFb42g8s/XuCmeod T/c51yb5MdDdSSCg== To: Richard Clark 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 In-Reply-To: References: <87r0a27blv.ffs@tglx> <877cbu7596.ffs@tglx> <87y14a5dcq.ffs@tglx> Date: Tue, 03 Sep 2024 12:18:08 +0200 Message-ID: <87frqh82hr.ffs@tglx> MIME-Version: 1.0 Content-Type: text/plain X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240903_031812_340933_98711761 X-CRM114-Status: GOOD ( 14.68 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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