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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 22ABCCE79AA for ; Tue, 19 Sep 2023 16:49:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231866AbjISQtc (ORCPT ); Tue, 19 Sep 2023 12:49:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48290 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230137AbjISQta (ORCPT ); Tue, 19 Sep 2023 12:49:30 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ECC4B90; Tue, 19 Sep 2023 09:49:24 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 94112C433C7; Tue, 19 Sep 2023 16:49:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1695142164; bh=ix7NOUm3+eMPDOcgR7Tg1AbDPuVYYYf9na74R7V99Do=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=gFJhk1wj9bKUuYo9oybfEXZQNnW+UttL8Ib6gxL5hhwwkJt2dErjogiymdaSIUXds HTT9Jymbar8Vv8ejvj7UTkDByIOmbHaQcpcnhbpJ9rG36xWUAcrRq1P/s4kPF3KBLj tiwsc4Q512JGN4LDT1YYC8In3/CEtHsR7I0RUiYFR6JKLG/bCiQVnnNEw3ImBvgsdy 7+RwISYBO3YuphmVI1m6sqMiYz2KoieAfI8J1KcjWyymsViWUGCvbBp+zkfrfBZsQ6 iDPbutdGmoQjw8fyffEn0DNFT02PSTBkvkI57KKCrJb80bCLjRvaFXDsC4KIjPqrlt hUpXVLb2tZrkw== Received: from [104.132.45.96] (helo=wait-a-minute.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1qiduc-00EOUg-CB; Tue, 19 Sep 2023 17:49:22 +0100 Date: Tue, 19 Sep 2023 17:49:21 +0100 Message-ID: <87a5ti3y7i.wl-maz@kernel.org> From: Marc Zyngier To: Biju Das Cc: Thomas Gleixner , Prabhakar Mahadev Lad , Claudiu Beznea , Geert Uytterhoeven , Biju Das , "linux-kernel@vger.kernel.org" , "linux-renesas-soc@vger.kernel.org" Subject: Re: [PATCH 3/3] irqchip: renesas-rzg2l: Fix irq storm with edge trigger detection for TINT In-Reply-To: References: <20230918122411.237635-1-biju.das.jz@bp.renesas.com> <20230918122411.237635-4-biju.das.jz@bp.renesas.com> <86y1h2cjpb.wl-maz@kernel.org> <87cyye3zly.wl-maz@kernel.org> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/28.2 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 104.132.45.96 X-SA-Exim-Rcpt-To: biju.das.jz@bp.renesas.com, tglx@linutronix.de, prabhakar.mahadev-lad.rj@bp.renesas.com, claudiu.beznea.uj@bp.renesas.com, geert+renesas@glider.be, biju.das.au@gmail.com, linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 19 Sep 2023 17:32:05 +0100, Biju Das wrote: [...] > > So you mean that you *already* lose interrupts across a disable followed by > > an enable? I'm slightly puzzled... > > There is no interrupt lost at all. > > Currently this patch addresses 2 issues. > > Scenario 1: Extra interrupt when we select TINT source on enable_irq() > > Getting an extra interrupt, when client drivers calls enable_irq() > during probe()/resume(). In this case, the irq handler on the Client > driver just clear the interrupt status bit. > > Issue 2: IRQ storm when we select TINT source on enable_irq() > > Here as well, we are getting an extra interrupt, when client drivers > calls enable_irq() during probe() and this Interrupts getting > generated infinitely, when the client driver calls disable_irq() in > irq handler and in in work queue calling enable_irq(). How do you know this is a spurious interrupt? For all you can tell, you are just consuming an edge. I absolutely don't buy this workaround, because you have no context that allows you to discriminate between a real spurious interrupt and a normal interrupt that lands while the interrupt line was masked. > Currently we are not loosing interrupts, but we are getting additional > Interrupt(phantom) which is causing the issue. If you get an interrupt at probe time in the endpoint driver, that's probably because the device is not in a quiescent state when the interrupt is requested. And it is probably this that needs addressing. M. -- Without deviation from the norm, progress is not possible.