Skip to contentSkip to conversation

powerpc/powernv: Only delay opal_rtc_read() retry when necessary

PATCH Applied Michael Neuling 3 participants 3 messages Dec 18, 2015 – Jan 11, 2016 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 powerpc/powernv: Only delay opal_rtc_read() retry when necessary

Only delay opal_rtc_read() when busy and are going to retry.

This has the advantage of possibly saving a massive 10ms off booting!

Kudos to Stewart for noticing.

arch/powerpc/platf= renamed from arch/powerpc/platforms/powernv/opal-rtc.c +0 -0

orms/powernv/opal-rtc.c
index 37dbee1..06511f3 100644

arch/powerpc/platforms/powernv/opal-rtc.c +1 -1
@@ -51,7 +51,7 @@ unsigned long __init opal_get_boot_time(void)
 		rc =3D opal_rtc_read(&__y_m_d, &__h_m_s_ms);
 		if (rc =3D=3D OPAL_BUSY_EVENT)
 			opal_poll_events(NULL);
-		else
+		else if (rc =3D=3D OPAL_BUSY)
 			mdelay(10);
 	}
 	if (rc !=3D OPAL_SUCCESS)