loongarch: Provide noinstr sched_clock_read()
mainline inclusion from mainline-v6.5-rc1 commit 6b10fef0 category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I7MWTU CVE: NA -------------------------------- 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_read() function. Specifically, preempt_enable_*() calls out to schedule(), which upsets noinstr validation efforts. Signed-off-by:Yongzhen Zhang <zhangyongzhen@kylinos.cn> 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.502547082@infradead.org
Loading
Please sign in to comment