clocksource: hyper-v: Provide noinstr sched_clock()
authorPeter Zijlstra <peterz@infradead.org>
Fri, 19 May 2023 10:21:08 +0000 (12:21 +0200)
committerPeter Zijlstra <peterz@infradead.org>
Mon, 5 Jun 2023 19:11:08 +0000 (21:11 +0200)
commite39acc37db34f6688e2c16e958fb1d662c422c81
treeeceb7d6b799562d0c1e35f4e4e0b9d2f7d8ca819
parent9397fa2ea3e7634f61da1ab76b9eb88ba04dfdfc
clocksource: hyper-v: Provide noinstr sched_clock()

With the intent to provide local_clock_noinstr(), a variant of
local_clock() that's safe to be called from noinstr code (with the
assumption that any such code will already be non-preemptible),
prepare for things by making the Hyper-V TSC and MSR sched_clock
implementations noinstr.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Co-developed-by: Michael Kelley <mikelley@microsoft.com>
Signed-off-by: Michael Kelley <mikelley@microsoft.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Tested-by: Michael Kelley <mikelley@microsoft.com> # Hyper-V
Link: https://lore.kernel.org/r/20230519102715.843039089@infradead.org
arch/x86/include/asm/mshyperv.h
drivers/clocksource/hyperv_timer.c