From 56b1dbc3ce1a7c6d45dc94515d17304d622827af Mon Sep 17 00:00:00 2001 From: Dan Crowell Date: Fri, 27 Sep 2019 14:54:02 -0500 Subject: 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 Tested-by: Jenkins Server Tested-by: Jenkins OP Build CI Tested-by: FSP CI Jenkins Tested-by: Jenkins OP HW Reviewed-by: William G Hoffa --- src/usr/fapi2/plat_utils.C | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/usr/fapi2') 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 #include #include +#include //****************************************************************************** // 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; } -- cgit v1.2.1