diff options
author | Peter Zijlstra <peterz@infradead.org> | 2023-05-19 13:21:03 +0300 |
---|---|---|
committer | Peter Zijlstra <peterz@infradead.org> | 2023-06-05 22:11:05 +0300 |
commit | 6b10fef09f937433563822f4bb6a2f947176e5a0 (patch) | |
tree | c5bf17399eab7cff762dc0d0e15a0045723eb7a6 /arch/loongarch/include | |
parent | 24ee7607b286b44a5112ced38652df14cd80d5e2 (diff) | |
download | linux-6b10fef09f937433563822f4bb6a2f947176e5a0.tar.xz |
loongarch: Provide noinstr sched_clock_read()
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: 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
Diffstat (limited to 'arch/loongarch/include')
-rw-r--r-- | arch/loongarch/include/asm/loongarch.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/loongarch/include/asm/loongarch.h b/arch/loongarch/include/asm/loongarch.h index b3323ab5b78d..357ef701e7d7 100644 --- a/arch/loongarch/include/asm/loongarch.h +++ b/arch/loongarch/include/asm/loongarch.h @@ -1167,7 +1167,7 @@ static __always_inline void iocsr_write64(u64 val, u32 reg) #ifndef __ASSEMBLY__ -static inline u64 drdtime(void) +static __always_inline u64 drdtime(void) { int rID = 0; u64 val = 0; |