[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1612697823-8073-21-git-send-email-tanxiaofei@huawei.com>
Date: Sun, 7 Feb 2021 19:36:51 +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 20/32] scsi: myrb: 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/myrb.c | 20 ++++++++------------
1 file changed, 8 insertions(+), 12 deletions(-)
diff --git a/drivers/scsi/myrb.c b/drivers/scsi/myrb.c
index 3d8e91c..ecb57ee 100644
--- a/drivers/scsi/myrb.c
+++ b/drivers/scsi/myrb.c
@@ -2769,9 +2769,8 @@ static irqreturn_t DAC960_LA_intr_handler(int irq, void *arg)
struct myrb_hba *cb = arg;
void __iomem *base = cb->io_base;
struct myrb_stat_mbox *next_stat_mbox;
- unsigned long flags;
- spin_lock_irqsave(&cb->queue_lock, flags);
+ spin_lock(&cb->queue_lock);
DAC960_LA_ack_intr(base);
next_stat_mbox = cb->next_stat_mbox;
while (next_stat_mbox->valid) {
@@ -2806,7 +2805,7 @@ static irqreturn_t DAC960_LA_intr_handler(int irq, void *arg)
}
}
cb->next_stat_mbox = next_stat_mbox;
- spin_unlock_irqrestore(&cb->queue_lock, flags);
+ spin_unlock(&cb->queue_lock);
return IRQ_HANDLED;
}
@@ -3047,9 +3046,8 @@ static irqreturn_t DAC960_PG_intr_handler(int irq, void *arg)
struct myrb_hba *cb = arg;
void __iomem *base = cb->io_base;
struct myrb_stat_mbox *next_stat_mbox;
- unsigned long flags;
- spin_lock_irqsave(&cb->queue_lock, flags);
+ spin_lock(&cb->queue_lock);
DAC960_PG_ack_intr(base);
next_stat_mbox = cb->next_stat_mbox;
while (next_stat_mbox->valid) {
@@ -3082,7 +3080,7 @@ static irqreturn_t DAC960_PG_intr_handler(int irq, void *arg)
myrb_handle_scsi(cb, cmd_blk, scmd);
}
cb->next_stat_mbox = next_stat_mbox;
- spin_unlock_irqrestore(&cb->queue_lock, flags);
+ spin_unlock(&cb->queue_lock);
return IRQ_HANDLED;
}
@@ -3254,9 +3252,8 @@ static irqreturn_t DAC960_PD_intr_handler(int irq, void *arg)
{
struct myrb_hba *cb = arg;
void __iomem *base = cb->io_base;
- unsigned long flags;
- spin_lock_irqsave(&cb->queue_lock, flags);
+ spin_lock(&cb->queue_lock);
while (DAC960_PD_hw_mbox_status_available(base)) {
unsigned char id = DAC960_PD_read_status_cmd_ident(base);
struct scsi_cmnd *scmd = NULL;
@@ -3285,7 +3282,7 @@ static irqreturn_t DAC960_PD_intr_handler(int irq, void *arg)
else
myrb_handle_scsi(cb, cmd_blk, scmd);
}
- spin_unlock_irqrestore(&cb->queue_lock, flags);
+ spin_unlock(&cb->queue_lock);
return IRQ_HANDLED;
}
@@ -3420,9 +3417,8 @@ static irqreturn_t DAC960_P_intr_handler(int irq, void *arg)
{
struct myrb_hba *cb = arg;
void __iomem *base = cb->io_base;
- unsigned long flags;
- spin_lock_irqsave(&cb->queue_lock, flags);
+ spin_lock(&cb->queue_lock);
while (DAC960_PD_hw_mbox_status_available(base)) {
unsigned char id = DAC960_PD_read_status_cmd_ident(base);
struct scsi_cmnd *scmd = NULL;
@@ -3483,7 +3479,7 @@ static irqreturn_t DAC960_P_intr_handler(int irq, void *arg)
else
myrb_handle_scsi(cb, cmd_blk, scmd);
}
- spin_unlock_irqrestore(&cb->queue_lock, flags);
+ spin_unlock(&cb->queue_lock);
return IRQ_HANDLED;
}
--
2.8.1
Powered by blists - more mailing lists