~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/tools/include/asm/barrier.h

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  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"
  5 #elif defined(__arm__)
  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"
 13 #elif defined(__sh__)
 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 #else
 28 #include <asm-generic/barrier.h>
 29 #endif
 30 
 31 /*
 32  * Generic fallback smp_*() definitions for archs that haven't
 33  * been updated yet.
 34  */
 35 
 36 #ifndef smp_rmb
 37 # define smp_rmb()      rmb()
 38 #endif
 39 
 40 #ifndef smp_wmb
 41 # define smp_wmb()      wmb()
 42 #endif
 43 
 44 #ifndef smp_mb
 45 # define smp_mb()       mb()
 46 #endif
 47 
 48 #ifndef smp_store_release
 49 # define smp_store_release(p, v)                \
 50 do {                                            \
 51         smp_mb();                               \
 52         WRITE_ONCE(*p, v);                      \
 53 } while (0)
 54 #endif
 55 
 56 #ifndef smp_load_acquire
 57 # define smp_load_acquire(p)                    \
 58 ({                                              \
 59         typeof(*p) ___p1 = READ_ONCE(*p);       \
 60         smp_mb();                               \
 61         ___p1;                                  \
 62 })
 63 #endif
 64 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php