[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200612130915.GA26279@pi3>
Date: Fri, 12 Jun 2020 15:09:15 +0200
From: Krzysztof Kozlowski <krzk@...nel.org>
To: Wolfram Sang <wsa@...nel.org>
Cc: Marc Kleine-Budde <mkl@...gutronix.de>,
Fabio Estevam <festevam@...il.com>,
Sascha Hauer <s.hauer@...gutronix.de>,
linux-kernel@...r.kernel.org, stable@...r.kernel.org,
Oleksij Rempel <linux@...pel-privat.de>,
Oleksij Rempel <o.rempel@...gutronix.de>,
NXP Linux Team <linux-imx@....com>,
Pengutronix Kernel Team <kernel@...gutronix.de>,
Shawn Guo <shawnguo@...nel.org>,
linux-arm-kernel@...ts.infradead.org, linux-i2c@...r.kernel.org
Subject: Re: [PATCH] i2c: imx: Fix external abort on early interrupt
On Fri, Jun 12, 2020 at 03:00:03PM +0200, Wolfram Sang wrote:
> On Fri, Jun 12, 2020 at 02:18:06PM +0200, Marc Kleine-Budde wrote:
> > On 6/12/20 1:51 PM, Wolfram Sang wrote:
> > >
> > >> This basically kills the concept of devm for interrupts. Some other
> > >
> > > It only works when you can ensure you have all interrupts disabled (and
> > > none pending) in remove() or the error paths of probe() etc.
> >
> > But when requesting the interrupt as shared the interrupt handler can get called
> > any time, even if you have disabled the IRQ source in your IP core....The shared
> > IRQ debug code tests this.
>
> Yes, so you'd need something like
>
> if (clks_are_off)
> return IRQ_NONE;
Maybe then:
if (pm_runtime_enabled())?
The device structure should be valid at this point so the call should
work.
>
> or skip devm_ for interrupts and handle it manually. (IIRC the input
> subsystem really frowns upon devm + irqs for such reasons)
>
> D'accord?
I guess dream of managing every resource automatically is an utopia :)
Best regards,
Krzysztof
Powered by blists - more mailing lists