Skip to content

Commit 52da479

Browse files
committed
Revert "tick/common: Make tick_periodic() check for missing ticks"
This reverts commit d441dce due to boot failures. Reported-by: Qian Cai <cai@lca.pw> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Waiman Long <longman@redhat.com>
1 parent 2c8bd58 commit 52da479

1 file changed

Lines changed: 3 additions & 33 deletions

File tree

‎kernel/time/tick-common.c‎

Lines changed: 3 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
#include <linux/profile.h>
1717
#include <linux/sched.h>
1818
#include <linux/module.h>
19-
#include <linux/sched/clock.h>
2019
#include <trace/events/power.h>
2120

2221
#include <asm/irq_regs.h>
@@ -85,41 +84,12 @@ int tick_is_oneshot_available(void)
8584
static void tick_periodic(int cpu)
8685
{
8786
if (tick_do_timer_cpu == cpu) {
88-
/*
89-
* Use running_clock() as reference to check for missing ticks.
90-
*/
91-
static ktime_t last_update;
92-
ktime_t now;
93-
int ticks = 1;
94-
95-
now = ns_to_ktime(running_clock());
9687
write_seqlock(&jiffies_lock);
9788

98-
if (last_update) {
99-
u64 delta = ktime_sub(now, last_update);
100-
101-
/*
102-
* Check for eventually missed ticks
103-
*
104-
* There is likely a persistent delta between
105-
* last_update and tick_next_period. So they are
106-
* updated separately.
107-
*/
108-
if (delta >= 2 * tick_period) {
109-
s64 period = ktime_to_ns(tick_period);
110-
111-
ticks = ktime_divns(delta, period);
112-
}
113-
last_update = ktime_add(last_update,
114-
ticks * tick_period);
115-
} else {
116-
last_update = now;
117-
}
118-
11989
/* Keep track of the next tick event */
120-
tick_next_period = ktime_add(tick_next_period,
121-
ticks * tick_period);
122-
do_timer(ticks);
90+
tick_next_period = ktime_add(tick_next_period, tick_period);
91+
92+
do_timer(1);
12393
write_sequnlock(&jiffies_lock);
12494
update_wall_time();
12595
}

0 commit comments

Comments
 (0)