1 /* SPDX-License-Identifier: GPL-2.0 */
2 #include <linux/compiler.h>
3 #if defined(__i386__) || defined(__x86_64__)
4 #include "../../arch/x86/include/asm/barrier.h"
6 #include "../../arch/arm/include/asm/barrier.h"
7 #elif defined(__aarch64__)
8 #include "../../arch/arm64/include/asm/barrier.h"
9 #elif defined(__powerpc__)
10 #include "../../arch/powerpc/include/asm/barrier.h"
11 #elif defined(__s390__)
12 #include "../../arch/s390/include/asm/barrier.h"
14 #include "../../arch/sh/include/asm/barrier.h"
15 #elif defined(__sparc__)
16 #include "../../arch/sparc/include/asm/barrier.h"
17 #elif defined(__tile__)
18 #include "../../arch/tile/include/asm/barrier.h"
19 #elif defined(__alpha__)
20 #include "../../arch/alpha/include/asm/barrier.h"
21 #elif defined(__mips__)
22 #include "../../arch/mips/include/asm/barrier.h"
23 #elif defined(__ia64__)
24 #include "../../arch/ia64/include/asm/barrier.h"
25 #elif defined(__xtensa__)
26 #include "../../arch/xtensa/include/asm/barrier.h"
27 #elif defined(__nds32__)
28 #include "../../arch/nds32/include/asm/barrier.h"
30 #include <asm-generic/barrier.h>
34 * Generic fallback smp_*() definitions for archs that haven't
39 # define smp_rmb() rmb()
43 # define smp_wmb() wmb()
47 # define smp_mb() mb()
50 #ifndef smp_store_release
51 # define smp_store_release(p, v) \
58 #ifndef smp_load_acquire
59 # define smp_load_acquire(p) \
61 typeof(*p) ___p1 = READ_ONCE(*p); \