lkml.org 
[lkml]   [2021]   [Feb]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH for-next 29/32] scsi: stex: Replace spin_lock_irqsave with spin_lock in hard IRQ
Date
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@huawei.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
\
 
 \ /
  Last update: 2021-02-07 12:46    [W:0.243 / U:1.672 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site