Skip to contentSkip to conversation

Iommu: ipmmu-vmsa: replace spin_lock_irqsave with spin_lock in ISR

PATCH In review jun qian 2 participants 2 messages Sep 11, 2018 IOMMU

lore
Share & tools
lore

jun qian

author
#0 lore raw

PATCH 1/1 Iommu: ipmmu-vmsa: replace spin_lock_irqsave with spin_lock in ISR

As you are already in ISR, it is unnecessary to call spin_lock_irqsave.

---
 drivers/iommu/ipmmu-vmsa.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/iommu/ipmmu-vmsa.c +2 -3
index 22b94f8a9a04..afa23d53502c 100644
@@ -569,9 +569,8 @@ static irqreturn_t ipmmu_irq(int irq, void *dev)
 	struct ipmmu_vmsa_device *mmu = dev;
 	irqreturn_t status = IRQ_NONE;
 	unsigned int i;
-	unsigned long flags;
 
-	spin_lock_irqsave(&mmu->lock, flags);
+	spin_lock(&mmu->lock);
 
 	/*
 	 * Check interrupts for all active contexts.
@@ -583,7 +582,7 @@ static irqreturn_t ipmmu_irq(int irq, void *dev)
 			status = IRQ_HANDLED;
 	}
 
-	spin_unlock_irqrestore(&mmu->lock, flags);
+	spin_unlock(&mmu->lock);
 
 	return status;
 }
Signature · 1 line
2.17.1
#1 lore raw

CC linux-renesas-soc

Quoted 34 lines · jun qian

As you are already in ISR, it is unnecessary to call spin_lock_irqsave.

---
 drivers/iommu/ipmmu-vmsa.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/iommu/ipmmu-vmsa.c +2 -4
index 22b94f8a9a04..afa23d53502c 100644
@@ -569,9 +569,8 @@ static irqreturn_t ipmmu_irq(int irq, void *dev)
        struct ipmmu_vmsa_device *mmu = dev;
        irqreturn_t status = IRQ_NONE;
        unsigned int i;
-       unsigned long flags;
 
-       spin_lock_irqsave(&mmu->lock, flags);
+       spin_lock(&mmu->lock);
 
        /*
         * Check interrupts for all active contexts.
@@ -583,7 +582,7 @@ static irqreturn_t ipmmu_irq(int irq, void *dev)
                        status = IRQ_HANDLED;
        }
 
-       spin_unlock_irqrestore(&mmu->lock, flags);
+       spin_unlock(&mmu->lock);
 
        return status;
 }
--

2.17.1