diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2016-10-14 10:26:21 +0300 |
---|---|---|
committer | Sasha Levin <alexander.levin@verizon.com> | 2016-11-23 21:28:50 -0500 |
commit | 60299e356a54b938af0b0f5c53f58c1ceb8b2ef1 (patch) | |
tree | 429ec92be8f40480628549d3decd6c307ff6b2c2 /drivers | |
parent | 5617a13564bf1438a0dbfdde79c3bbf769190fbd (diff) |
irqchip/gicv3: Handle loop timeout proper
[ Upstream commit d102eb5c1ac5e6743b1c6d145c06a25d98ad1375 ]
The timeout loop terminates when the loop count is zero, but the decrement
of the count variable is post check. So count is -1 when we check for the
timeout and therefor the error message is supressed.
Change it to predecrement, so the error message is emitted.
[ tglx: Massaged changelog ]
Fixes: a2c225101234 ("irqchip: gic-v3: Refactor gic_enable_redist to support both enabling and disabling")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Sudeep Holla <sudeep.holla@arm.com>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: kernel-janitors@vger.kernel.org
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: stable@vger.kernel.org
Link: http://lkml.kernel.org/r/20161014072534.GA15168@mwanda
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/irqchip/irq-gic-v3.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/irqchip/irq-gic-v3.c b/drivers/irqchip/irq-gic-v3.c index 1242d8a25721..70565fc17ea7 100644 --- a/drivers/irqchip/irq-gic-v3.c +++ b/drivers/irqchip/irq-gic-v3.c @@ -178,7 +178,7 @@ static void gic_enable_redist(bool enable) return; /* No PM support in this redistributor */ } - while (count--) { + while (--count) { val = readl_relaxed(rbase + GICR_WAKER); if (enable ^ (val & GICR_WAKER_ChildrenAsleep)) break; |