Linux-GPIO Archive mirror
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@linaro.org>
To: Jim Liu <jim.t90615@gmail.com>
Cc: KWLIU@nuvoton.com, JJLIU0@nuvoton.com, linus.walleij@linaro.org,
	brgl@bgdev.pl, linux-gpio@vger.kernel.org,
	linux-kernel@vger.kernel.org, openbmc@lists.ozlabs.org
Subject: Re: [PATCH v2] gpio: nuvoton: Fix sgpio irq handle error
Date: Mon, 29 Apr 2024 09:30:01 +0300	[thread overview]
Message-ID: <0ef4941c-ffa3-4f34-b3bb-4b97d923294f@moroto.mountain> (raw)
In-Reply-To: <20240429060642.2920266-1-JJLIU0@nuvoton.com>

On Mon, Apr 29, 2024 at 02:06:42PM +0800, Jim Liu wrote:
> User use gpiomon to monitor input pin ,if triger the system will call trace and rcu stall.
> 
> The irq_handler uses generic_handle_domain_irq, so there is need to remove irq_find_mapping.
> 
> Fixes: c4f8457d17ce ("gpio: nuvoton: Add Nuvoton NPCM sgpio driver")
> Signed-off-by: Jim Liu <JJLIU0@nuvoton.com>
> ---
> Changes for v2:
>    - add more description

Part of the commit is missing so it will break the build.

drivers/gpio/gpio-npcm-sgpio.c: In function ‘npcm_sgpio_irq_handler’:
drivers/gpio/gpio-npcm-sgpio.c:437:28: warning: unused variable ‘girq’ [-Wunused-variable]
  437 |         unsigned int i, j, girq;
      |                            ^~~~

Thanks for improving the commit message and adding a Fixes tag.  That's
very helpful, but it still can be improved a bit.

======================================

Subject: [PATCH v3] gpio: nuvoton: Fix stall in npcm_sgpio_irq_handler()

The generic_handle_domain_irq() function calls irq_resolve_mapping()
so calling irq_find_mapping() is duplicative and will lead to a stack
trace and an RCU stall.

[ cut and paste the call trace here]

Fixes: c4f8457d17ce ("gpio: nuvoton: Add Nuvoton NPCM sgpio driver")
Signed-off-by:

======================================

Otherwise it looks good.  Please fix and resend.

regards,
dan carpenter


      reply	other threads:[~2024-04-29  6:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-29  6:06 [PATCH v2] gpio: nuvoton: Fix sgpio irq handle error Jim Liu
2024-04-29  6:30 ` Dan Carpenter [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=0ef4941c-ffa3-4f34-b3bb-4b97d923294f@moroto.mountain \
    --to=dan.carpenter@linaro.org \
    --cc=JJLIU0@nuvoton.com \
    --cc=KWLIU@nuvoton.com \
    --cc=brgl@bgdev.pl \
    --cc=jim.t90615@gmail.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=openbmc@lists.ozlabs.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).