From 20204b61192b6683e632e022cd3549fb2dde94ef Mon Sep 17 00:00:00 2001 From: herengui Date: Tue, 29 Aug 2023 11:45:30 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=94=B3=E5=A8=81=E6=9E=B6?= =?UTF-8?q?=E6=9E=84=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: herengui --- 0090-Add-riscv64-support.patch | 57 +++++++++++++++++++++++++++++++++ 0091-Add-sw_64-support.patch | 58 ++++++++++++++++++++++++++++++++++ etmem.spec | 11 +++++-- 3 files changed, 123 insertions(+), 3 deletions(-) create mode 100644 0090-Add-riscv64-support.patch create mode 100644 0091-Add-sw_64-support.patch diff --git a/0090-Add-riscv64-support.patch b/0090-Add-riscv64-support.patch new file mode 100644 index 0000000..95b3e0a --- /dev/null +++ b/0090-Add-riscv64-support.patch @@ -0,0 +1,57 @@ +From 11665b5fa21babc17a24ebf13c4282bf4b7d6e07 Mon Sep 17 00:00:00 2001 +From: zhangxiang +Date: Mon, 31 Jul 2023 17:06:54 +0800 +Subject: [PATCH 90/92] Add riscv64 support + +--- + etmem/CMakeLists.txt | 6 ++++++ + etmem/test/CMakeLists.txt | 2 ++ + 2 files changed, 8 insertions(+) + +diff --git a/etmem/CMakeLists.txt b/etmem/CMakeLists.txt +index 9e3194a..0b38f07 100644 +--- a/etmem/CMakeLists.txt ++++ b/etmem/CMakeLists.txt +@@ -92,6 +92,8 @@ if( ${ARCHITECTURE} STREQUAL "aarch64" ) + target_compile_options(etmemd PRIVATE -march=armv8-a) + elseif( ${ARCHITECTURE} STREQUAL "loongarch64" ) + target_compile_options(etmemd PRIVATE -march=loongarch64) ++elseif( ${ARCHITECTURE} STREQUAL "riscv64" ) ++ target_compile_options(etmemd PRIVATE -march=rv64gc) + else() + target_compile_options(etmemd PRIVATE -march=core-avx-i -m64) + endif() +@@ -109,6 +111,8 @@ if( ${ARCHITECTURE} STREQUAL "aarch64" ) + target_compile_options(etmem PRIVATE -march=armv8-a) + elseif( ${ARCHITECTURE} STREQUAL "loongarch64" ) + target_compile_options(etmemd PRIVATE -march=loongarch64) ++elseif( ${ARCHITECTURE} STREQUAL "riscv64" ) ++ target_compile_options(etmemd PRIVATE -march=rv64gc) + else() + target_compile_options(etmem PRIVATE -march=core-avx-i -m64) + endif() +@@ -127,6 +131,8 @@ if( ${ARCHITECTURE} STREQUAL "aarch64" ) + target_compile_options(etmemd_scan PRIVATE -march=armv8-a) + elseif( ${ARCHITECTURE} STREQUAL "loongarch64" ) + target_compile_options(etmemd_scan PRIVATE -march=loongarch64) ++elseif( ${ARCHITECTURE} STREQUAL "riscv64" ) ++ target_compile_options(etmemd PRIVATE -march=rv64gc) + else() + target_compile_options(etmemd_scan PRIVATE -march=core-avx-i -m64) + endif() +diff --git a/etmem/test/CMakeLists.txt b/etmem/test/CMakeLists.txt +index 928e358..b808eb2 100644 +--- a/etmem/test/CMakeLists.txt ++++ b/etmem/test/CMakeLists.txt +@@ -156,6 +156,8 @@ if( ${ARCHITECTURE} STREQUAL "aarch64") + SET(COMMON_COMPILE_OPT ${COMMON_COMPILE_OPT} -march=armv8-a) + elseif( ${ARCHITECTURE} STREQUAL "loongarch64" ) + SET(COMMON_COMPILE_OPT ${COMMON_COMPILE_OPT} -march=loongarch64) ++elseif( ${ARCHITECTURE} STREQUAL "riscv64" ) ++ SET(COMMON_COMPILE_OPT ${COMMON_COMPILE_OPT} -march=rv64gc) + else() + SET(COMMON_COMPILE_OPT ${COMMON_COMPILE_OPT} -march=core-avx-i -m64) + endif() +-- +2.41.0 + diff --git a/0091-Add-sw_64-support.patch b/0091-Add-sw_64-support.patch new file mode 100644 index 0000000..c3f7714 --- /dev/null +++ b/0091-Add-sw_64-support.patch @@ -0,0 +1,58 @@ +From 1f3be1f3211760b3c98881013a65345180462899 Mon Sep 17 00:00:00 2001 +From: herengui +Date: Mon, 28 Aug 2023 11:22:30 +0800 +Subject: [PATCH 92/92] Add sw_64 support + +Signed-off-by: herengui +--- + etmem/CMakeLists.txt | 6 ++++++ + etmem/test/CMakeLists.txt | 2 ++ + 2 files changed, 8 insertions(+) + +diff --git a/etmem/CMakeLists.txt b/etmem/CMakeLists.txt +index 0b38f07..66a2694 100644 +--- a/etmem/CMakeLists.txt ++++ b/etmem/CMakeLists.txt +@@ -94,6 +94,8 @@ elseif( ${ARCHITECTURE} STREQUAL "loongarch64" ) + target_compile_options(etmemd PRIVATE -march=loongarch64) + elseif( ${ARCHITECTURE} STREQUAL "riscv64" ) + target_compile_options(etmemd PRIVATE -march=rv64gc) ++elseif( ${ARCHITECTURE} STREQUAL "sw_64" ) ++ target_compile_options(etmemd PRIVATE) + else() + target_compile_options(etmemd PRIVATE -march=core-avx-i -m64) + endif() +@@ -113,6 +115,8 @@ elseif( ${ARCHITECTURE} STREQUAL "loongarch64" ) + target_compile_options(etmemd PRIVATE -march=loongarch64) + elseif( ${ARCHITECTURE} STREQUAL "riscv64" ) + target_compile_options(etmemd PRIVATE -march=rv64gc) ++elseif( ${ARCHITECTURE} STREQUAL "sw_64" ) ++ target_compile_options(etmemd PRIVATE) + else() + target_compile_options(etmem PRIVATE -march=core-avx-i -m64) + endif() +@@ -133,6 +137,8 @@ elseif( ${ARCHITECTURE} STREQUAL "loongarch64" ) + target_compile_options(etmemd_scan PRIVATE -march=loongarch64) + elseif( ${ARCHITECTURE} STREQUAL "riscv64" ) + target_compile_options(etmemd PRIVATE -march=rv64gc) ++elseif( ${ARCHITECTURE} STREQUAL "sw_64" ) ++ target_compile_options(etmemd PRIVATE) + else() + target_compile_options(etmemd_scan PRIVATE -march=core-avx-i -m64) + endif() +diff --git a/etmem/test/CMakeLists.txt b/etmem/test/CMakeLists.txt +index b808eb2..ac7911f 100644 +--- a/etmem/test/CMakeLists.txt ++++ b/etmem/test/CMakeLists.txt +@@ -158,6 +158,8 @@ elseif( ${ARCHITECTURE} STREQUAL "loongarch64" ) + SET(COMMON_COMPILE_OPT ${COMMON_COMPILE_OPT} -march=loongarch64) + elseif( ${ARCHITECTURE} STREQUAL "riscv64" ) + SET(COMMON_COMPILE_OPT ${COMMON_COMPILE_OPT} -march=rv64gc) ++elseif( ${ARCHITECTURE} STREQUAL "sw_64" ) ++ SET(COMMON_COMPILE_OPT ${COMMON_COMPILE_OPT}) + else() + SET(COMMON_COMPILE_OPT ${COMMON_COMPILE_OPT} -march=core-avx-i -m64) + endif() +-- +2.41.0 + diff --git a/etmem.spec b/etmem.spec index 14937a2..8f28697 100644 --- a/etmem.spec +++ b/etmem.spec @@ -2,8 +2,8 @@ Name: etmem Version: 1.0 -Release: 15 -Summary: etmem +Release: 16 +Summary: etmem License: MulanPSL-2.0 URL: https://gitee.com/openeuler/etmem Source0: https://gitee.com/openeuler/etmem/repository/archive/%{version}.tar.gz @@ -97,6 +97,8 @@ Patch85: 0086-etmem-remove-unnecessary-log-code.patch Patch86: 0087-etmem-fix-memory-leak-and-fd-leak.patch Patch87: 0088-etmem-fix-multiple-etmemd-and-too-many-err-log-probl.patch Patch88: 0089-etmem-fix-project-stop-cmd-timeout-problem.patch +Patch89: 0090-Add-riscv64-support.patch +Patch90: 0091-Add-sw_64-support.patch #Dependency BuildRequires: cmake gcc gcc-c++ glib2-devel @@ -150,6 +152,9 @@ install -m 0644 userswap/include/uswap_api.h $RPM_BUILD_ROOT%{_includedir} %postun -p /sbin/ldconfig %changelog +* Tue Aug 29 2023 herengui - 1.0-16 +- add sw_64 support + * Thu Aug 24 2023 volcanodragon 1.0-15 - fix project stop cmd timeout problem @@ -163,7 +168,7 @@ install -m 0644 userswap/include/uswap_api.h $RPM_BUILD_ROOT%{_includedir} - Modify License to MulanPSL-2.0 in the spec * Mon Aug 1 2022 liubo 1.0-11 -- Sync the features and bug fixes in the etmem source repo. +- Sync the features and bug fixes in the etmem source repo. * Thu Dec 16 2021 YangXin <245051644@qq.com> 1.0-10 - Update memdcd engine for userswap page filter. -- Gitee