]> git.baikalelectronics.ru Git - uboot.git/commit
trace: select TIMER_EARLY to avoid infinite recursion
authorPragnesh Patel <pragnesh.patel@sifive.com>
Sun, 17 Jan 2021 12:41:24 +0000 (18:11 +0530)
committerAndes <uboot@andestech.com>
Mon, 18 Jan 2021 03:06:32 +0000 (11:06 +0800)
commit1b360dad64fbd97d2729c760f6165d0d2bcc0b69
tree449fbc79c6369b75d69b878ce63dbe3a581e0fd6
parent4b6d0b63d57b0f633b3b39f16ee0dfa27bf9c667
trace: select TIMER_EARLY to avoid infinite recursion

When tracing functions is enabled this adds calls to
__cyg_profile_func_enter() and __cyg_profile_func_exit() to the traced
functions.

__cyg_profile_func_enter() and __cyg_profile_func_exit() invoke
timer_get_us() to record the entry and exit time.

initr_dm() will make gd->dm_root = NULL and gd->timer = NULL, so
timer_get_us() -> get_ticks() -> dm_timer_init() will lead to an
indefinite recursion.

So select TIMER_EARLY when tracing got enabled.

Signed-off-by: Pragnesh Patel <pragnesh.patel@sifive.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Rick Chen <rick@andestech.com>
lib/Kconfig