1 // SPDX-FileCopyrightText: 2010 Paul E. McKenney, IBM Corporation.
2 // SPDX-FileCopyrightText: 2009 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
4 // SPDX-License-Identifier: LGPL-2.1-or-later
6 #ifndef _URCU_ARCH_ARM_H
7 #define _URCU_ARCH_ARM_H
10 * arch_arm.h: trivial definitions for the ARM architecture.
13 #include <urcu/compiler.h>
14 #include <urcu/config.h>
15 #include <urcu/syscall-compat.h>
22 * Using DMB is faster than the builtin __sync_synchronize and this instruction is
23 * part of the baseline ARMv7 ISA.
25 #ifdef URCU_ARCH_ARMV7
27 /* For backwards compat. */
28 #define CONFIG_RCU_ARM_HAVE_DMB 1
31 * Issues full system DMB operation.
33 #define cmm_mb() __asm__ __volatile__ ("dmb sy":::"memory")
34 #define cmm_rmb() __asm__ __volatile__ ("dmb sy":::"memory")
35 #define cmm_wmb() __asm__ __volatile__ ("dmb sy":::"memory")
38 * Issues DMB operation only to the inner shareable domain.
40 #define cmm_smp_mb() __asm__ __volatile__ ("dmb ish":::"memory")
41 #define cmm_smp_rmb() __asm__ __volatile__ ("dmb ish":::"memory")
42 #define cmm_smp_wmb() __asm__ __volatile__ ("dmb ish":::"memory")
44 #endif /* URCU_ARCH_ARMV7 */
50 * On Linux, define the membarrier system call number if not yet available in
53 #if (defined(__linux__) && !defined(__NR_membarrier))
54 #define __NR_membarrier 389
58 * Error out for compilers with known bugs.
62 * http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58854
64 #ifdef URCU_GCC_VERSION
65 # if URCU_GCC_VERSION >= 40800 && URCU_GCC_VERSION <= 40802
66 # error Your gcc version produces clobbered frame accesses
71 * https://gcc.gnu.org/bugzilla/show_bug.cgi?id=42263
73 #ifdef URCU_GCC_VERSION
74 # if URCU_GCC_VERSION >= 40400 && URCU_GCC_VERSION <= 40402
75 # error Your gcc version has a non-functional __sync_synchronize()
83 #include <urcu/arch/generic.h>
85 #endif /* _URCU_ARCH_ARM_H */
This page took 0.03112 seconds and 4 git commands to generate.