]> git.baikalelectronics.ru Git - kernel.git/commit
x86/vdso: Move VDSO clocksource state tracking to callback
authorThomas Gleixner <tglx@linutronix.de>
Fri, 7 Feb 2020 12:38:54 +0000 (13:38 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Mon, 17 Feb 2020 13:40:22 +0000 (14:40 +0100)
commitf190fc2c147e3241ed84ac71b017cd43356b5478
tree2ad42d36c099f2ec9b7eceff537281d0bad7c690
parent57f23a95e7e1452a13774dd6771a942fa9fc09bc
x86/vdso: Move VDSO clocksource state tracking to callback

All architectures which use the generic VDSO code have their own storage
for the VDSO clock mode. That's pointless and just requires duplicate code.

X86 abuses the function which retrieves the architecture specific clock
mode storage to mark the clocksource as used in the VDSO. That's silly
because this is invoked on every tick when the VDSO data is updated.

Move this functionality to the clocksource::enable() callback so it gets
invoked once when the clocksource is installed. This allows to make the
clock mode storage generic.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Michael Kelley <mikelley@microsoft.com> (Hyper-V parts)
Reviewed-by: Vincenzo Frascino <vincenzo.frascino@arm.com> (VDSO parts)
Acked-by: Juergen Gross <jgross@suse.com> (Xen parts)
Link: https://lkml.kernel.org/r/20200207124402.934519777@linutronix.de
arch/x86/entry/vdso/vma.c
arch/x86/include/asm/clocksource.h
arch/x86/include/asm/mshyperv.h
arch/x86/include/asm/vdso/vsyscall.h
arch/x86/include/asm/vgtod.h
arch/x86/kernel/kvmclock.c
arch/x86/kernel/tsc.c
arch/x86/xen/time.c
drivers/clocksource/hyperv_timer.c