[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201021064502.35469-1-tian.xianting@h3c.com>
Date: Wed, 21 Oct 2020 14:45:02 +0800
From: Xianting Tian <tian.xianting@....com>
To: <kashyap.desai@...adcom.com>, <sumit.saxena@...adcom.com>,
<shivasharan.srikanteshwara@...adcom.com>, <jejb@...ux.ibm.com>,
<martin.petersen@...cle.com>
CC: <megaraidlinux.pdl@...adcom.com>, <linux-scsi@...r.kernel.org>,
<linux-kernel@...r.kernel.org>,
Xianting Tian <tian.xianting@....com>
Subject: [PATCH] scsi: megaraid_sas: use spin_lock() in hard IRQ
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@....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
Powered by blists - more mailing lists