1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Copyright (C) 2020 ARM Ltd.
5 #ifndef __ASM_VDSO_PROCESSOR_H
6 #define __ASM_VDSO_PROCESSOR_H
10 #ifdef CONFIG_CPU_LOONGSON64
12 * Loongson-3's SFB (Store-Fill-Buffer) may buffer writes indefinitely when a
13 * tight read loop is executed, because reads take priority over writes & the
14 * hardware (incorrectly) doesn't ensure that writes will eventually occur.
16 * Since spin loops of any kind should have a cpu_relax() in them, force an SFB
17 * flush from cpu_relax() such that any pending writes will become visible as
20 #define cpu_relax() smp_mb()
22 #define cpu_relax() barrier()
25 #endif /* __ASSEMBLY__ */
27 #endif /* __ASM_VDSO_PROCESSOR_H */