lkml.org 
[lkml]   [2010]   [Mar]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/2] ftrace - add notrace to sched_clock on various arm platforms
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.



\
 
 \ /
  Last update: 2010-03-06 02:11    [W:0.036 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site