Peter Zijlstra 5c5e9a2b25 x86/tsc: Provide sched_clock_noinstr()
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 providing a noinstr sched_clock_noinstr()
function.

Specifically, preempt_enable_*() calls out to schedule(), which upsets
noinstr validation efforts.

  vmlinux.o: warning: objtool: native_sched_clock+0x96: call to preempt_schedule_notrace_thunk() leaves .noinstr.text section
  vmlinux.o: warning: objtool: kvm_clock_read+0x22: call to preempt_schedule_notrace_thunk() leaves .noinstr.text section

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.910937674@infradead.org
2023-06-05 21:11:08 +02:00
..
2023-05-05 12:56:55 -07:00
2023-05-05 12:56:55 -07:00
2023-05-05 12:56:55 -07:00
2023-05-04 12:25:05 -07:00
2023-05-05 12:56:55 -07:00
2023-05-05 12:56:55 -07:00
2023-05-05 12:56:55 -07:00
2023-05-05 12:56:55 -07:00
2023-05-05 12:56:55 -07:00
2023-05-05 12:56:55 -07:00
2023-05-05 12:56:55 -07:00
2023-05-05 12:56:55 -07:00
2023-05-05 12:56:55 -07:00
2023-05-05 12:56:55 -07:00
2023-05-05 12:56:55 -07:00