1 // SPDX-License-Identifier: GPL-2.0
3 * Timer tick function for architectures that lack generic clockevents,
4 * consolidated here from m68k/ia64/parisc/arm.
8 #include <linux/profile.h>
9 #include <linux/timekeeper_internal.h>
11 #include "tick-internal.h"
14 * legacy_timer_tick() - advances the timekeeping infrastructure
15 * @ticks: number of ticks, that have elapsed since the last call.
17 * This is used by platforms that have not been converted to
18 * generic clockevents.
20 * If 'ticks' is zero, the CPU is not handling timekeeping, so
21 * only perform process accounting and profiling.
23 * Must be called with interrupts disabled.
25 void legacy_timer_tick(unsigned long ticks)
28 raw_spin_lock(&jiffies_lock);
29 write_seqcount_begin(&jiffies_seq);
31 write_seqcount_end(&jiffies_seq);
32 raw_spin_unlock(&jiffies_lock);
35 update_process_times(user_mode(get_irq_regs()));
36 profile_tick(CPU_PROFILING);