Commit 57a90390 authored by Michael Neuling's avatar Michael Neuling Committed by Michael Ellerman

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.
Signed-off-by: default avatarMichael Neuling <mikey@neuling.org>
Reviewed-by: default avatarStewart Smith <stewart@linux.vnet.ibm.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent affddff6
...@@ -50,7 +50,7 @@ unsigned long __init opal_get_boot_time(void) ...@@ -50,7 +50,7 @@ unsigned long __init opal_get_boot_time(void)
rc = opal_rtc_read(&__y_m_d, &__h_m_s_ms); rc = opal_rtc_read(&__y_m_d, &__h_m_s_ms);
if (rc == OPAL_BUSY_EVENT) if (rc == OPAL_BUSY_EVENT)
opal_poll_events(NULL); opal_poll_events(NULL);
else else if (rc == OPAL_BUSY)
mdelay(10); mdelay(10);
} }
if (rc != OPAL_SUCCESS) if (rc != OPAL_SUCCESS)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment