Linux kernel mirror (for testing)
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel
os
linux
1/* SPDX-License-Identifier: GPL-2.0-only */
2#ifndef __ASM_VDSO_PROCESSOR_H
3#define __ASM_VDSO_PROCESSOR_H
4
5#ifndef __ASSEMBLY__
6
7static inline void cpu_relax(void)
8{
9#ifdef __riscv_muldiv
10 int dummy;
11 /* In lieu of a halt instruction, induce a long-latency stall. */
12 __asm__ __volatile__ ("div %0, %0, zero" : "=r" (dummy));
13#endif
14 barrier();
15}
16
17#endif /* __ASSEMBLY__ */
18
19#endif /* __ASM_VDSO_PROCESSOR_H */