sched/clock/x86: Mark sched_clock() noinstr
authorPeter Zijlstra <peterz@infradead.org>
Thu, 26 Jan 2023 15:08:36 +0000 (16:08 +0100)
committerIngo Molnar <mingo@kernel.org>
Tue, 31 Jan 2023 14:01:47 +0000 (15:01 +0100)
commit8739c6811572b087decd561f96382087402cc343
tree60330c4df92998fd1994afa131ebab2b24ca67b2
parent5c9da9fe826d4a0d84bb322cca27cc8ad8d23b24
sched/clock/x86: Mark sched_clock() noinstr

In order to use sched_clock() from noinstr code, mark it and all it's
implenentations noinstr.

The whole pvclock thing (used by KVM/Xen) is a bit of a pain,
since it calls out to watchdogs, create a
pvclock_clocksource_read_nowd() variant doesn't do that and can be
noinstr.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://lore.kernel.org/r/20230126151323.702003578@infradead.org
arch/x86/include/asm/kvmclock.h
arch/x86/include/asm/paravirt.h
arch/x86/include/asm/pvclock.h
arch/x86/kernel/cpu/vmware.c
arch/x86/kernel/kvmclock.c
arch/x86/kernel/pvclock.c
arch/x86/kernel/tsc.c
arch/x86/xen/time.c
include/linux/math64.h