[Skiboot] [PATCH v2 5/9] Track how long we spend spinning waiting for resource to be loaded
Stewart Smith
stewart at linux.vnet.ibm.com
Wed May 6 14:00:50 AEST 2015
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 at linux.vnet.ibm.com>
---
core/platform.c | 4 ++++
1 file changed, 4 insertions(+)
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;
}
--
1.7.10.4
More information about the Skiboot
mailing list