提交 a80f8513 编写于 作者: P Pragnesh Patel 提交者: Andes

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: NPragnesh Patel <pragnesh.patel@sifive.com>
Reviewed-by: NSimon Glass <sjg@chromium.org>
Reviewed-by: NRick Chen <rick@andestech.com>
上级 8f78e527
...@@ -210,6 +210,7 @@ config BITREVERSE ...@@ -210,6 +210,7 @@ config BITREVERSE
config TRACE config TRACE
bool "Support for tracing of function calls and timing" bool "Support for tracing of function calls and timing"
imply CMD_TRACE imply CMD_TRACE
select TIMER_EARLY
help help
Enables function tracing within U-Boot. This allows recording of call Enables function tracing within U-Boot. This allows recording of call
traces including timing information. The command can write data to traces including timing information. The command can write data to
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册