diff --git a/rdma-core.changes b/rdma-core.changes index 6387d1b..1b07a17 100644 --- a/rdma-core.changes +++ b/rdma-core.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Mar 17 13:41:47 UTC 2022 - Andreas Schwab + +- util-Add-barriers-support-for-RISC-V.patch: Backport from upstream: Add + barriers support for RISC-V + ------------------------------------------------------------------- Thu Mar 10 08:24:00 UTC 2022 - Nicolas Morey-Chaisemartin diff --git a/rdma-core.spec b/rdma-core.spec index ab04a7f..1cd634d 100644 --- a/rdma-core.spec +++ b/rdma-core.spec @@ -54,7 +54,7 @@ Group: Productivity/Networking/Other %define mlx4_lname libmlx4-%{mlx4_so_major} %define mlx5_lname libmlx5-%{mlx5_so_major} -%ifnarch s390 %arm riscv64 +%ifnarch s390 %arm %define dma_coherent 1 %endif @@ -79,6 +79,7 @@ Patch3: cxgb3-fix-declaration-of-free_context.patch Patch4: cxgb3-fix-support-for-new-uquery-API.patch Patch5: srp_daemon-Detect-proper-path-to-systemctl.patch Patch6: cmake-Make-modprobe.d-path-configurable.patch +Patch7: util-Add-barriers-support-for-RISC-V.patch BuildRequires: binutils BuildRequires: cmake >= 2.8.11 BuildRequires: gcc @@ -424,6 +425,7 @@ easy, object-oriented access to IB verbs. %patch4 %patch5 %patch6 +%patch7 -p1 %build diff --git a/util-Add-barriers-support-for-RISC-V.patch b/util-Add-barriers-support-for-RISC-V.patch new file mode 100644 index 0000000..40216db --- /dev/null +++ b/util-Add-barriers-support-for-RISC-V.patch @@ -0,0 +1,46 @@ +From 63b41f22a9f5c9aed64f63b1c07a162bcfd21f7f Mon Sep 17 00:00:00 2001 +From: "v.v.mitrofanov" +Date: Fri, 4 Feb 2022 14:57:30 +0300 +Subject: [PATCH] util: Add barriers support for RISC-V + +Add barriers support for RISC-V architecture + +Signed-off-by: v.v.mitrofanov +--- + util/udma_barrier.h | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/util/udma_barrier.h b/util/udma_barrier.h +index 5730576e..ea562b18 100644 +--- a/util/udma_barrier.h ++++ b/util/udma_barrier.h +@@ -98,6 +98,8 @@ + #define udma_to_device_barrier() asm volatile("" ::: "memory") + #elif defined(__loongarch__) + #define udma_to_device_barrier() asm volatile("dbar 0" ::: "memory") ++#elif defined(__riscv) ++#define udma_to_device_barrier() asm volatile("fence ow,ow" ::: "memory") + #else + #error No architecture specific memory barrier defines found! + #endif +@@ -132,6 +134,8 @@ + #define udma_from_device_barrier() asm volatile("" ::: "memory") + #elif defined(__loongarch__) + #define udma_from_device_barrier() asm volatile("dbar 0" ::: "memory") ++#elif defined(__riscv) ++#define udma_from_device_barrier() asm volatile("fence ir,ir" ::: "memory") + #else + #error No architecture specific memory barrier defines found! + #endif +@@ -198,6 +202,8 @@ + #define mmio_flush_writes() asm volatile("" ::: "memory") + #elif defined(__loongarch__) + #define mmio_flush_writes() asm volatile("dbar 0" ::: "memory") ++#elif defined(__riscv) ++#define mmio_flush_writes() asm volatile("fence ow,ow" ::: "memory") + #else + #error No architecture specific memory barrier defines found! + #endif +-- +2.35.0 +