Add RISC-V support from openEuler
This commit is contained in:
commit
955d132f00
15
config.yaml
Normal file
15
config.yaml
Normal file
@ -0,0 +1,15 @@
|
||||
actions:
|
||||
- modify_release:
|
||||
- suffix: ".alma.1"
|
||||
enabled: true
|
||||
|
||||
- changelog_entry:
|
||||
- name: "Andrew Lukoshko"
|
||||
email: "alukoshko@almalinux.org"
|
||||
line:
|
||||
- "Add RISC-V support from openEuler"
|
||||
|
||||
- add_files:
|
||||
- type: "patch"
|
||||
name: "0001-Add-RISC-V-support.patch"
|
||||
number: 1001
|
||||
107
files/0001-Add-RISC-V-support.patch
Normal file
107
files/0001-Add-RISC-V-support.patch
Normal file
@ -0,0 +1,107 @@
|
||||
From 8766d2b8f8e57f0d27200e3393a1e31f08c1fab9 Mon Sep 17 00:00:00 2001
|
||||
From: Andrew Lukoshko <alukoshko@almalinux.org>
|
||||
Date: Thu, 21 Aug 2025 16:39:49 +0000
|
||||
Subject: [PATCH] Add RISC-V support
|
||||
|
||||
---
|
||||
utils/uds/Makefile | 6 +++++-
|
||||
utils/uds/linux/atomic.h | 6 ++++++
|
||||
utils/uds/linux/cache.h | 2 +-
|
||||
utils/vdo/Makefile | 6 +++++-
|
||||
4 files changed, 17 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/utils/uds/Makefile b/utils/uds/Makefile
|
||||
index d12df61..4f91733 100644
|
||||
--- a/utils/uds/Makefile
|
||||
+++ b/utils/uds/Makefile
|
||||
@@ -30,6 +30,10 @@ ifeq ($(origin CC), default)
|
||||
CC := gcc
|
||||
endif
|
||||
|
||||
+ifeq ($(filter riscv64%,$(MAKE_HOST)),)
|
||||
+ Wcast-align = -Wcast-align
|
||||
+endif
|
||||
+
|
||||
ifeq ($(findstring clang, $(CC)),clang)
|
||||
# Ignore additional warnings for clang
|
||||
WARNS = -Wno-compare-distinct-pointer-types \
|
||||
@@ -38,7 +42,7 @@ ifeq ($(findstring clang, $(CC)),clang)
|
||||
-Wno-implicit-const-int-float-conversion \
|
||||
-Wno-language-extension-token
|
||||
else
|
||||
- WARNS = -Wcast-align \
|
||||
+ WARNS = $(Wcast-align) \
|
||||
-Wcast-qual \
|
||||
-Wformat=2 \
|
||||
-Wlogical-op
|
||||
diff --git a/utils/uds/linux/atomic.h b/utils/uds/linux/atomic.h
|
||||
index af2b765..31b5ec0 100644
|
||||
--- a/utils/uds/linux/atomic.h
|
||||
+++ b/utils/uds/linux/atomic.h
|
||||
@@ -98,6 +98,8 @@ static inline void smp_mb(void)
|
||||
__asm__ __volatile__("fence rw,rw" : : : "memory");
|
||||
#elif defined __loongarch64
|
||||
__asm__ __volatile__("dbar 0" : : : "memory");
|
||||
+#elif defined __riscv
|
||||
+ __asm__ __volatile__("fence rw,rw" : : : "memory");
|
||||
#else
|
||||
#error "no fence defined"
|
||||
#endif
|
||||
@@ -127,6 +129,8 @@ static inline void smp_rmb(void)
|
||||
__asm__ __volatile__("fence r,r" : : : "memory");
|
||||
#elif defined __loongarch64
|
||||
__asm__ __volatile__("dbar 0" : : : "memory");
|
||||
+#elif defined __riscv
|
||||
+ __asm__ __volatile__("fence r,r" : : : "memory");
|
||||
#else
|
||||
#error "no fence defined"
|
||||
#endif
|
||||
@@ -156,6 +160,8 @@ static inline void smp_wmb(void)
|
||||
__asm__ __volatile__("fence w,w" : : : "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/linux/cache.h b/utils/uds/linux/cache.h
|
||||
index cd32a5b..9155c8f 100644
|
||||
--- a/utils/uds/linux/cache.h
|
||||
+++ b/utils/uds/linux/cache.h
|
||||
@@ -15,7 +15,7 @@
|
||||
#define L1_CACHE_BYTES 128
|
||||
#elif defined(__s390x__)
|
||||
#define L1_CACHE_BYTES 256
|
||||
-#elif defined(__x86_64__) || defined(__aarch64__) || defined(__riscv) || defined (__loongarch64)
|
||||
+#elif defined(__x86_64__) || defined(__aarch64__) || defined(__riscv) || defined (__loongarch64) || defined(__riscv)
|
||||
#define L1_CACHE_BYTES 64
|
||||
#else
|
||||
#error "unknown cache line size"
|
||||
diff --git a/utils/vdo/Makefile b/utils/vdo/Makefile
|
||||
index d9f6587..5474595 100644
|
||||
--- a/utils/vdo/Makefile
|
||||
+++ b/utils/vdo/Makefile
|
||||
@@ -30,6 +30,10 @@ ifeq ($(origin CC), default)
|
||||
CC := gcc
|
||||
endif
|
||||
|
||||
+ifeq ($(filter riscv64%,$(MAKE_HOST)),)
|
||||
+ Wcast-align = -Wcast-align
|
||||
+endif
|
||||
+
|
||||
ifeq ($(findstring clang, $(CC)),clang)
|
||||
# Ignore additional warnings for clang
|
||||
WARNS = -Wno-compare-distinct-pointer-types \
|
||||
@@ -38,7 +42,7 @@ ifeq ($(findstring clang, $(CC)),clang)
|
||||
-Wno-implicit-const-int-float-conversion \
|
||||
-Wno-language-extension-token
|
||||
else
|
||||
- WARNS = -Wcast-align \
|
||||
+ WARNS = $(Wcast-align) \
|
||||
-Wcast-qual \
|
||||
-Wformat=2 \
|
||||
-Wlogical-op
|
||||
--
|
||||
2.43.7
|
||||
|
||||
Loading…
Reference in New Issue
Block a user