Skip to contentSkip to conversation

RDMA/pvrdma: Replace spin_lock_irqsave with spin_lock in hard IRQ

PATCH Applied Weihang Li 2 participants 2 messages Feb 5, 2021

Subsystems (2)
lore
Share & tools
lore

Weihang Li

author
#0 lore raw

PATCH 1/1 RDMA/pvrdma: Replace spin_lock_irqsave with spin_lock in hard IRQ

There is no need to do irqsave and irqrestore in context of hard IRQ.

---
 drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c +2 -3
index 00a3309..4b6019e 100644
@@ -474,7 +474,6 @@ static irqreturn_t pvrdma_intrx_handler(int irq, void *dev_id)
 	int ring_slots = (dev->dsr->cq_ring_pages.num_pages - 1) * PAGE_SIZE /
 			 sizeof(struct pvrdma_cqne);
 	unsigned int head;
-	unsigned long flags;
 
 	dev_dbg(&dev->pdev->dev, "interrupt x (completion) handler\n");
 
@@ -483,11 +482,11 @@ static irqreturn_t pvrdma_intrx_handler(int irq, void *dev_id)
 		struct pvrdma_cq *cq;
 
 		cqne = get_cqne(dev, head);
-		spin_lock_irqsave(&dev->cq_tbl_lock, flags);
+		spin_lock(&dev->cq_tbl_lock);
 		cq = dev->cq_tbl[cqne->info % dev->dsr->caps.max_cq];
 		if (cq)
 			refcount_inc(&cq->refcnt);
-		spin_unlock_irqrestore(&dev->cq_tbl_lock, flags);
+		spin_unlock(&dev->cq_tbl_lock);
 
 		if (cq && cq->ibcq.comp_handler)
 			cq->ibcq.comp_handler(&cq->ibcq, cq->ibcq.cq_context);
Signature · 1 line
2.8.1
maintainer Applied
#1 lore raw
Quoted 6 lines · Weihang Li

There is no need to do irqsave and irqrestore in context of hard IRQ.

---
 drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

Applied to for-next, thanks

Jason