[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1612697823-8073-30-git-send-email-tanxiaofei@huawei.com>
Date: Sun, 7 Feb 2021 19:37:00 +0800
From: Xiaofei Tan <tanxiaofei@...wei.com>
To: <jejb@...ux.ibm.com>, <martin.petersen@...cle.com>
CC: <linux-scsi@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<linuxarm@...neuler.org>, Xiaofei Tan <tanxiaofei@...wei.com>
Subject: [PATCH for-next 29/32] scsi: stex: Replace spin_lock_irqsave with spin_lock in hard IRQ
It is redundant to do irqsave and irqrestore in hardIRQ context, where
it has been in a irq-disabled context.
Signed-off-by: Xiaofei Tan <tanxiaofei@...wei.com>
---
drivers/scsi/stex.c | 16 +++++++---------
1 file changed, 7 insertions(+), 9 deletions(-)
diff --git a/drivers/scsi/stex.c b/drivers/scsi/stex.c
index 1247120..1e797d1 100644
--- a/drivers/scsi/stex.c
+++ b/drivers/scsi/stex.c
@@ -886,9 +886,8 @@ static irqreturn_t stex_intr(int irq, void *__hba)
struct st_hba *hba = __hba;
void __iomem *base = hba->mmio_base;
u32 data;
- unsigned long flags;
- spin_lock_irqsave(hba->host->host_lock, flags);
+ spin_lock(hba->host->host_lock);
data = readl(base + ODBL);
@@ -897,14 +896,14 @@ static irqreturn_t stex_intr(int irq, void *__hba)
writel(data, base + ODBL);
readl(base + ODBL); /* flush */
stex_mu_intr(hba, data);
- spin_unlock_irqrestore(hba->host->host_lock, flags);
+ spin_unlock(hba->host->host_lock);
if (unlikely(data & MU_OUTBOUND_DOORBELL_REQUEST_RESET &&
hba->cardtype == st_shasta))
queue_work(hba->work_q, &hba->reset_work);
return IRQ_HANDLED;
}
- spin_unlock_irqrestore(hba->host->host_lock, flags);
+ spin_unlock(hba->host->host_lock);
return IRQ_NONE;
}
@@ -987,9 +986,8 @@ static irqreturn_t stex_ss_intr(int irq, void *__hba)
struct st_hba *hba = __hba;
void __iomem *base = hba->mmio_base;
u32 data;
- unsigned long flags;
- spin_lock_irqsave(hba->host->host_lock, flags);
+ spin_lock(hba->host->host_lock);
if (hba->cardtype == st_yel) {
data = readl(base + YI2H_INT);
@@ -997,7 +995,7 @@ static irqreturn_t stex_ss_intr(int irq, void *__hba)
/* clear the interrupt */
writel(data, base + YI2H_INT_C);
stex_ss_mu_intr(hba);
- spin_unlock_irqrestore(hba->host->host_lock, flags);
+ spin_unlock(hba->host->host_lock);
if (unlikely(data & SS_I2H_REQUEST_RESET))
queue_work(hba->work_q, &hba->reset_work);
return IRQ_HANDLED;
@@ -1011,14 +1009,14 @@ static irqreturn_t stex_ss_intr(int irq, void *__hba)
writel((1 << 22), base + YH2I_INT);
}
stex_ss_mu_intr(hba);
- spin_unlock_irqrestore(hba->host->host_lock, flags);
+ spin_unlock(hba->host->host_lock);
if (unlikely(data & SS_I2H_REQUEST_RESET))
queue_work(hba->work_q, &hba->reset_work);
return IRQ_HANDLED;
}
}
- spin_unlock_irqrestore(hba->host->host_lock, flags);
+ spin_unlock(hba->host->host_lock);
return IRQ_NONE;
}
--
2.8.1
Powered by blists - more mailing lists