mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 14:20:55 +07:00
Revert "tick/common: Make tick_periodic() check for missing ticks"
This reverts commit d441dceb5d
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>
This commit is contained in:
parent
2c8bd58812
commit
52da479a9a
@ -16,7 +16,6 @@
|
||||
#include <linux/profile.h>
|
||||
#include <linux/sched.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/sched/clock.h>
|
||||
#include <trace/events/power.h>
|
||||
|
||||
#include <asm/irq_regs.h>
|
||||
@ -85,41 +84,12 @@ int tick_is_oneshot_available(void)
|
||||
static void tick_periodic(int cpu)
|
||||
{
|
||||
if (tick_do_timer_cpu == cpu) {
|
||||
/*
|
||||
* Use running_clock() as reference to check for missing ticks.
|
||||
*/
|
||||
static ktime_t last_update;
|
||||
ktime_t now;
|
||||
int ticks = 1;
|
||||
|
||||
now = ns_to_ktime(running_clock());
|
||||
write_seqlock(&jiffies_lock);
|
||||
|
||||
if (last_update) {
|
||||
u64 delta = ktime_sub(now, last_update);
|
||||
|
||||
/*
|
||||
* Check for eventually missed ticks
|
||||
*
|
||||
* There is likely a persistent delta between
|
||||
* last_update and tick_next_period. So they are
|
||||
* updated separately.
|
||||
*/
|
||||
if (delta >= 2 * tick_period) {
|
||||
s64 period = ktime_to_ns(tick_period);
|
||||
|
||||
ticks = ktime_divns(delta, period);
|
||||
}
|
||||
last_update = ktime_add(last_update,
|
||||
ticks * tick_period);
|
||||
} else {
|
||||
last_update = now;
|
||||
}
|
||||
|
||||
/* Keep track of the next tick event */
|
||||
tick_next_period = ktime_add(tick_next_period,
|
||||
ticks * tick_period);
|
||||
do_timer(ticks);
|
||||
tick_next_period = ktime_add(tick_next_period, tick_period);
|
||||
|
||||
do_timer(1);
|
||||
write_sequnlock(&jiffies_lock);
|
||||
update_wall_time();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user