Skip to content

Commit

Permalink
Skip hardware delays when running in Simics
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
dcrowell77 authored and wghoffa committed Sep 30, 2019
1 parent 70a4b6b commit 56b1dbc
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/usr/fapi2/plat_utils.C
Expand Up @@ -48,6 +48,7 @@
#include <p9_scan_compression.H>
#include <cen_ringId.H>
#include <scom/wakeup.H>
#include <util/misc.H>

//******************************************************************************
// Trace descriptors
Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit 56b1dbc

Please sign in to comment.