summaryrefslogtreecommitdiff
path: root/drivers/thermal/rcar_thermal.c
diff options
context:
space:
mode:
authorTian Tao <tiantao6@hisilicon.com>2020-10-27 09:06:30 +0800
committerDaniel Lezcano <daniel.lezcano@linaro.org>2020-10-27 10:45:22 +0100
commit4eb7d0cd590d99b6010b5b87a88804cda09a85da (patch)
tree07adea7789c18c9974f4d2f51755764dfe39c63a /drivers/thermal/rcar_thermal.c
parent37b2539e63d6570c9ee51b1d48bdecb334df367d (diff)
downloadlwn-4eb7d0cd590d99b6010b5b87a88804cda09a85da.tar.gz
lwn-4eb7d0cd590d99b6010b5b87a88804cda09a85da.zip
thermal/drivers/rcar: Replace spin_lock_irqsave by spin_lock in hard IRQ
On RT or even on mainline with 'threadirqs' on the command line all interrupts which are not explicitly requested with IRQF_NO_THREAD run their handlers in thread context. The same applies to soft interrupts. That means they are subject to the normal scheduler rules and no other code is going to acquire that lock from hard interrupt context either, so the irqsave() here is pointless in all cases. Signed-off-by: Tian Tao <tiantao6@hisilicon.com> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Link: https://lore.kernel.org/r/1603760790-37748-1-git-send-email-tiantao6@hisilicon.com
Diffstat (limited to 'drivers/thermal/rcar_thermal.c')
-rw-r--r--drivers/thermal/rcar_thermal.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/thermal/rcar_thermal.c b/drivers/thermal/rcar_thermal.c
index 5c2a13bf249c..6ae757d66f46 100644
--- a/drivers/thermal/rcar_thermal.c
+++ b/drivers/thermal/rcar_thermal.c
@@ -409,16 +409,15 @@ static irqreturn_t rcar_thermal_irq(int irq, void *data)
{
struct rcar_thermal_common *common = data;
struct rcar_thermal_priv *priv;
- unsigned long flags;
u32 status, mask;
- spin_lock_irqsave(&common->lock, flags);
+ spin_lock(&common->lock);
mask = rcar_thermal_common_read(common, INTMSK);
status = rcar_thermal_common_read(common, STR);
rcar_thermal_common_write(common, STR, 0x000F0F0F & mask);
- spin_unlock_irqrestore(&common->lock, flags);
+ spin_unlock(&common->lock);
status = status & ~mask;