linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lee Jones <lee.jones@linaro.org>
To: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: greybus-dev@lists.linaro.org, linux-i2c@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-staging@lists.linux.dev,
	linux-usb@vger.kernel.org, netdev@vger.kernel.org,
	"David S. Miller" <davem@davemloft.net>,
	Alex Elder <elder@kernel.org>, Arnd Bergmann <arnd@arndb.de>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Hans de Goede <hdegoede@redhat.com>,
	Jakub Kicinski <kuba@kernel.org>, Johan Hovold <johan@kernel.org>,
	Rui Miguel Silva <rmfrfs@gmail.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	UNGLinuxDriver@microchip.com, Wolfram Sang <wsa@kernel.org>,
	Woojung Huh <woojung.huh@microchip.com>
Subject: Re: [PATCH v2 4/7] mfd: hi6421-spmi-pmic: Use generic_handle_irq_safe().
Date: Mon, 31 Jan 2022 15:54:03 +0000	[thread overview]
Message-ID: <YfgGG0v/zhQp41tr@google.com> (raw)
In-Reply-To: <20220131123404.175438-5-bigeasy@linutronix.de>

On Mon, 31 Jan 2022, Sebastian Andrzej Siewior wrote:

> generic_handle_irq() is invoked from a regular interrupt service
> routine. This handler will become a forced-threaded handler on
> PREEMPT_RT and will be invoked with enabled interrupts. The
> generic_handle_irq() must be invoked with disabled interrupts in order
> to avoid deadlocks.
> 
> Instead of manually disabling interrupts before invoking use
> generic_handle_irq_safe() which can be invoked with enabled and disabled
> interrupts.
> 
> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
> ---
>  drivers/misc/hi6421v600-irq.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)

The subject line should be "misc".

> diff --git a/drivers/misc/hi6421v600-irq.c b/drivers/misc/hi6421v600-irq.c
> index 1c763796cf1fa..caa3de37698b0 100644
> --- a/drivers/misc/hi6421v600-irq.c
> +++ b/drivers/misc/hi6421v600-irq.c
> @@ -117,8 +117,8 @@ static irqreturn_t hi6421v600_irq_handler(int irq, void *__priv)
>  			 * If both powerkey down and up IRQs are received,
>  			 * handle them at the right order
>  			 */
> -			generic_handle_irq(priv->irqs[POWERKEY_DOWN]);
> -			generic_handle_irq(priv->irqs[POWERKEY_UP]);
> +			generic_handle_irq_safe(priv->irqs[POWERKEY_DOWN]);
> +			generic_handle_irq_safe(priv->irqs[POWERKEY_UP]);
>  			pending &= ~HISI_IRQ_POWERKEY_UP_DOWN;
>  		}
>  
> @@ -126,7 +126,7 @@ static irqreturn_t hi6421v600_irq_handler(int irq, void *__priv)
>  			continue;
>  
>  		for_each_set_bit(offset, &pending, BITS_PER_BYTE) {
> -			generic_handle_irq(priv->irqs[offset + i * BITS_PER_BYTE]);
> +			generic_handle_irq_safe(priv->irqs[offset + i * BITS_PER_BYTE]);
>  		}
>  	}
>  

-- 
Lee Jones [李琼斯]
Principal Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

  reply	other threads:[~2022-01-31 15:54 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-31 12:33 [PATCH v2 0/7] Provide and use generic_handle_irq_safe() where appropriate Sebastian Andrzej Siewior
2022-01-31 12:33 ` [PATCH v2 1/7] genirq: Provide generic_handle_irq_safe() Sebastian Andrzej Siewior
2022-02-06 20:11   ` Wolfram Sang
2022-02-09  8:33     ` [PATCH v3 " Sebastian Andrzej Siewior
2022-01-31 12:33 ` [PATCH v2 2/7] i2c: core: Use generic_handle_irq_safe() in i2c_handle_smbus_host_notify() Sebastian Andrzej Siewior
2022-01-31 12:34 ` [PATCH v2 3/7] i2c: cht-wc: Use generic_handle_irq_safe() Sebastian Andrzej Siewior
2022-01-31 12:34 ` [PATCH v2 4/7] mfd: hi6421-spmi-pmic: " Sebastian Andrzej Siewior
2022-01-31 15:54   ` Lee Jones [this message]
2022-02-01 10:19     ` [PATCH v2.1 4/7] misc: " Sebastian Andrzej Siewior
2022-01-31 12:34 ` [PATCH v2 5/7] mfd: ezx-pcap: " Sebastian Andrzej Siewior
2022-01-31 12:34 ` [PATCH v2 6/7] net: usb: lan78xx: " Sebastian Andrzej Siewior
2022-01-31 12:34 ` [PATCH v2 7/7] staging: greybus: gpio: " Sebastian Andrzej Siewior
2022-01-31 12:54   ` Greg Kroah-Hartman
2022-02-01  9:45   ` Johan Hovold

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=YfgGG0v/zhQp41tr@google.com \
    --to=lee.jones@linaro.org \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=arnd@arndb.de \
    --cc=bigeasy@linutronix.de \
    --cc=davem@davemloft.net \
    --cc=elder@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=greybus-dev@lists.linaro.org \
    --cc=hdegoede@redhat.com \
    --cc=johan@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=linux-usb@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=rmfrfs@gmail.com \
    --cc=tglx@linutronix.de \
    --cc=woojung.huh@microchip.com \
    --cc=wsa@kernel.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 NNTP newsgroup(s).