Module Name:    src
Committed By:   christos
Date:           Sat Jan 18 15:53:14 UTC 2025

Modified Files:
        src/external/lgpl2/userspace-rcu/dist/include/urcu: arch.h
        src/external/lgpl2/userspace-rcu/dist/include/urcu/arch: sparc64.h
Added Files:
        src/external/lgpl2/userspace-rcu/dist/include/urcu/arch: sh3.h vax.h

Log Message:
add sh3, sparc v8 and earlier,  and vax.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 \
    src/external/lgpl2/userspace-rcu/dist/include/urcu/arch.h
cvs rdiff -u -r0 -r1.1 \
    src/external/lgpl2/userspace-rcu/dist/include/urcu/arch/sh3.h \
    src/external/lgpl2/userspace-rcu/dist/include/urcu/arch/vax.h
cvs rdiff -u -r1.1.1.1 -r1.2 \
    src/external/lgpl2/userspace-rcu/dist/include/urcu/arch/sparc64.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/lgpl2/userspace-rcu/dist/include/urcu/arch.h
diff -u src/external/lgpl2/userspace-rcu/dist/include/urcu/arch.h:1.1.1.1 src/external/lgpl2/userspace-rcu/dist/include/urcu/arch.h:1.2
--- src/external/lgpl2/userspace-rcu/dist/include/urcu/arch.h:1.1.1.1	Fri Jan 17 11:00:49 2025
+++ src/external/lgpl2/userspace-rcu/dist/include/urcu/arch.h	Sat Jan 18 10:53:14 2025
@@ -34,6 +34,8 @@
  * URCU_ARCH_M68K : All Motorola 68000 variants
  * URCU_ARCH_RISCV : All RISC-V variants
  * URCU_ARCH_LOONGARCH : All LoongArch variants
+ * URCU_ARCH_VAX : All DEC VAX variants
+ * URCU_ARCH_SH3 : All SUPER H 3 variants
  */
 
 #if (defined(__INTEL_OFFLOAD) || defined(__TARGET_ARCH_MIC) || defined(__MIC__))
@@ -157,7 +159,18 @@
 #define URCU_ARCH_LOONGARCH 1
 #include <urcu/arch/loongarch.h>
 
+#elif defined(__vax__)
+
+#define URCU_ARCH_VAX 1
+#include <urcu/arch/vax.h>
+
+#elif defined(__sh3__)
+
+#define URCU_ARCH_SH3 1
+#include <urcu/arch/sh3.h>
+
 #else
+
 #error "Cannot build: unrecognized architecture, see <urcu/arch.h>."
 #endif
 

Index: src/external/lgpl2/userspace-rcu/dist/include/urcu/arch/sparc64.h
diff -u src/external/lgpl2/userspace-rcu/dist/include/urcu/arch/sparc64.h:1.1.1.1 src/external/lgpl2/userspace-rcu/dist/include/urcu/arch/sparc64.h:1.2
--- src/external/lgpl2/userspace-rcu/dist/include/urcu/arch/sparc64.h:1.1.1.1	Fri Jan 17 11:00:49 2025
+++ src/external/lgpl2/userspace-rcu/dist/include/urcu/arch/sparc64.h	Sat Jan 18 10:53:14 2025
@@ -28,6 +28,7 @@ extern "C" {
 
 #define CAA_CACHE_LINE_SIZE	256
 
+#ifdef __sparc_v9__
 /*
  * Inspired from the Linux kernel. Workaround Spitfire bug #51.
  */
@@ -40,6 +41,16 @@ __asm__ __volatile__("ba,pt %%xcc, 1f\n\
 #define cmm_mb()	membar_safe("#LoadLoad | #LoadStore | #StoreStore | #StoreLoad")
 #define cmm_rmb()	membar_safe("#LoadLoad")
 #define cmm_wmb()	membar_safe("#StoreStore")
+#elif __sparc_v8__
+/* from gcc config/sparc/sync.md */
+#define cmm_mb()	__asm__ __volatile__("stbar\n\tldstub\t[%%sp-1], %%g0")
+#define cmm_rmb()	__asm__ __volatile__("ldstub\t[%%sp-1], %%g0")
+#define cmm_wmb()	__asm__ __volatile__("stbar")
+#else
+#define cmm_mb()
+#define cmm_rmb()
+#define cmm_wmb()
+#endif
 
 #ifdef __cplusplus
 }

Added files:

Index: src/external/lgpl2/userspace-rcu/dist/include/urcu/arch/sh3.h
diff -u /dev/null src/external/lgpl2/userspace-rcu/dist/include/urcu/arch/sh3.h:1.1
--- /dev/null	Sat Jan 18 10:53:14 2025
+++ src/external/lgpl2/userspace-rcu/dist/include/urcu/arch/sh3.h	Sat Jan 18 10:53:14 2025
@@ -0,0 +1,41 @@
+//
+// SPDX-License-Identifier: LGPL-2.1-or-later
+
+#ifndef _URCU_ARCH_SH3_H
+#define _URCU_ARCH_SH3_H
+
+/*
+ * arch/m68k.h: definitions for m68k architecture
+ */
+
+#include <urcu/compiler.h>
+#include <urcu/config.h>
+#include <urcu/syscall-compat.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <stdlib.h>
+#include <sys/time.h>
+
+/*
+ * On Linux, define the membarrier system call number if not yet available in
+ * the system headers.
+ */
+#if (defined(__linux__) && !defined(__NR_membarrier))
+#define __NR_membarrier		378
+#endif
+
+#define cmm_mb()        __asm__ __volatile__("synco")
+#define cmm_rmb()       cmm_mb()
+#define cmm_wmb()       cmm_mb()
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#include <urcu/arch/generic.h>
+
+#endif /* _URCU_ARCH_SH3_H */
Index: src/external/lgpl2/userspace-rcu/dist/include/urcu/arch/vax.h
diff -u /dev/null src/external/lgpl2/userspace-rcu/dist/include/urcu/arch/vax.h:1.1
--- /dev/null	Sat Jan 18 10:53:14 2025
+++ src/external/lgpl2/userspace-rcu/dist/include/urcu/arch/vax.h	Sat Jan 18 10:53:14 2025
@@ -0,0 +1,28 @@
+//
+// SPDX-License-Identifier: LGPL-2.1-or-later
+
+#ifndef _URCU_ARCH_VAX_H
+#define _URCU_ARCH_VAX_H
+
+/*
+ * arch/m68k.h: definitions for m68k architecture
+ */
+
+#include <urcu/compiler.h>
+#include <urcu/config.h>
+#include <urcu/syscall-compat.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <stdlib.h>
+#include <sys/time.h>
+
+#ifdef __cplusplus
+}
+#endif
+
+#include <urcu/arch/generic.h>
+
+#endif /* _URCU_ARCH_VAX_H */

Reply via email to