Signed-off-by: Thomas Gleixner --- arch/arm/mach-davinci/time.c | 30 ++++-------------------------- 1 file changed, 4 insertions(+), 26 deletions(-) Index: linux-2.6-tip/arch/arm/mach-davinci/time.c =================================================================== --- linux-2.6-tip.orig/arch/arm/mach-davinci/time.c +++ linux-2.6-tip/arch/arm/mach-davinci/time.c @@ -154,7 +154,7 @@ static int timer32_config(struct timer_s return 0; } -static inline u32 timer32_read(struct timer_s *t) +static inline u32 notrace timer32_read(struct timer_s *t) { return __raw_readl(t->base + t->tim_off); } @@ -265,42 +265,21 @@ static void __init timer_init(void) /* * clocksource */ -static cycle_t read_cycles(struct clocksource *cs) +static cycle_t notrace read_cycles(struct clocksource *cs) { struct timer_s *t = &timers[TID_CLOCKSOURCE]; return (cycles_t)timer32_read(t); } -/* - * Kernel assumes that sched_clock can be called early but may not have - * things ready yet. - */ -static cycle_t read_dummy(struct clocksource *cs) -{ - return 0; -} - - static struct clocksource clocksource_davinci = { .rating = 300, - .read = read_dummy, + .read = read_, .mask = CLOCKSOURCE_MASK(32), - .flags = CLOCK_SOURCE_IS_CONTINUOUS, + .flags = CLOCK_SOURCE_IS_CONTINUOUS | CLOCK_SOURCE_SCHED_CLOCK, }; /* - * Overwrite weak default sched_clock with something more precise - */ -unsigned long long notrace sched_clock(void) -{ - const cycle_t cyc = clocksource_davinci.read(&clocksource_davinci); - - return clocksource_cyc2ns(cyc, clocksource_davinci.mult, - clocksource_davinci.shift); -} - -/* * clockevent */ static int davinci_set_next_event(unsigned long cycles, @@ -397,7 +376,6 @@ static void __init davinci_timer_init(vo davinci_clock_tick_rate = clk_get_rate(timer_clk); /* setup clocksource */ - clocksource_davinci.read = read_cycles; clocksource_davinci.name = id_to_name[clocksource_id]; if (clocksource_register_hz(&clocksource_davinci, davinci_clock_tick_rate))