[Skiboot] [PATCH] hw/p8-i2c: Fix deadlock in p9_i2c_bus_owner_change
anton at ozlabs.org
Fri Oct 13 01:01:59 AEDT 2017
From: Anton Blanchard <anton at samba.org>
When debugging a system where Linux was taking soft lockup errors, I
noticed two CPUs were stuck in OPAL:
p8_i2c_recover() is a timer, and is stuck trying to take master->lock.
p9_i2c_bus_owner_change() has taken master->lock, but then is stuck waiting
for all timers to complete. We deadlock.
Fix this by using cancel_timer_async(), as suggested by Oliver.
Fixes: 201fd50f208d ("hw/p8-i2c: Fix OCC locking")
Signed-off-by: Anton Blanchard <anton at samba.org>
hw/p8-i2c.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/p8-i2c.c b/hw/p8-i2c.c
index ffbace93..0defe7b2 100644
@@ -1307,7 +1307,7 @@ void p9_i2c_bus_owner_change(u32 chip_id)
/* clear the existing wait timer */
/* re-start the request now that we own the master */
master->state = state_idle;
More information about the Skiboot