uatomic/x86: Remove redundant memory barriers
[urcu.git] / include / urcu / arch.h
index d3914da27d41e9caf5158b2351ccc78b4b4b8ee8..5147d304f4623d689ac9e280f0e779fae7fb6ad7 100644 (file)
@@ -1,22 +1,6 @@
-/*
- * urcu/arch.h
- *
- * Copyright (c) 2020 Michael Jeanson <michael.jeanson@efficios.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
+// SPDX-FileCopyrightText: 2020 Michael Jeanson <mjeanson@efficios.com>
+//
+// SPDX-License-Identifier: LGPL-2.1-or-later
 
 #ifndef _URCU_ARCH_H
 #define _URCU_ARCH_H
@@ -49,6 +33,7 @@
  * URCU_ARCH_HPPA : All HP PA-RISC variants
  * URCU_ARCH_M68K : All Motorola 68000 variants
  * URCU_ARCH_RISCV : All RISC-V variants
+ * URCU_ARCH_LOONGARCH : All LoongArch variants
  */
 
 #if (defined(__INTEL_OFFLOAD) || defined(__TARGET_ARCH_MIC) || defined(__MIC__))
 #define URCU_ARCH_RISCV 1
 #include <urcu/arch/riscv.h>
 
+#elif defined(__loongarch__)
+
+#define URCU_ARCH_LOONGARCH 1
+#include <urcu/arch/loongarch.h>
+
 #else
 #error "Cannot build: unrecognized architecture, see <urcu/arch.h>."
 #endif
 
+#ifdef CONFIG_RCU_EMIT_LEGACY_MB
+# define cmm_emit_legacy_smp_mb() cmm_smp_mb()
+#else
+# define cmm_emit_legacy_smp_mb() do { } while (0)
+#endif
+
 
 #endif /* _URCU_ARCH_H */
This page took 0.022439 seconds and 4 git commands to generate.