fix build error for loongarch64
Signed-off-by: Wenlong Zhang <zhangwenlong@loongson.cn>
This commit is contained in:
parent
04b43f6752
commit
ab74ef3ab4
35
0007-add-loongarch-support-for-perftest.patch
Normal file
35
0007-add-loongarch-support-for-perftest.patch
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
From 9600d3bae7e8f116aff303df7e13f23e67274096 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Wenlong Zhang <zhangwenlong@loongson.cn>
|
||||||
|
Date: Sat, 7 Jan 2023 03:23:20 +0000
|
||||||
|
Subject: [PATCH] add loongarch support for perftest
|
||||||
|
|
||||||
|
add function get_cycles for loongarch64
|
||||||
|
|
||||||
|
Signed-off-by: Wenlong Zhang <zhangwenlong@loongson.cn>
|
||||||
|
---
|
||||||
|
src/get_clock.h | 9 +++++++++
|
||||||
|
1 file changed, 9 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/src/get_clock.h b/src/get_clock.h
|
||||||
|
index dacbcd0..5b7b48b 100755
|
||||||
|
--- a/src/get_clock.h
|
||||||
|
+++ b/src/get_clock.h
|
||||||
|
@@ -105,6 +105,15 @@ static inline cycles_t get_cycles()
|
||||||
|
return cval;
|
||||||
|
}
|
||||||
|
|
||||||
|
+#elif defined(__loongarch64)
|
||||||
|
+typedef unsigned long cycles_t;
|
||||||
|
+static inline cycles_t get_cycles()
|
||||||
|
+{
|
||||||
|
+ cycles_t count;
|
||||||
|
+ asm volatile("rdtime.d %0, $zero" : "=r" (count));
|
||||||
|
+ return count;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
#else
|
||||||
|
#warning get_cycles not implemented for this architecture: attempt asm/timex.h
|
||||||
|
#include <asm/timex.h>
|
||||||
|
--
|
||||||
|
2.33.0
|
||||||
|
|
||||||
@ -1,6 +1,6 @@
|
|||||||
Name: perftest
|
Name: perftest
|
||||||
Version: 4.5
|
Version: 4.5
|
||||||
Release: 3
|
Release: 4
|
||||||
License: GPLv2 or BSD
|
License: GPLv2 or BSD
|
||||||
Summary: RDMA Performance Testing Tools
|
Summary: RDMA Performance Testing Tools
|
||||||
Url: https://github.com/linux-rdma/perftest
|
Url: https://github.com/linux-rdma/perftest
|
||||||
@ -12,9 +12,11 @@ Patch3: 0003-Perftest-Fix-verification-of-max_inline_data-for-_cr.patch
|
|||||||
Patch4: 0004-Perftest-Increase-max-inline-size-to-support-larger-.patch
|
Patch4: 0004-Perftest-Increase-max-inline-size-to-support-larger-.patch
|
||||||
Patch5: 0005-Perftest-Add-support-for-HNS.patch
|
Patch5: 0005-Perftest-Add-support-for-HNS.patch
|
||||||
Patch6: 0006-Perftest-Add-new-HNS-roce-device-ROH-to-support-new_.patch
|
Patch6: 0006-Perftest-Add-new-HNS-roce-device-ROH-to-support-new_.patch
|
||||||
|
Patch7: 0007-add-loongarch-support-for-perftest.patch
|
||||||
|
|
||||||
BuildRequires: automake gcc libibverbs-devel >= 1.2.0 librdmacm-devel >= 1.0.21 libibumad-devel >= 1.3.10.2
|
BuildRequires: automake gcc libibverbs-devel >= 1.2.0 librdmacm-devel >= 1.0.21 libibumad-devel >= 1.3.10.2
|
||||||
BuildRequires: pciutils-devel
|
BuildRequires: pciutils-devel
|
||||||
|
BuildRequires: guile
|
||||||
Obsoletes: openib-perftest < 1.3
|
Obsoletes: openib-perftest < 1.3
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -37,6 +39,12 @@ done
|
|||||||
%_bindir/*
|
%_bindir/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Jan 6 2023 Wenlong Zhang<zhangwenlong@loongson.cn> - 4.5-4
|
||||||
|
- Type: bugfix
|
||||||
|
- ID: NA
|
||||||
|
- SUG: NA
|
||||||
|
- DESC: fix build error for loongarch64
|
||||||
|
|
||||||
* Tue Nov 22 2022 tangchengchang <tangchengchang@huawei.com> - 4.5-3
|
* Tue Nov 22 2022 tangchengchang <tangchengchang@huawei.com> - 4.5-3
|
||||||
- Type: bugfix
|
- Type: bugfix
|
||||||
- ID: NA
|
- ID: NA
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user