X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=arch%2Fparisc%2Fkernel%2Ftime.c;h=24be86bba94d6bdf93618109bb490bf6fbe68205;hb=c203e45f069af47ca7623e4dcd8c00bfba2722e4;hp=5cbc286cd08618e5159243d9c8b6b634c441c4db;hpb=00d1f3c31a415bb3701abbd3a2c2aa44cb97116c;p=linux-2.6 diff --git a/arch/parisc/kernel/time.c b/arch/parisc/kernel/time.c index 5cbc286cd0..24be86bba9 100644 --- a/arch/parisc/kernel/time.c +++ b/arch/parisc/kernel/time.c @@ -176,8 +176,6 @@ static cycle_t read_cr16(void) return get_cycles(); } -static int cr16_update_callback(void); - static struct clocksource clocksource_cr16 = { .name = "cr16", .rating = 300, @@ -185,24 +183,27 @@ static struct clocksource clocksource_cr16 = { .mask = CLOCKSOURCE_MASK(BITS_PER_LONG), .mult = 0, /* to be set */ .shift = 22, - .update_callback = cr16_update_callback, - .is_continuous = 1, + .flags = CLOCK_SOURCE_IS_CONTINUOUS, }; -static int cr16_update_callback(void) +#ifdef CONFIG_SMP +int update_cr16_clocksource(void) { - int change = 0; - - /* since the cr16 cycle counters are not syncronized across CPUs, + /* since the cr16 cycle counters are not synchronized across CPUs, we'll check if we should switch to a safe clocksource: */ if (clocksource_cr16.rating != 0 && num_online_cpus() > 1) { clocksource_change_rating(&clocksource_cr16, 0); - change = 1; + return 1; } - return change; + return 0; } - +#else +int update_cr16_clocksource(void) +{ + return 0; /* no change */ +} +#endif /*CONFIG_SMP*/ void __init start_cpu_itimer(void) {