All of lore.kernel.org
 help / color / mirror / Atom feed
From: Xianting Tian <tian.xianting@h3c.com>
To: <kashyap.desai@broadcom.com>, <sumit.saxena@broadcom.com>,
	<shivasharan.srikanteshwara@broadcom.com>, <jejb@linux.ibm.com>,
	<martin.petersen@oracle.com>
Cc: <megaraidlinux.pdl@broadcom.com>, <linux-scsi@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>,
	Xianting Tian <tian.xianting@h3c.com>
Subject: [PATCH] scsi: megaraid_sas: use spin_lock() in hard IRQ
Date: Wed, 21 Oct 2020 14:45:02 +0800	[thread overview]
Message-ID: <20201021064502.35469-1-tian.xianting@h3c.com> (raw)

Since we already in hard IRQ context when running megasas_isr(), so use
spin_lock() is enough, which is faster than spin_lock_irqsave().

Signed-off-by: Xianting Tian <tian.xianting@h3c.com>
---
 drivers/scsi/megaraid/megaraid_sas_base.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c
index 2b7e7b5f3..bd186254d 100644
--- a/drivers/scsi/megaraid/megaraid_sas_base.c
+++ b/drivers/scsi/megaraid/megaraid_sas_base.c
@@ -3977,15 +3977,14 @@ static irqreturn_t megasas_isr(int irq, void *devp)
 {
 	struct megasas_irq_context *irq_context = devp;
 	struct megasas_instance *instance = irq_context->instance;
-	unsigned long flags;
 	irqreturn_t rc;
 
 	if (atomic_read(&instance->fw_reset_no_pci_access))
 		return IRQ_HANDLED;
 
-	spin_lock_irqsave(&instance->hba_lock, flags);
+	spin_lock(&instance->hba_lock);
 	rc = megasas_deplete_reply_queue(instance, DID_OK);
-	spin_unlock_irqrestore(&instance->hba_lock, flags);
+	spin_unlock(&instance->hba_lock);
 
 	return rc;
 }
-- 
2.17.1


             reply	other threads:[~2020-10-21  6:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-21  6:45 Xianting Tian [this message]
2020-10-22  2:25 ` [PATCH] scsi: megaraid_sas: use spin_lock() in hard IRQ Finn Thain
2020-10-22  2:59   ` Tianxianting
2020-10-22  3:29     ` Finn Thain
2020-10-22 10:09       ` Tianxianting
2020-10-23  2:44         ` Finn Thain

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=20201021064502.35469-1-tian.xianting@h3c.com \
    --to=tian.xianting@h3c.com \
    --cc=jejb@linux.ibm.com \
    --cc=kashyap.desai@broadcom.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=megaraidlinux.pdl@broadcom.com \
    --cc=shivasharan.srikanteshwara@broadcom.com \
    --cc=sumit.saxena@broadcom.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.