This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "".
The branch, master has been updated via 64b4c275b39373678eaad8294816e9937805de47 (commit) from 2356affd7f5b0c96b66e9b6c3174175bbfa00bd1 (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- commit 64b4c275b39373678eaad8294816e9937805de47 Author: Petri Savolainen petri.savolainen@nokia.com Date: Wed Feb 19 11:13:50 2020 +0200
linux-gen: timer: fix timer pool create sync with inline timer scan
Set highest_tp_idx only after timer pool has been fully initialized.
Signed-off-by: Petri Savolainen petri.savolainen@nokia.com Reviewed-by: Matias Elo matias.elo@nokia.com
diff --git a/platform/linux-generic/odp_timer.c b/platform/linux-generic/odp_timer.c index 3a82ee84..5fa02011 100644 --- a/platform/linux-generic/odp_timer.c +++ b/platform/linux-generic/odp_timer.c @@ -307,9 +307,6 @@ static odp_timer_pool_t timer_pool_new(const char *name, tp_idx = i; timer_global->num_timer_pools++;
- if (tp_idx > timer_global->highest_tp_idx) - timer_global->highest_tp_idx = tp_idx; - odp_ticketlock_unlock(&timer_global->lock);
sz0 = ROUNDUP_CACHE_LINE(sizeof(timer_pool_t)); @@ -377,7 +374,10 @@ static odp_timer_pool_t timer_pool_new(const char *name, } tp->tp_idx = tp_idx; odp_spinlock_init(&tp->lock); + tp->start_time = odp_time_global(); + odp_ticketlock_lock(&timer_global->lock); + /* Inline timer scan may find the timer pool after this */ timer_global->timer_pool[tp_idx] = tp;
if (timer_global->num_timer_pools == 1) @@ -391,13 +391,18 @@ static odp_timer_pool_t timer_pool_new(const char *name, }
odp_ticketlock_unlock(&timer_global->lock); + if (!odp_global_rw->inline_timers) { if (tp->param.clk_src == ODP_CLOCK_CPU) itimer_init(tp); + } else { + /* Update the highest index for inline timer scan */ + odp_ticketlock_lock(&timer_global->lock); + if (tp_idx > timer_global->highest_tp_idx) + timer_global->highest_tp_idx = tp_idx; + odp_ticketlock_unlock(&timer_global->lock); }
- tp->start_time = odp_time_global(); - return timer_pool_to_hdl(tp); }
-----------------------------------------------------------------------
Summary of changes: platform/linux-generic/odp_timer.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-)
hooks/post-receive