Skip to content

Commit

Permalink
Removed critical_section enter/exit calls within the delay method
Browse files Browse the repository at this point in the history
It is disabling the __pk_schedule_hardware_timeout calls which
updates ppe42_64bit_timebase (time accumulator). This gets stuck
at such a boundary that the decremetor diff addition will never
be equal to the target time, hence infinite loop

Change-Id: I8c2990cc7e02fa2bb530b961ddac49c21addb273
CQ:SW386997
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/41810
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Reviewed-by: Shakeeb A. Pasha B K <shakeebbk@in.ibm.com>
Reviewed-by: AMIT J. TENDOLKAR <amit.tendolkar@in.ibm.com>
  • Loading branch information
Raja Das authored and am10dolkar committed Jun 14, 2017
1 parent 5cf1886 commit b686df0
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions src/hwpf/plat_utils.C
Expand Up @@ -62,31 +62,20 @@ namespace fapi2

PkTimebase target_time;
PkTimebase current_time;
PkMachineContext ctx;


// Only execute if nanoSeconds is non-zero (eg a real wait)
if (i_nanoSeconds)
{
// The critical section enter/exit set is done to ensure the timebase
// operations are non-interrupible.

pk_critical_section_enter(&ctx);

target_time = pk_timebase_get() + delayCycles( i_nanoSeconds);
current_time = pk_timebase_get();
FAPI_IMP("Target Time 0x%08X %08X Current Time 0x%08X %08X",
(uint32_t)((target_time >> 32) & 0xFFFFFFFF),
(uint32_t)(target_time & 0xFFFFFFFF),
(uint32_t)((current_time >> 32) & 0xFFFFFFFF),
(uint32_t)(current_time & 0xFFFFFFFF));

do
{
current_time = pk_timebase_get();
} while (target_time > current_time);

pk_critical_section_exit(&ctx);
}
#else

Expand Down

0 comments on commit b686df0

Please sign in to comment.