From mboxrd@z Thu Jan 1 00:00:00 1970 From: Simon Glass Date: Mon, 22 Feb 2016 23:37:50 -0700 Subject: [U-Boot] [PATCH 07/16] timer: Support tracing fully In-Reply-To: References: <1455500220-1324-1-git-send-email-sjg@chromium.org> <1455500220-1324-8-git-send-email-sjg@chromium.org> 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 Hi Bin, On 16 February 2016 at 02:21, Bin Meng wrote: > Hi Simon, > > On Mon, Feb 15, 2016 at 9:36 AM, Simon Glass wrote: >> A few of the functions in the timer uclass are not marked with 'notrace'. Fix >> this so that tracing can be used with CONFIG_TRACE. >> >> Signed-off-by: Simon Glass >> --- >> >> drivers/timer/timer-uclass.c | 6 +++--- >> 1 file changed, 3 insertions(+), 3 deletions(-) >> >> diff --git a/drivers/timer/timer-uclass.c b/drivers/timer/timer-uclass.c >> index 83d1a35..382c0f2 100644 >> --- a/drivers/timer/timer-uclass.c >> +++ b/drivers/timer/timer-uclass.c >> @@ -22,7 +22,7 @@ DECLARE_GLOBAL_DATA_PTR; >> * tick, and no timer interrupt. >> */ >> >> -int timer_get_count(struct udevice *dev, u64 *count) >> +int notrace timer_get_count(struct udevice *dev, u64 *count) >> { >> const struct timer_ops *ops = device_get_ops(dev); >> >> @@ -32,9 +32,9 @@ int timer_get_count(struct udevice *dev, u64 *count) >> return ops->get_count(dev, count); > > Besides making timer_get_count() and timer_get_rate() APIs notrace, > does it help to make the timer uclass ops notrace as well? I don't think so. From what I can this needs to be done in each driver. > >> } >> >> -unsigned long timer_get_rate(struct udevice *dev) >> +unsigned long notrace timer_get_rate(struct udevice *dev) >> { >> - struct timer_dev_priv *uc_priv = dev_get_uclass_priv(dev); >> + struct timer_dev_priv *uc_priv = dev->uclass_priv; > > Why is this change needed? To avoid a function call, and the notrace problem. > >> >> return uc_priv->clock_rate; >> } >> -- > > Regards, > Bin Regards, Simon