aboutsummaryrefslogtreecommitdiff
path: root/core/platform.c
diff options
context:
space:
mode:
authorStewart Smith <stewart@linux.vnet.ibm.com>2015-05-06 14:00:50 +1000
committerStewart Smith <stewart@linux.vnet.ibm.com>2015-05-07 17:54:30 +1000
commitba83e54ff2bb5c268da3897d7bfaca840535d25f (patch)
treee12716ec6e532d226a5700d0aebb078ed59696ac /core/platform.c
parent8b59c65825074d00d0f93fbe789bb7fa9991ded6 (diff)
downloadskiboot-ba83e54ff2bb5c268da3897d7bfaca840535d25f.zip
skiboot-ba83e54ff2bb5c268da3897d7bfaca840535d25f.tar.gz
skiboot-ba83e54ff2bb5c268da3897d7bfaca840535d25f.tar.bz2
Track how long we spend spinning waiting for resource to be loaded
This should help us capture (in skiboot log) how long we spend waiting for resources to load from flash/FSP. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com> Reviewed-by: Joel Stanley <joel@jms.id.au>
Diffstat (limited to 'core/platform.c')
-rw-r--r--core/platform.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/core/platform.c b/core/platform.c
index 2a29a7e..dec7e96 100644
--- a/core/platform.c
+++ b/core/platform.c
@@ -110,12 +110,16 @@ int resource_loaded(enum resource_id id, uint32_t idx)
int wait_for_resource_loaded(enum resource_id id, uint32_t idx)
{
int r = resource_loaded(id, idx);
+ int waited = 0;
while(r == OPAL_BUSY) {
opal_run_pollers();
time_wait_ms_nopoll(5);
+ waited+=5;
r = resource_loaded(id, idx);
}
+ prlog(PR_TRACE, "PLATFORM: wait_for_resource_loaded %x/%x %u ms\n",
+ id, idx, waited);
return r;
}