Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6
[deliverable/linux.git] / kernel / time / clocksource.c
index 093d4acf993b73fde0d575a4e29b06db88935942..ca89e1593f0833840fbbcaf58ba5bb5b075362e2 100644 (file)
@@ -145,10 +145,11 @@ static void clocksource_watchdog(unsigned long data)
                 * Cycle through CPUs to check if the CPUs stay
                 * synchronized to each other.
                 */
-               int next_cpu = next_cpu_nr(raw_smp_processor_id(), cpu_online_map);
+               int next_cpu = cpumask_next(raw_smp_processor_id(),
+                                           cpu_online_mask);
 
                if (next_cpu >= nr_cpu_ids)
-                       next_cpu = first_cpu(cpu_online_map);
+                       next_cpu = cpumask_first(cpu_online_mask);
                watchdog_timer.expires += WATCHDOG_INTERVAL;
                add_timer_on(&watchdog_timer, next_cpu);
        }
@@ -173,7 +174,7 @@ static void clocksource_check_watchdog(struct clocksource *cs)
                        watchdog_last = watchdog->read();
                        watchdog_timer.expires = jiffies + WATCHDOG_INTERVAL;
                        add_timer_on(&watchdog_timer,
-                                    first_cpu(cpu_online_map));
+                                    cpumask_first(cpu_online_mask));
                }
        } else {
                if (cs->flags & CLOCK_SOURCE_IS_CONTINUOUS)
@@ -195,7 +196,7 @@ static void clocksource_check_watchdog(struct clocksource *cs)
                                watchdog_timer.expires =
                                        jiffies + WATCHDOG_INTERVAL;
                                add_timer_on(&watchdog_timer,
-                                            first_cpu(cpu_online_map));
+                                            cpumask_first(cpu_online_mask));
                        }
                }
        }
@@ -325,6 +326,9 @@ int clocksource_register(struct clocksource *c)
        unsigned long flags;
        int ret;
 
+       /* save mult_orig on registration */
+       c->mult_orig = c->mult;
+
        spin_lock_irqsave(&clocksource_lock, flags);
        ret = clocksource_enqueue(c);
        if (!ret)
This page took 0.027593 seconds and 5 git commands to generate.