All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Glass <sjg@chromium.org>
To: u-boot@lists.denx.de
Subject: [PATCH v2 1/2] trace: select TIMER_EARLY to avoid infinite recursion
Date: Mon, 28 Dec 2020 20:31:07 -0700	[thread overview]
Message-ID: <CAPnjgZ0Cdgf1JfVb5gKPwfk0gq4d5rWaxdsB55U=xRxXezKBJQ@mail.gmail.com> (raw)
In-Reply-To: <20201222062236.27372-1-pragnesh.patel@sifive.com>

On Mon, 21 Dec 2020 at 23:23, Pragnesh Patel <pragnesh.patel@sifive.com> 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 <pragnesh.patel@sifive.com>
> ---
>
> Changes in v2:
> - new patch
>
>  lib/Kconfig | 1 +
>  1 file changed, 1 insertion(+)

Reviewed-by: Simon Glass <sjg@chromium.org>

  parent reply	other threads:[~2020-12-29  3:31 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-22  6:22 [PATCH v2 1/2] trace: select TIMER_EARLY to avoid infinite recursion Pragnesh Patel
2020-12-22  6:22 ` [PATCH v2 2/2] riscv: timer: Add support for an early timer Pragnesh Patel
     [not found]   ` <752D002CFF5D0F4FA35C0100F1D73F3FB28D556F@ATCPCS16.andestech.com>
2020-12-30  6:40     ` Rick Chen
2021-01-05  1:37       ` Rick Chen
2021-01-05  1:42         ` Sean Anderson
2021-01-05  7:39           ` Pragnesh Patel
2021-01-06  1:58             ` Rick Chen
2021-01-10 12:16               ` Pragnesh Patel
2020-12-29  3:31 ` Simon Glass [this message]
     [not found] ` <752D002CFF5D0F4FA35C0100F1D73F3FB28D5564@ATCPCS16.andestech.com>
2020-12-30  6:38   ` [PATCH v2 1/2] trace: select TIMER_EARLY to avoid infinite recursion Rick Chen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAPnjgZ0Cdgf1JfVb5gKPwfk0gq4d5rWaxdsB55U=xRxXezKBJQ@mail.gmail.com' \
    --to=sjg@chromium.org \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.