From: Frederic Weisbecker <fweisbec@gmail.com>
To: Tim Bird <tim.bird@am.sony.com>
Cc: "linux kernel" <linux-kernel@vger.kernel.org>,
linux-arm-kernel <linux-arm-kernel@lists.arm.linux.org.uk>,
"Steven Rostedt" <rostedt@goodmis.org>,
"Ingo Molnar" <mingo@elte.hu>,
"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
"Russell King" <rmk+kernel@arm.linux.org.uk>
Subject: Re: [PATCH 1/2] ftrace: add notrace to ARM sched_clock routines
Date: Sat, 2 May 2009 01:37:45 +0200 [thread overview]
Message-ID: <20090501233744.GF6404@nowhere> (raw)
In-Reply-To: <49FB77ED.3010800@am.sony.com>
On Fri, May 01, 2009 at 03:30:05PM -0700, Tim Bird wrote:
> Add notrace attribute to sched_clock, to avoid
> recursion with ftrace function_graph tracing.
>
> 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 | 4 ++--
> 6 files changed, 7 insertions(+), 7 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++;
> }
>
> -unsigned long long sched_clock(void)
> +unsigned long long notrace sched_clock(void)
> {
> unsigned long long v = cnt32_to_63(OSCR);
> return (v * oscr2ns_scale) >> OSCR2NS_SCALE_FACTOR;
> --- a/arch/arm/mach-realview/core.c
> +++ b/arch/arm/mach-realview/core.c
> @@ -60,7 +60,7 @@ void __iomem *gic_cpu_base_addr;
> * This is the RealView sched_clock implementation. This has
> * a resolution of 41.7ns, and a maximum value of about 179s.
> */
> -unsigned long long sched_clock(void)
> +unsigned long long notrace sched_clock(void)
> {
> unsigned long long v;
>
> --- a/arch/arm/mach-sa1100/generic.c
> +++ b/arch/arm/mach-sa1100/generic.c
> @@ -131,7 +131,7 @@ EXPORT_SYMBOL(cpufreq_get);
> *
> * ( * 1E9 / 3686400 => * 78125 / 288)
> */
> -unsigned long long sched_clock(void)
> +unsigned long long notrace sched_clock(void)
> {
> unsigned long long v = cnt32_to_63(OSCR);
>
> --- a/arch/arm/mach-versatile/core.c
> +++ b/arch/arm/mach-versatile/core.c
> @@ -237,7 +237,7 @@ void __init versatile_map_io(void)
> * long as there is always less than 89 seconds between successive
> * calls to this function.
> */
> -unsigned long long sched_clock(void)
> +unsigned long long notrace sched_clock(void)
> {
> unsigned long long v = cnt32_to_63(readl(VERSATILE_REFCOUNTER));
>
> --- a/arch/arm/plat-omap/common.c
> +++ b/arch/arm/plat-omap/common.c
> @@ -185,7 +185,7 @@ console_initcall(omap_add_serial_console
>
> #include <linux/clocksource.h>
>
> -static cycle_t omap_32k_read(struct clocksource *cs)
> +static cycle_t notrace omap_32k_read(struct clocksource *cs)
> {
> return omap_readl(TIMER_32K_SYNCHRONIZED);
> }
> @@ -203,7 +203,7 @@ static struct clocksource clocksource_32
> * Returns current time from boot in nsecs. It's OK for this to wrap
> * around for now, as it's just a relative time stamp.
> */
> -unsigned long long sched_clock(void)
> +unsigned long long notrace sched_clock(void)
> {
> unsigned long long ret;
I've looked into all of these functions and they don't seem to call
anything that could be traced. I could have missed something though
but it looks good.
Acked-by: Frederic Weisbecker <fweisbec@gmail.com>
next prev parent reply other threads:[~2009-05-01 23:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-01 22:30 [PATCH 1/2] ftrace: add notrace to ARM sched_clock routines Tim Bird
2009-05-01 23:03 ` Steven Rostedt
2009-05-01 23:37 ` Frederic Weisbecker [this message]
2009-05-01 23:43 ` Steven Rostedt
2009-05-01 23:54 ` Frederic Weisbecker
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=20090501233744.GF6404@nowhere \
--to=fweisbec@gmail.com \
--cc=linux-arm-kernel@lists.arm.linux.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=rmk+kernel@arm.linux.org.uk \
--cc=rostedt@goodmis.org \
--cc=tim.bird@am.sony.com \
--cc=u.kleine-koenig@pengutronix.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.