162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-only */ 262306a36Sopenharmony_ci/* 362306a36Sopenharmony_ci * Copyright (C) 2020 ARM Ltd. 462306a36Sopenharmony_ci */ 562306a36Sopenharmony_ci#ifndef __ASM_VDSO_PROCESSOR_H 662306a36Sopenharmony_ci#define __ASM_VDSO_PROCESSOR_H 762306a36Sopenharmony_ci 862306a36Sopenharmony_ci#ifndef __ASSEMBLY__ 962306a36Sopenharmony_ci 1062306a36Sopenharmony_ci#if __LINUX_ARM_ARCH__ == 6 || defined(CONFIG_ARM_ERRATA_754327) 1162306a36Sopenharmony_ci#define cpu_relax() \ 1262306a36Sopenharmony_ci do { \ 1362306a36Sopenharmony_ci smp_mb(); \ 1462306a36Sopenharmony_ci __asm__ __volatile__("nop; nop; nop; nop; nop; nop; nop; nop; nop; nop;"); \ 1562306a36Sopenharmony_ci } while (0) 1662306a36Sopenharmony_ci#else 1762306a36Sopenharmony_ci#define cpu_relax() barrier() 1862306a36Sopenharmony_ci#endif 1962306a36Sopenharmony_ci 2062306a36Sopenharmony_ci#endif /* __ASSEMBLY__ */ 2162306a36Sopenharmony_ci 2262306a36Sopenharmony_ci#endif /* __ASM_VDSO_PROCESSOR_H */ 23