5 Star 0 Fork 4

OpenCloudOS Stream/kmod-kvdo

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
kmod-kvdo-8.2.3.3-add-support-for-loongarch64.patch 1.18 KB
一键复制 编辑 原始数据 按行查看 历史
dpd 提交于 2024-05-28 11:23 . add support for loongarch64
From 5b522779b6c85a7e0daad63ef1134d2d0e2719eb Mon Sep 17 00:00:00 2001
From: doupengda <doupengda@loongson.cn>
Date: Tue, 28 May 2024 03:16:22 +0000
Subject: [PATCH] kmod-kvdo 8.2.3.3 add support for loongarch64
---
source/vdo/cpu.h | 2 +-
source/vdo/volume.h | 3 +++
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/source/vdo/cpu.h b/source/vdo/cpu.h
index e4b39c2..9a4f1f2 100644
--- a/source/vdo/cpu.h
+++ b/source/vdo/cpu.h
@@ -20,7 +20,7 @@
#define CACHE_LINE_BYTES 128
#elif defined(__s390x__)
#define CACHE_LINE_BYTES 256
-#elif defined(__x86_64__) || defined(__aarch64__)
+#elif defined(__x86_64__) || defined(__aarch64__) || defined(__loongarch64)
#define CACHE_LINE_BYTES 64
#else
#error "unknown cache line size"
diff --git a/source/vdo/volume.h b/source/vdo/volume.h
index 3a9a8d5..ea12a65 100644
--- a/source/vdo/volume.h
+++ b/source/vdo/volume.h
@@ -356,6 +356,9 @@ int __must_check get_volume_page(struct volume *volume,
byte **data_ptr,
struct delta_index_page **index_page_ptr);
+#if defined(__loongarch64)
+#define get_cache_size get_cache_size_alias
+#endif
size_t __must_check get_cache_size(struct volume *volume);
int __must_check
--
2.41.1
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/opencloudos-stream/kmod-kvdo.git
git@gitee.com:opencloudos-stream/kmod-kvdo.git
opencloudos-stream
kmod-kvdo
kmod-kvdo
master

搜索帮助