代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/vdo 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
diff --git a/utils/uds/atomicDefs.h b/utils/uds/atomicDefs.h
index f468369..673f974 100644
--- a/utils/uds/atomicDefs.h
+++ b/utils/uds/atomicDefs.h
@@ -99,6 +99,8 @@
__asm__ __volatile__("sync" : : : "memory");
#elif defined __loongarch64
__asm__ __volatile__("dbar 0" : : : "memory");
+#elif defined __riscv
+ __asm__ __volatile__("fence rw,rw" : : : "memory");
#else
#error "no fence defined"
#endif
@@ -126,6 +128,8 @@
__asm__ __volatile__("lwsync" : : : "memory");
#elif defined __loongarch64
__asm__ __volatile__("dbar 0" : : : "memory");
+#elif defined __riscv
+ __asm__ __volatile__("fence r,r" : : : "memory");
#else
#error "no fence defined"
#endif
@@ -153,6 +157,8 @@
__asm__ __volatile__("lwsync" : : : "memory");
#elif defined __loongarch64
__asm__ __volatile__("dbar 0" : : : "memory");
+#elif defined __riscv
+ __asm__ __volatile__("fence w,w" : : : "memory");
#else
#error "no fence defined"
#endif
diff --git a/utils/uds/cpu.h b/utils/uds/cpu.h
index e26d653..f3fd61f 100644
--- a/utils/uds/cpu.h
+++ b/utils/uds/cpu.h
@@ -36,7 +36,7 @@
#define CACHE_LINE_BYTES 128
#elif defined(__s390x__)
#define CACHE_LINE_BYTES 256
-#elif defined(__x86_64__) || defined(__aarch64__) || defined(__loongarch64)
+#elif defined(__x86_64__) || defined(__aarch64__) || defined(__loongarch64) || defined(__riscv)
#define CACHE_LINE_BYTES 64
#else
#error "unknown cache line size"
diff --git a/utils/uds/Makefile b/utils/uds/Makefile
index e33d682..ff6ece0 100644
--- a/utils/uds/Makefile
+++ b/utils/uds/Makefile
@@ -32,8 +32,11 @@
CC=gcc
endif
+ifeq ($(filter riscv64%,$(MAKE_HOST)),)
+Wcast-align = -Wcast-align
+endif
WARNS = -Wall \
- -Wcast-align \
+ $(Wcast-align) \
-Werror \
-Wextra \
-Winit-self \
diff --git a/utils/vdo/Makefile b/utils/vdo/Makefile
index fb009a7..26a8e28 100644
--- a/utils/vdo/Makefile
+++ b/utils/vdo/Makefile
@@ -22,10 +22,12 @@
UDS_DIR = ../uds
-
+ifeq ($(filter riscv64%,$(MAKE_HOST)),)
+Wcast-align = -Wcast-align
+endif
WARNS = \
-Wall \
- -Wcast-align \
+ $(Wcast-align) \
-Werror \
-Wextra \
-Winit-self \
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。