From 2c6c190f07b6b1195faae790ef4815e59c2c723d Mon Sep 17 00:00:00 2001 From: cenhuilin Date: Fri, 22 Aug 2025 15:17:15 +0800 Subject: [PATCH] Add Zhaoxin support to enable tsc_reliable and arch_random features --- ...sc_reliable-and-arch_random-features.patch | 29 +++++++++++++++++++ fio.spec | 6 +++- 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 0003-Add-Zhaoxin-support-to-enable-tsc_reliable-and-arch_random-features.patch diff --git a/0003-Add-Zhaoxin-support-to-enable-tsc_reliable-and-arch_random-features.patch b/0003-Add-Zhaoxin-support-to-enable-tsc_reliable-and-arch_random-features.patch new file mode 100644 index 0000000..b912e64 --- /dev/null +++ b/0003-Add-Zhaoxin-support-to-enable-tsc_reliable-and-arch_random-features.patch @@ -0,0 +1,29 @@ +From c348db31ccce60f2808dd84c1f43f36a1556141a Mon Sep 17 00:00:00 2001 +From: Runa Guo-oc +Date: Fri, 22 Aug 2025 15:11:41 +0800 +Subject: [PATCH] Add Zhaoxin support to enable tsc_reliable and arch_random features + +Signed-off-by: Runa Guo-oc +Link: https://lore.kernel.org/r/20250522104032.17519-1-RunaGuo-oc@zhaoxin.com +Signed-off-by: Jens Axboe +--- + arch/arch-x86-common.h | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/arch/arch-x86-common.h b/arch/arch-x86-common.h +index f32835c..ac26126 100644 +--- a/arch/arch-x86-common.h ++++ b/arch/arch-x86-common.h +@@ -68,7 +68,8 @@ static inline void arch_init(char *envp[]) + (unsigned int *) &str[4]); + + str[12] = '\0'; +- if (!strcmp(str, "GenuineIntel")) ++ if (!strcmp(str, "GenuineIntel") || !strcmp(str, " Shanghai ") || ++ !strcmp(str, "CentaurHauls")) + arch_init_intel(); + else if (!strcmp(str, "AuthenticAMD") || !strcmp(str, "HygonGenuine")) + arch_init_amd(); +-- +2.43.0 + diff --git a/fio.spec b/fio.spec index b82aa25..e431f2e 100644 --- a/fio.spec +++ b/fio.spec @@ -1,6 +1,6 @@ Name: fio Version: 3.34 -Release: 4 +Release: 5 Summary: Multithreaded IO generation tool License: GPLv2 @@ -10,6 +10,7 @@ Source0: http://brick.kernel.dk/snaps/%{name}-%{version}.tar.bz2 #https://github.com/axboe/fio/pull/1736 Patch0001: 0001-fix-disk-stats-issue.patch Patch0002: 0002-engines-http-fix-memory-leak.patch +Patch0003: 0003-Add-Zhaoxin-support-to-enable-tsc_reliable-and-arch_random-features.patch BuildRequires: gcc BuildRequires: libaio-devel @@ -83,6 +84,9 @@ make test %changelog +* Fri Aug 22 2025 cenhuilin - 3.34-5 +- Add Zhaoxin support to enable tsc_reliable and arch_random features + * Wed Jun 5 2024 zhangyaqi - 3.34-4 - engines/http: Fix memory leak -- Gitee