1 From d102eb5c1ac5e6743b1c6d145c06a25d98ad1375 Mon Sep 17 00:00:00 2001
2 From: Dan Carpenter <dan.carpenter@oracle.com>
3 Date: Fri, 14 Oct 2016 10:26:21 +0300
4 Subject: irqchip/gicv3: Handle loop timeout proper
6 From: Dan Carpenter <dan.carpenter@oracle.com>
8 commit d102eb5c1ac5e6743b1c6d145c06a25d98ad1375 upstream.
10 The timeout loop terminates when the loop count is zero, but the decrement
11 of the count variable is post check. So count is -1 when we check for the
12 timeout and therefor the error message is supressed.
14 Change it to predecrement, so the error message is emitted.
16 [ tglx: Massaged changelog ]
18 Fixes: a2c225101234 ("irqchip: gic-v3: Refactor gic_enable_redist to support both enabling and disabling")
19 Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
20 Acked-by: Sudeep Holla <sudeep.holla@arm.com>
21 Cc: Marc Zyngier <marc.zyngier@arm.com>
22 Cc: kernel-janitors@vger.kernel.org
23 Cc: Jason Cooper <jason@lakedaemon.net>
24 Link: http://lkml.kernel.org/r/20161014072534.GA15168@mwanda
25 Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
26 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
29 drivers/irqchip/irq-gic-v3.c | 2 +-
30 1 file changed, 1 insertion(+), 1 deletion(-)
32 --- a/drivers/irqchip/irq-gic-v3.c
33 +++ b/drivers/irqchip/irq-gic-v3.c
34 @@ -153,7 +153,7 @@ static void gic_enable_redist(bool enabl
35 return; /* No PM support in this redistributor */
40 val = readl_relaxed(rbase + GICR_WAKER);
41 if (enable ^ (bool)(val & GICR_WAKER_ChildrenAsleep))