Signed-off-by: Thomas Gleixner --- arch/arm/mach-sa1100/time.c | 35 +++-------------------------------- 1 file changed, 3 insertions(+), 32 deletions(-) Index: linux-2.6-tip/arch/arm/mach-sa1100/time.c =================================================================== --- linux-2.6-tip.orig/arch/arm/mach-sa1100/time.c +++ linux-2.6-tip/arch/arm/mach-sa1100/time.c @@ -12,38 +12,12 @@ #include #include #include -#include /* just for sched_clock() - funny that */ #include #include #include -#include -#include - -/* - * This is the SA11x0 sched_clock implementation. - */ -static DEFINE_CLOCK_DATA(cd); - -/* - * Constants generated by clocks_calc_mult_shift(m, s, 3.6864MHz, - * NSEC_PER_SEC, 60). - * This gives a resolution of about 271ns and a wrap period of about 19min. - */ -#define SC_MULT 2275555556u -#define SC_SHIFT 23 - -unsigned long long notrace sched_clock(void) -{ - u32 cyc = OSCR; - return cyc_to_fixed_sched_clock(&cd, cyc, (u32)~0, SC_MULT, SC_SHIFT); -} -static void notrace sa1100_update_sched_clock(void) -{ - u32 cyc = OSCR; - update_sched_clock(&cd, cyc, (u32)~0); -} +#include #define MIN_OSCR_DELTA 2 @@ -98,7 +72,7 @@ static struct clock_event_device ckevt_s .set_mode = sa1100_osmr0_set_mode, }; -static cycle_t sa1100_read_oscr(struct clocksource *s) +static cycle_t notrace sa1100_read_oscr(struct clocksource *s) { return OSCR; } @@ -108,7 +82,7 @@ static struct clocksource cksrc_sa1100_o .rating = 200, .read = sa1100_read_oscr, .mask = CLOCKSOURCE_MASK(32), - .flags = CLOCK_SOURCE_IS_CONTINUOUS, + .flags = CLOCK_SOURCE_IS_CONTINUOUS | CLOCK_SOURCE_SCHED_CLOCK, }; static struct irqaction sa1100_timer_irq = { @@ -123,9 +97,6 @@ static void __init sa1100_timer_init(voi OIER = 0; /* disable any timer interrupts */ OSSR = 0xf; /* clear status on all timers */ - init_fixed_sched_clock(&cd, sa1100_update_sched_clock, 32, - 3686400, SC_MULT, SC_SHIFT); - ckevt_sa1100_osmr0.mult = div_sc(3686400, NSEC_PER_SEC, ckevt_sa1100_osmr0.shift); ckevt_sa1100_osmr0.max_delta_ns =