From mboxrd@z Thu Jan 1 00:00:00 1970 From: Simon Glass Date: Mon, 28 Dec 2020 20:31:07 -0700 Subject: [PATCH v2 1/2] trace: select TIMER_EARLY to avoid infinite recursion In-Reply-To: <20201222062236.27372-1-pragnesh.patel@sifive.com> References: <20201222062236.27372-1-pragnesh.patel@sifive.com> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Mon, 21 Dec 2020 at 23:23, Pragnesh Patel wrote: > > 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 > --- > > Changes in v2: > - new patch > > lib/Kconfig | 1 + > 1 file changed, 1 insertion(+) Reviewed-by: Simon Glass