Subject: [PATCH] powerpc/powernv: Only delay opal_rtc_read() retry when necessary

From: Michael Neuling <[email-masked]>
Date: Fri, 18 Dec 2015 21:46:04 +1100

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.

Signed-off-by: Michael Neuling <[email-masked]>

diff --git a/arch/powerpc/platforms/powernv/opal-rtc.c b/arch/powerpc/platf=
orms/powernv/opal-rtc.c
index 37dbee1..06511f3 100644
--- a/arch/powerpc/platforms/powernv/opal-rtc.c
+++ b/arch/powerpc/platforms/powernv/opal-rtc.c
@@ -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)