All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Neuling <mikey@neuling.org>
To: Michael Ellerman <mpe@ellerman.id.au>, benh <benh@kernel.crashing.org>
Cc: linuxppc-dev <linuxppc-dev@lists.ozlabs.org>,
	Stewart Smith <sesmith@au1.ibm.com>,
	Anton Blanchard <anton@samba.org>
Subject: [PATCH] powerpc/powernv: Only delay opal_rtc_read() retry when necessary
Date: Fri, 18 Dec 2015 21:46:04 +1100	[thread overview]
Message-ID: <1450435564.2791.98.camel@neuling.org> (raw)

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)

             reply	other threads:[~2015-12-18 10:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-18 10:46 Michael Neuling [this message]
2015-12-21  0:06 ` [PATCH] powerpc/powernv: Only delay opal_rtc_read() retry when necessary Stewart Smith
2016-01-11  9:14 ` Michael Ellerman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1450435564.2791.98.camel@neuling.org \
    --to=mikey@neuling.org \
    --cc=anton@samba.org \
    --cc=benh@kernel.crashing.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    --cc=sesmith@au1.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.