mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Corey Minyard <minyard@acm.org>
To: Tian Tao <tiantao6@hisilicon.com>
Cc: arnd@arndb.de, gregkh@linuxfoundation.org,
	openipmi-developer@lists.sourceforge.net,
	linux-kernel@vger.kernel.org
Subject: Re: [Openipmi-developer] [PATCH] ipmi_si: replace spin_lock_irqsave by spin_lock in hard IRQ
Date: Tue, 27 Oct 2020 16:03:37 -0500	[thread overview]
Message-ID: <20201027210337.GM4296@minyard.net> (raw)
In-Reply-To: <1602898810-31783-1-git-send-email-tiantao6@hisilicon.com>

On Sat, Oct 17, 2020 at 09:40:10AM +0800, Tian Tao wrote:
> It is redundant to do irqsave and irqrestore in hardIRQ context.

Are ACPI GPEs run in hardirq context?  I looked around a bit and
couldn't tell.  If not, then I can't take this patch.  Otherwise, it's
ok.

-corey

> 
> Signed-off-by: Tian Tao <tiantao6@hisilicon.com>
> ---
>  drivers/char/ipmi/ipmi_si_intf.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c
> index 45546ac..97452a8 100644
> --- a/drivers/char/ipmi/ipmi_si_intf.c
> +++ b/drivers/char/ipmi/ipmi_si_intf.c
> @@ -1116,7 +1116,6 @@ static void smi_timeout(struct timer_list *t)
>  irqreturn_t ipmi_si_irq_handler(int irq, void *data)
>  {
>  	struct smi_info *smi_info = data;
> -	unsigned long   flags;
>  
>  	if (smi_info->io.si_type == SI_BT)
>  		/* We need to clear the IRQ flag for the BT interface. */
> @@ -1124,14 +1123,14 @@ irqreturn_t ipmi_si_irq_handler(int irq, void *data)
>  				     IPMI_BT_INTMASK_CLEAR_IRQ_BIT
>  				     | IPMI_BT_INTMASK_ENABLE_IRQ_BIT);
>  
> -	spin_lock_irqsave(&(smi_info->si_lock), flags);
> +	spin_lock(&(smi_info->si_lock));
>  
>  	smi_inc_stat(smi_info, interrupts);
>  
>  	debug_timestamp("Interrupt");
>  
>  	smi_event_handler(smi_info, 0);
> -	spin_unlock_irqrestore(&(smi_info->si_lock), flags);
> +	spin_unlock(&(smi_info->si_lock));
>  	return IRQ_HANDLED;
>  }
>  
> -- 
> 2.7.4
> 
> 
> 
> _______________________________________________
> Openipmi-developer mailing list
> Openipmi-developer@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/openipmi-developer

      reply	other threads:[~2020-10-27 21:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-17  1:40 Tian Tao
2020-10-27 21:03 ` Corey Minyard [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=20201027210337.GM4296@minyard.net \
    --to=minyard@acm.org \
    --cc=arnd@arndb.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=openipmi-developer@lists.sourceforge.net \
    --cc=tiantao6@hisilicon.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome