[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.21.1807191654230.1693@nanos.tec.linutronix.de>
Date: Thu, 19 Jul 2018 16:54:48 +0200 (CEST)
From: Thomas Gleixner <tglx@...utronix.de>
To: Daniel Kurtz <djkurtz@...omium.org>
cc: Shyam Sundar S K <Shyam-sundar.S-k@....com>,
Nehal Shah <Nehal-bakulchandra.Shah@....com>,
Ken Xue <Ken.Xue@....com>, Daniel Drake <drake@...lessm.com>,
Linus Walleij <linus.walleij@...aro.org>,
"open list:PIN CONTROL SUBSYSTEM" <linux-gpio@...r.kernel.org>,
open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/2] pinctrl/amd: only handle irq if it is pending and
unmasked
On Mon, 16 Jul 2018, Daniel Kurtz wrote:
> The AMD pinctrl driver demultiplexes GPIO interrupts and fires off their
> individual handlers.
>
> If one of these GPIO irqs is configured as a level interrupt, and its
> downstream handler is a threaded ONESHOT interrupt, the GPIO interrupt
> source is masked by handle_level_irq() until the eventual return of the
> threaded irq handler. During this time the level GPIO interrupt status
> will still report as high until the actual gpio source is cleared - both
> in the individual GPIO interrupt status bit (INTERRUPT_STS_OFF) and in
> its corresponding "WAKE_INT_STATUS_REG" bit.
>
> Thus, if another GPIO interrupt occurs during this time,
> amd_gpio_irq_handler() will see that the (masked-and-not-yet-cleared)
> level irq is still pending and incorrectly call its handler again.
>
> To fix this, have amd_gpio_irq_handler() check for both interrupts status
> and mask before calling generic_handle_irq().
>
> Note: Is it possible that this bug was the source of the interrupt storm
> on Ryzen when using chained interrupts before commit ba714a9c1dea85
> ("pinctrl/amd: Use regular interrupt instead of chained")?
>
> Signed-off-by: Daniel Kurtz <djkurtz@...omium.org>
Acked-by: Thomas Gleixner <tglx@...utronix.de>
Powered by blists - more mailing lists