Skip to content

Commit

Permalink
Minor change to fix compile errors from cal_timers.H on the FSP
Browse files Browse the repository at this point in the history
Change-Id: I8ec7314a4a6e4bf37fcd72c74041034b661668ff
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/34216
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com>
Reviewed-by: Brian R. Silver <bsilver@us.ibm.com>
Reviewed-by: ANDRE A. MARIN <aamarin@us.ibm.com>
Reviewed-by: Christopher J. Cain <cjcain@us.ibm.com>
Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com>
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/34219
Reviewed-by: William G. Hoffa <wghoffa@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
  • Loading branch information
Aravind T Nair authored and dcrowell77 committed Mar 1, 2017
1 parent 7052b8c commit 65cc747
Showing 1 changed file with 3 additions and 2 deletions.
Expand Up @@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
/* Contributors Listed Below - COPYRIGHT 2015,2016 */
/* Contributors Listed Below - COPYRIGHT 2015,2017 */
/* [+] International Business Machines Corp. */
/* */
/* */
Expand Down Expand Up @@ -241,7 +241,8 @@ inline fapi2::ReturnCode cal_timer_setup(const fapi2::Target<T>& i_target,
i_poll.iv_sim_delay = mss::cycles_to_simcycles(mss::ns_to_cycles(i_target, i_poll.iv_delay));

// Round up to the cycles left after the initial delay
l_ns_left = std::max(0L, (int64_t(mss::cycles_to_ns(i_target, l_total_cycles)) - int64_t(i_poll.iv_initial_delay)));
l_ns_left = std::max(int64_t(0), (int64_t(mss::cycles_to_ns(i_target,
l_total_cycles)) - int64_t(i_poll.iv_initial_delay)));
i_poll.iv_poll_count = l_ns_left / i_poll.iv_delay;
i_poll.iv_poll_count += l_ns_left % i_poll.iv_delay ? 0 : 1;

Expand Down

0 comments on commit 65cc747

Please sign in to comment.