Merge tag 'linux-kselftest-kunit-fixes-5.11-rc3' of git://git.kernel.org/pub/scm...
[linux/fpc-iii.git] / arch / riscv / include / asm / vdso / processor.h
blob134388cbaaa1d3ba1bdc5c5b7a765327006c1732
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 #ifndef __ASM_VDSO_PROCESSOR_H
3 #define __ASM_VDSO_PROCESSOR_H
5 #ifndef __ASSEMBLY__
7 #include <asm/barrier.h>
9 static inline void cpu_relax(void)
11 #ifdef __riscv_muldiv
12 int dummy;
13 /* In lieu of a halt instruction, induce a long-latency stall. */
14 __asm__ __volatile__ ("div %0, %0, zero" : "=r" (dummy));
15 #endif
16 barrier();
19 #endif /* __ASSEMBLY__ */
21 #endif /* __ASM_VDSO_PROCESSOR_H */