Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

parisc: use legacy_timer_tick

parisc has selected CONFIG_GENERIC_CLOCKEVENTS since commit 43b1f6abd590
("parisc: Switch to generic sched_clock implementation"), but does not
appear to actually be using it, and instead calls the low-level
timekeeping functions directly.

Remove the GENERIC_CLOCKEVENTS select again, and instead convert to
the newly added legacy_timer_tick() helper.

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>

+5 -8
+1 -1
Documentation/features/time/clockevents/arch-support.txt
··· 21 21 | nds32: | ok | 22 22 | nios2: | ok | 23 23 | openrisc: | ok | 24 - | parisc: | ok | 24 + | parisc: | TODO | 25 25 | powerpc: | ok | 26 26 | riscv: | ok | 27 27 | s390: | ok |
+1 -1
arch/parisc/Kconfig
··· 52 52 select HAVE_REGS_AND_STACK_ACCESS_API 53 53 select GENERIC_SCHED_CLOCK 54 54 select HAVE_UNSTABLE_SCHED_CLOCK if SMP 55 - select GENERIC_CLOCKEVENTS 55 + select LEGACY_TIMER_TICK 56 56 select CPU_NO_EFFICIENT_FFS 57 57 select NEED_DMA_MAP_STATE 58 58 select NEED_SG_DMA_LENGTH
+3 -6
arch/parisc/kernel/time.c
··· 70 70 /* gcc can optimize for "read-only" case with a local clocktick */ 71 71 unsigned long cpt = clocktick; 72 72 73 - profile_tick(CPU_PROFILING); 74 - 75 73 /* Initialize next_tick to the old expected tick time. */ 76 74 next_tick = cpuinfo->it_value; 77 75 ··· 84 86 cpuinfo->it_value = next_tick; 85 87 86 88 /* Go do system house keeping. */ 87 - if (cpu == 0) 88 - xtime_update(ticks_elapsed); 89 - 90 - update_process_times(user_mode(get_irq_regs())); 89 + if (cpu != 0) 90 + ticks_elapsed = 0; 91 + legacy_timer_tick(ticks_elapsed); 91 92 92 93 /* Skip clockticks on purpose if we know we would miss those. 93 94 * The new CR16 must be "later" than current CR16 otherwise