From b686df088cbcda1b80d6318b08496c92b5ee600d Mon Sep 17 00:00:00 2001 From: Raja Das Date: Wed, 14 Jun 2017 03:56:04 -0500 Subject: Removed critical_section enter/exit calls within the delay method 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 Reviewed-by: Shakeeb A. Pasha B K Reviewed-by: AMIT J. TENDOLKAR --- src/hwpf/plat_utils.C | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'src/hwpf') diff --git a/src/hwpf/plat_utils.C b/src/hwpf/plat_utils.C index 1da22fdb..e50a246a 100644 --- a/src/hwpf/plat_utils.C +++ b/src/hwpf/plat_utils.C @@ -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 -- cgit v1.2.1