All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexandre Belloni <alexandre.belloni@bootlin.com>
To: Sergey Matsievskiy <matsievskiysv@gmail.com>
Cc: linus.walleij@linaro.org, quentin.schulz@bootlin.com,
	lars.povlsen@microchip.com, horatiu.vultur@microchip.com,
	andriy.shevchenko@linux.intel.com, linux-gpio@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org,
	UNGLinuxDriver@microchip.com
Subject: Re: [PATCH 1/1] pinctrl: ocelot: fix system hang on level based interrupts
Date: Fri, 11 Oct 2024 22:54:31 +0200	[thread overview]
Message-ID: <20241011205431de827807@mail.local> (raw)
In-Reply-To: <20241006181310.181309-2-matsievskiysv@gmail.com>

On 06/10/2024 21:13:10+0300, Sergey Matsievskiy wrote:
> Fix interrupt handle loops, produced by spurious and short level based
> interrupts by unconditionally clearing the parent interrupt, even when
> no GPIO interrupts are pending.
> 
> Signed-off-by: Sergey Matsievskiy <matsievskiysv@gmail.com>

Reviewed-by: Alexandre Belloni <alexandre.belloni@bootlin.com>

> ---
>  drivers/pinctrl/pinctrl-ocelot.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/pinctrl/pinctrl-ocelot.c b/drivers/pinctrl/pinctrl-ocelot.c
> index be9b8c010167..d1ab8450ea93 100644
> --- a/drivers/pinctrl/pinctrl-ocelot.c
> +++ b/drivers/pinctrl/pinctrl-ocelot.c
> @@ -1955,21 +1955,21 @@ static void ocelot_irq_handler(struct irq_desc *desc)
>  	unsigned int reg = 0, irq, i;
>  	unsigned long irqs;
>  
> +	chained_irq_enter(parent_chip, desc);
> +
>  	for (i = 0; i < info->stride; i++) {
>  		regmap_read(info->map, id_reg + 4 * i, &reg);
>  		if (!reg)
>  			continue;
>  
> -		chained_irq_enter(parent_chip, desc);
> -
>  		irqs = reg;
>  
>  		for_each_set_bit(irq, &irqs,
>  				 min(32U, info->desc->npins - 32 * i))
>  			generic_handle_domain_irq(chip->irq.domain, irq + 32 * i);
> -
> -		chained_irq_exit(parent_chip, desc);
>  	}
> +
> +	chained_irq_exit(parent_chip, desc);
>  }
>  
>  static int ocelot_gpiochip_register(struct platform_device *pdev,
> -- 
> 2.39.5
> 

-- 
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

      parent reply	other threads:[~2024-10-11 20:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-06 18:13 [PATCH 0/1] pinctrl: ocelot: fix system hang on level based interrupts Sergey Matsievskiy
2024-10-06 18:13 ` [PATCH 1/1] " Sergey Matsievskiy
2024-10-11  9:18   ` Linus Walleij
2024-10-11 15:40     ` Sergey Matsievskiy
2024-10-11 20:02       ` Linus Walleij
2024-10-11 20:54   ` Alexandre Belloni [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=20241011205431de827807@mail.local \
    --to=alexandre.belloni@bootlin.com \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=horatiu.vultur@microchip.com \
    --cc=lars.povlsen@microchip.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=matsievskiysv@gmail.com \
    --cc=quentin.schulz@bootlin.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.