linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ftrace,arm: add notrace to ARM sched_clock routines - resend
@ 2009-06-12 22:07 Tim Bird
  2009-06-14 17:51 ` Linus Walleij
  0 siblings, 1 reply; 3+ messages in thread
From: Tim Bird @ 2009-06-12 22:07 UTC (permalink / raw)
  To: linux-arm-kernel, linux kernel, Russell King, Steven Rostedt,
	Ingo Molnar, Tony Lindgren

Add notrace attribute to sched_clock, to avoid
recursion with ftrace function 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;



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] ftrace,arm: add notrace to ARM sched_clock routines -  resend
  2009-06-12 22:07 [PATCH] ftrace,arm: add notrace to ARM sched_clock routines - resend Tim Bird
@ 2009-06-14 17:51 ` Linus Walleij
  2009-06-14 21:30   ` Paul Mundt
  0 siblings, 1 reply; 3+ messages in thread
From: Linus Walleij @ 2009-06-14 17:51 UTC (permalink / raw)
  To: Tim Bird, Paul Mundt
  Cc: linux-arm-kernel, linux kernel, Russell King, Steven Rostedt,
	Ingo Molnar, Tony Lindgren

2009/6/13 Tim Bird <tim.bird@am.sony.com>:

> Add notrace attribute to sched_clock, to avoid
> recursion with ftrace function 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(-)

And now that Paul Mundt is making it possible to use the default
sched_clock() with the generic clocksource and the OMAP hack
will likely go away, should the default implementation in
kernel/sched_clock.c also be tagged as
unsigned long long notrace __attribute__((weak)) sched_clock(void)
or something?

Should it be tagged notrace even if it's the old jiffybased one even?

Linus Walleij

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] ftrace,arm: add notrace to ARM sched_clock routines - resend
  2009-06-14 17:51 ` Linus Walleij
@ 2009-06-14 21:30   ` Paul Mundt
  0 siblings, 0 replies; 3+ messages in thread
From: Paul Mundt @ 2009-06-14 21:30 UTC (permalink / raw)
  To: Linus Walleij
  Cc: Tim Bird, linux-arm-kernel, linux kernel, Russell King,
	Steven Rostedt, Ingo Molnar, Tony Lindgren

On Sun, Jun 14, 2009 at 07:51:04PM +0200, Linus Walleij wrote:
> 2009/6/13 Tim Bird <tim.bird@am.sony.com>:
> 
> > Add notrace attribute to sched_clock, to avoid
> > recursion with ftrace function 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(-)
> 
> And now that Paul Mundt is making it possible to use the default
> sched_clock() with the generic clocksource and the OMAP hack
> will likely go away, should the default implementation in
> kernel/sched_clock.c also be tagged as
> unsigned long long notrace __attribute__((weak)) sched_clock(void)
> or something?
> 
> Should it be tagged notrace even if it's the old jiffybased one even?
> 
Thanks for pointing that out. Yes, the new generic version will need the
notrace attribute as well, I will include this in the next iteration.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-06-14 21:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-12 22:07 [PATCH] ftrace,arm: add notrace to ARM sched_clock routines - resend Tim Bird
2009-06-14 17:51 ` Linus Walleij
2009-06-14 21:30   ` Paul Mundt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).