summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Crowell <dcrowell@us.ibm.com>2019-09-27 14:54:02 -0500
committerWilliam G Hoffa <wghoffa@us.ibm.com>2019-09-30 13:55:35 -0500
commit56b1dbc3ce1a7c6d45dc94515d17304d622827af (patch)
treeba79b0f55fab43b830d18043de3f2aa2797fa205
parent70a4b6bf1a02fbe7d71a67f6ebae6e75f0e20c95 (diff)
downloadtalos-hostboot-56b1dbc3ce1a7c6d45dc94515d17304d622827af.tar.gz
talos-hostboot-56b1dbc3ce1a7c6d45dc94515d17304d622827af.zip
Skip hardware delays when running in Simics
There are sometimes delays in HWPs due to hardware delays that need to be accounted for. When we're running in Simics there is no reason to wait because the hardware works instantly (in non- modeled time). Removing these extra delays can have a huge benefit on the total runtime because there is a multiplicative penalty between real time and simulated time. Change-Id: I4f581ad2c028f250ed3fea00cc924e028f3d22d3 Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/84439 Reviewed-by: Christian R Geddes <crgeddes@us.ibm.com> Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com> Reviewed-by: William G Hoffa <wghoffa@us.ibm.com>
-rw-r--r--src/usr/fapi2/plat_utils.C8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/usr/fapi2/plat_utils.C b/src/usr/fapi2/plat_utils.C
index 01eacb645..dd3dab32d 100644
--- a/src/usr/fapi2/plat_utils.C
+++ b/src/usr/fapi2/plat_utils.C
@@ -48,6 +48,7 @@
#include <p9_scan_compression.H>
#include <cen_ringId.H>
#include <scom/wakeup.H>
+#include <util/misc.H>
//******************************************************************************
// Trace descriptors
@@ -1468,7 +1469,12 @@ ReturnCode delay(uint64_t i_nanoSeconds,
bool i_fixed)
{
//Note: i_fixed is deliberately ignored
- nanosleep( 0, i_nanoSeconds );
+
+ // We don't need to waste time for hardware delays if we're running in Simics
+ if( !Util::isSimicsRunning() )
+ {
+ nanosleep( 0, i_nanoSeconds );
+ }
return FAPI2_RC_SUCCESS;
}
OpenPOWER on IntegriCloud