[PATCH] simplify update_times (avoid jiffies/jiffies_64 aliasing problem)
[firefly-linux-kernel-4.4.55.git] / arch / x86_64 / kernel / time.c
index 1c255ee76e7c81870768f54adc9a5fe149dc0239..7ea3bf2a858c6299c1c686fc0530b1da14bbef63 100644 (file)
@@ -415,16 +415,16 @@ void main_timer_handler(struct pt_regs *regs)
                                (((long) offset << US_SCALE) / vxtime.tsc_quot) - 1;
        }
 
-       if (lost > 0) {
+       if (lost > 0)
                handle_lost_ticks(lost, regs);
-               jiffies += lost;
-       }
+       else
+               lost = 0;
 
 /*
  * Do the timer stuff.
  */
 
-       do_timer(regs);
+       do_timer(lost + 1);
 #ifndef CONFIG_SMP
        update_process_times(user_mode(regs));
 #endif