[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1602554458-26927-1-git-send-email-tiantao6@hisilicon.com>
Date: Tue, 13 Oct 2020 10:00:58 +0800
From: Tian Tao <tiantao6@...ilicon.com>
To: <eric.auger@...hat.com>, <alex.williamson@...hat.com>,
<cohuck@...hat.com>, <kvm@...r.kernel.org>,
<linux-kernel@...r.kernel.org>, <song.bao.hua@...ilicon.com>
CC: <linuxarm@...wei.com>
Subject: [PATCH] vfio/platform: Replace spin_lock_irqsave by spin_lock in hard IRQ
It is redundant to do irqsave and irqrestore in hardIRQ context.
Signed-off-by: Tian Tao <tiantao6@...ilicon.com>
---
drivers/vfio/platform/vfio_platform_irq.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/vfio/platform/vfio_platform_irq.c b/drivers/vfio/platform/vfio_platform_irq.c
index c5b09ec..24fd6c5 100644
--- a/drivers/vfio/platform/vfio_platform_irq.c
+++ b/drivers/vfio/platform/vfio_platform_irq.c
@@ -139,10 +139,9 @@ static int vfio_platform_set_irq_unmask(struct vfio_platform_device *vdev,
static irqreturn_t vfio_automasked_irq_handler(int irq, void *dev_id)
{
struct vfio_platform_irq *irq_ctx = dev_id;
- unsigned long flags;
int ret = IRQ_NONE;
- spin_lock_irqsave(&irq_ctx->lock, flags);
+ spin_lock(&irq_ctx->lock);
if (!irq_ctx->masked) {
ret = IRQ_HANDLED;
@@ -152,7 +151,7 @@ static irqreturn_t vfio_automasked_irq_handler(int irq, void *dev_id)
irq_ctx->masked = true;
}
- spin_unlock_irqrestore(&irq_ctx->lock, flags);
+ spin_unlock(&irq_ctx->lock);
if (ret == IRQ_HANDLED)
eventfd_signal(irq_ctx->trigger, 1);
--
2.7.4
Powered by blists - more mailing lists