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 7 static 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 */ 20