public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Frederic Weisbecker <fweisbec@gmail.com>
To: Tim Bird <tim.bird@am.sony.com>
Cc: Tony Lindgren <tony@atomide.com>,
	Russell King <rmk@arm.linux.org.uk>,
	linux-arm-kernel <linux-arm-kernel@lists.arm.linux.org.uk>,
	linux kernel <linux-kernel@vger.kernel.org>,
	Steven Rostedt <srostedt@redhat.com>
Subject: Re: [PATCH 1/2] ftrace - add notrace to sched_clock on various arm platforms
Date: Sat, 6 Mar 2010 02:09:32 +0100	[thread overview]
Message-ID: <20100306010929.GH5244@nowhere> (raw)
In-Reply-To: <4B91A1D1.2020208@am.sony.com>

On Fri, Mar 05, 2010 at 04:29:05PM -0800, Tim Bird wrote:
> Add notrace attribute to sched_clock, and
> subsidiary clock routines, to avoid
> recursion within ftrace.
> 
> Signed-off-by: Tim Bird <tim.bird@am.sony.com>
> ---
>  arch/arm/mach-mmp/time.c       |    2 +-
>  arch/arm/mach-pxa/time.c       |    2 +-
>  arch/arm/mach-realview/core.c  |    2 +-
>  arch/arm/mach-sa1100/generic.c |    2 +-
>  arch/arm/mach-versatile/core.c |    2 +-
>  arch/arm/plat-omap/common.c    |   14 +++++++-------
>  arch/arm/plat-omap/io.c        |    2 +-
>  7 files changed, 13 insertions(+), 13 deletions(-)
> 
> --- a/arch/arm/mach-mmp/time.c
> +++ b/arch/arm/mach-mmp/time.c
> @@ -72,7 +72,7 @@ static inline uint32_t timer_read(void)
>  	return __raw_readl(TIMERS_VIRT_BASE + TMR_CVWR(0));
>  }
> 
> -unsigned long long sched_clock(void)
> +unsigned long long notrace sched_clock(void)
>  {
>  	unsigned long long v = cnt32_to_63(timer_read());
>  	return (v * tcr2ns_scale) >> TCR2NS_SCALE_FACTOR;
> --- a/arch/arm/mach-pxa/time.c
> +++ b/arch/arm/mach-pxa/time.c
> @@ -51,7 +51,7 @@ static void __init set_oscr2ns_scale(uns
>  		oscr2ns_scale++;
>  }



sched_clock() already has notrace in its prototype in
sched.h

>  #ifdef CONFIG_ARCH_OMAP16XX
> -static cycle_t omap16xx_32k_read(struct clocksource *cs)
> +static cycle_t notrace omap16xx_32k_read(struct clocksource *cs)
>  {
>  	return omap_readl(OMAP16XX_TIMER_32K_SYNCHRONIZED);
>  }
> @@ -110,7 +110,7 @@ static cycle_t omap16xx_32k_read(struct
>  #endif



But for the things it calls yeah it's required.

Thanks.


      reply	other threads:[~2010-03-06  1:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-06  0:29 [PATCH 1/2] ftrace - add notrace to sched_clock on various arm platforms Tim Bird
2010-03-06  1:09 ` Frederic Weisbecker [this message]

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=20100306010929.GH5244@nowhere \
    --to=fweisbec@gmail.com \
    --cc=linux-arm-kernel@lists.arm.linux.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rmk@arm.linux.org.uk \
    --cc=srostedt@redhat.com \
    --cc=tim.bird@am.sony.com \
    --cc=tony@atomide.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox