xref: /linux/arch/arm/include/asm/vdso/processor.h (revision ead5d1f4d877e92c051e1a1ade623d0d30e71619)
1*78c85161SVincenzo Frascino /* SPDX-License-Identifier: GPL-2.0-only */
2*78c85161SVincenzo Frascino /*
3*78c85161SVincenzo Frascino  * Copyright (C) 2020 ARM Ltd.
4*78c85161SVincenzo Frascino  */
5*78c85161SVincenzo Frascino #ifndef __ASM_VDSO_PROCESSOR_H
6*78c85161SVincenzo Frascino #define __ASM_VDSO_PROCESSOR_H
7*78c85161SVincenzo Frascino 
8*78c85161SVincenzo Frascino #ifndef __ASSEMBLY__
9*78c85161SVincenzo Frascino 
10*78c85161SVincenzo Frascino #if __LINUX_ARM_ARCH__ == 6 || defined(CONFIG_ARM_ERRATA_754327)
11*78c85161SVincenzo Frascino #define cpu_relax()						\
12*78c85161SVincenzo Frascino 	do {							\
13*78c85161SVincenzo Frascino 		smp_mb();					\
14*78c85161SVincenzo Frascino 		__asm__ __volatile__("nop; nop; nop; nop; nop; nop; nop; nop; nop; nop;");	\
15*78c85161SVincenzo Frascino 	} while (0)
16*78c85161SVincenzo Frascino #else
17*78c85161SVincenzo Frascino #define cpu_relax()			barrier()
18*78c85161SVincenzo Frascino #endif
19*78c85161SVincenzo Frascino 
20*78c85161SVincenzo Frascino #endif /* __ASSEMBLY__ */
21*78c85161SVincenzo Frascino 
22*78c85161SVincenzo Frascino #endif /* __ASM_VDSO_PROCESSOR_H */
23