1 /* SPDX-License-Identifier: GPL-2.0-only */
2 #ifndef __ASM_VDSO_PROCESSOR_H
3 #define __ASM_VDSO_PROCESSOR_H
7 #include <asm/barrier.h>
9 static inline void cpu_relax(void)
13 /* In lieu of a halt instruction, induce a long-latency stall. */
14 __asm__ __volatile__ ("div %0, %0, zero" : "=r" (dummy));
17 * Reduce instruction retirement.
18 * This assumes the PC changes.
20 #ifdef __riscv_zihintpause
21 __asm__ __volatile__ ("pause");
23 /* Encoding of the pause instruction */
24 __asm__ __volatile__ (".4byte 0x100000F");
29 #endif /* __ASSEMBLY__ */
31 #endif /* __ASM_VDSO_PROCESSOR_H */