parisc: Mark sched_clock unstable only if clocks are not syncronized
[linux-2.6-microblaze.git] / arch / parisc / kernel / time.c
index 13d94f0..9fb1e79 100644 (file)
@@ -70,8 +70,6 @@ irqreturn_t __irq_entry timer_interrupt(int irq, void *dev_id)
        /* gcc can optimize for "read-only" case with a local clocktick */
        unsigned long cpt = clocktick;
 
-       profile_tick(CPU_PROFILING);
-
        /* Initialize next_tick to the old expected tick time. */
        next_tick = cpuinfo->it_value;
 
@@ -86,10 +84,9 @@ irqreturn_t __irq_entry timer_interrupt(int irq, void *dev_id)
        cpuinfo->it_value = next_tick;
 
        /* Go do system house keeping. */
-       if (cpu == 0)
-               xtime_update(ticks_elapsed);
-
-       update_process_times(user_mode(get_irq_regs()));
+       if (cpu != 0)
+               ticks_elapsed = 0;
+       legacy_timer_tick(ticks_elapsed);
 
        /* Skip clockticks on purpose if we know we would miss those.
         * The new CR16 must be "later" than current CR16 otherwise
@@ -268,6 +265,9 @@ static int __init init_cr16_clocksource(void)
                            (cpu0_loc == per_cpu(cpu_data, cpu).cpu_loc))
                                continue;
 
+                       /* mark sched_clock unstable */
+                       clear_sched_clock_stable();
+
                        clocksource_cr16.name = "cr16_unstable";
                        clocksource_cr16.flags = CLOCK_SOURCE_UNSTABLE;
                        clocksource_cr16.rating = 0;
@@ -275,10 +275,6 @@ static int __init init_cr16_clocksource(void)
                }
        }
 
-       /* XXX: We may want to mark sched_clock stable here if cr16 clocks are
-        *      in sync:
-        *      (clocksource_cr16.flags == CLOCK_SOURCE_IS_CONTINUOUS) */
-
        /* register at clocksource framework */
        clocksource_register_hz(&clocksource_cr16,
                100 * PAGE0->mem_10msec);