···9393 for (;;) {9494 if (!clockevents_program_event(dev, next, ktime_get()))9595 return;9696- tick_periodic(cpu);9696+ /*9797+ * Have to be careful here. If we're in oneshot mode,9898+ * before we call tick_periodic() in a loop, we need9999+ * to be sure we're using a real hardware clocksource.100100+ * Otherwise we could get trapped in an infinite101101+ * loop, as the tick_periodic() increments jiffies,102102+ * when then will increment time, posibly causing103103+ * the loop to trigger again and again.104104+ */105105+ if (timekeeping_valid_for_hres())106106+ tick_periodic(cpu);97107 next = ktime_add(next, tick_period);98108 }99109}