Signed-off-by: Thomas Gleixner --- arch/arm/mach-tegra/timer.c | 29 ++--------------------------- 1 file changed, 2 insertions(+), 27 deletions(-) Index: linux-2.6-tip/arch/arm/mach-tegra/timer.c =================================================================== --- linux-2.6-tip.orig/arch/arm/mach-tegra/timer.c +++ linux-2.6-tip/arch/arm/mach-tegra/timer.c @@ -30,7 +30,6 @@ #include #include -#include #include #include @@ -98,7 +97,7 @@ static void tegra_timer_set_mode(enum cl } } -static cycle_t tegra_clocksource_read(struct clocksource *cs) +static cycle_t notrace tegra_clocksource_read(struct clocksource *cs) { return timer_readl(TIMERUS_CNTR_1US); } @@ -116,30 +115,9 @@ static struct clocksource tegra_clocksou .rating = 300, .read = tegra_clocksource_read, .mask = CLOCKSOURCE_MASK(32), - .flags = CLOCK_SOURCE_IS_CONTINUOUS, + .flags = CLOCK_SOURCE_IS_CONTINUOUS | CLOCK_SOURCE_SCHED_CLOCK, }; -static DEFINE_CLOCK_DATA(cd); - -/* - * Constants generated by clocks_calc_mult_shift(m, s, 1MHz, NSEC_PER_SEC, 60). - * This gives a resolution of about 1us and a wrap period of about 1h11min. - */ -#define SC_MULT 4194304000u -#define SC_SHIFT 22 - -unsigned long long notrace sched_clock(void) -{ - u32 cyc = timer_readl(TIMERUS_CNTR_1US); - return cyc_to_fixed_sched_clock(&cd, cyc, (u32)~0, SC_MULT, SC_SHIFT); -} - -static void notrace tegra_update_sched_clock(void) -{ - u32 cyc = timer_readl(TIMERUS_CNTR_1US); - update_sched_clock(&cd, cyc, (u32)~0); -} - /* * tegra_rtc_read - Reads the Tegra RTC registers * Care must be taken that this funciton is not called while the @@ -231,9 +209,6 @@ static void __init tegra_init_timer(void WARN(1, "Unknown clock rate"); } - init_fixed_sched_clock(&cd, tegra_update_sched_clock, 32, - 1000000, SC_MULT, SC_SHIFT); - if (clocksource_register_hz(&tegra_clocksource, 1000000)) { printk(KERN_ERR "Failed to register clocksource\n"); BUG();