linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] powerpc/powernv: Only delay opal_rtc_read() retry when necessary
@ 2015-12-18 10:46 Michael Neuling
  2015-12-21  0:06 ` Stewart Smith
  2016-01-11  9:14 ` Michael Ellerman
  0 siblings, 2 replies; 3+ messages in thread
From: Michael Neuling @ 2015-12-18 10:46 UTC (permalink / raw)
  To: Michael Ellerman, benh; +Cc: linuxppc-dev, Stewart Smith, Anton Blanchard

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 <mikey@neuling.org>

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)

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-01-11  9:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-18 10:46 [PATCH] powerpc/powernv: Only delay opal_rtc_read() retry when necessary Michael Neuling
2015-12-21  0:06 ` Stewart Smith
2016-01-11  9:14 ` Michael Ellerman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).