xen/arm: gic-v3: Fix redistributor wakeup polling

gicv3_enable_redist() clears GICR_WAKER.ProcessorSleep and then waits for
GICR_WAKER.ChildrenAsleep to clear, as required after waking a
redistributor.

However, the polling loop currently uses "while ( timeout )". Since
timeout is initially false, the loop runs only once unless the timeout
path has already been reached. As a result, Xen can continue before the
redistributor has completed wakeup.

Use an unconditional loop, matching the surrounding timeout/break pattern,
so the code polls until either ChildrenAsleep is clear or the deadline is
reached.

While there, also fix the timeout message. This path polls
GICR_WAKER.ChildrenAsleep, not an RWP bit, so "RWP timeout" is misleading.

Fixes: bc183a0235 ("xen/arm: Add support for GIC v3")
Signed-off-by: Luca Fancellu <luca.fancellu@arm.com>
Reviewed-by: Mykola Kvach <mykola_kvach@epam.com>
Reviewed-by: Michal Orzel <michal.orzel@amd.com>
Release-Acked-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
This commit is contained in:
Luca Fancellu authored and Michal Orzel committed 2026-05-27 13:38:29 +02:00
1 parent f8523357f0
commit 941fdfc03e
1 file changed
+2 -2
+2 -2
View File
@@ -837,11 +837,11 @@ static int gicv3_enable_redist(void)
}
cpu_relax();
udelay(1);
} while ( timeout );
} while ( 1 );
if ( timeout )
{
dprintk(XENLOG_ERR, "GICv3: Redist enable RWP timeout\n");
dprintk(XENLOG_ERR, "GICv3: Redist wakeup timeout\n");
return 1;
}
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.