From 5fff15fb729b8e7d799832c48dbd87b068b5018e Mon Sep 17 00:00:00 2001 From: Lijing Date: Wed, 3 Jan 2024 17:17:47 +0800 Subject: [PATCH 1/3] Add Hygon Dhyana support --- glibc-Add-Hygon-Dhyana-support.patch | 15 +++++++++++++++ glibc.spec | 1 + 2 files changed, 16 insertions(+) create mode 100644 glibc-Add-Hygon-Dhyana-support.patch diff --git a/glibc-Add-Hygon-Dhyana-support.patch b/glibc-Add-Hygon-Dhyana-support.patch new file mode 100644 index 0000000..52b232d --- /dev/null +++ b/glibc-Add-Hygon-Dhyana-support.patch @@ -0,0 +1,15 @@ +diff --git a/glibc-2.28/sysdeps/x86/cpu-features.c b/glibc-2.28/sysdeps/x86/cpu-features.c +index 91042505..1cc43bf7 100644 +--- a/glibc-2.28/sysdeps/x86/cpu-features.c ++++ b/glibc-2.28/sysdeps/x86/cpu-features.c +@@ -527,8 +527,8 @@ init_cpu_features (struct cpu_features *cpu_features) + cpu_features->preferred[index_arch_Prefer_No_AVX512] + |= bit_arch_Prefer_No_AVX512; + } +- /* This spells out "AuthenticAMD". */ +- else if (ebx == 0x68747541 && ecx == 0x444d4163 && edx == 0x69746e65) ++ /* This spells out "AuthenticAMD" or "HygonGenuine". */ ++ else if ((ebx == 0x68747541 && ecx == 0x444d4163 && edx == 0x69746e65)||(ebx == 0x6f677948 && ecx == 0x656e6975 && edx == 0x6e65476e)) + { + unsigned int extended_model; + diff --git a/glibc.spec b/glibc.spec index 82047c0..17984c4 100644 --- a/glibc.spec +++ b/glibc.spec @@ -1052,6 +1052,7 @@ Patch2006: glibc-Sync-to-lnd-35-for-LoongArch.patch Patch2007: Fix-tst-cancel21.c-to-suit-kernel-struct-sigcontext-.patch Patch2008: glibc-aarch64-Increase-small-and-medium-cases-for-__memcpy.patch +Patch2009: glibc-Add-Hygon-Dhyana-support.patch ############################################################################## # Continued list of core "glibc" package information: ############################################################################## From 9790651cac79c06b19ad784d2c71f7aee7f3adab Mon Sep 17 00:00:00 2001 From: lijing22222 Date: Wed, 3 Jan 2024 10:23:26 +0000 Subject: [PATCH 2/3] Revert "Add Hygon Dhyana support" This reverts commit 5fff15fb729b8e7d799832c48dbd87b068b5018e. --- glibc-Add-Hygon-Dhyana-support.patch | 15 --------------- glibc.spec | 1 - 2 files changed, 16 deletions(-) delete mode 100644 glibc-Add-Hygon-Dhyana-support.patch diff --git a/glibc-Add-Hygon-Dhyana-support.patch b/glibc-Add-Hygon-Dhyana-support.patch deleted file mode 100644 index 52b232d..0000000 --- a/glibc-Add-Hygon-Dhyana-support.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff --git a/glibc-2.28/sysdeps/x86/cpu-features.c b/glibc-2.28/sysdeps/x86/cpu-features.c -index 91042505..1cc43bf7 100644 ---- a/glibc-2.28/sysdeps/x86/cpu-features.c -+++ b/glibc-2.28/sysdeps/x86/cpu-features.c -@@ -527,8 +527,8 @@ init_cpu_features (struct cpu_features *cpu_features) - cpu_features->preferred[index_arch_Prefer_No_AVX512] - |= bit_arch_Prefer_No_AVX512; - } -- /* This spells out "AuthenticAMD". */ -- else if (ebx == 0x68747541 && ecx == 0x444d4163 && edx == 0x69746e65) -+ /* This spells out "AuthenticAMD" or "HygonGenuine". */ -+ else if ((ebx == 0x68747541 && ecx == 0x444d4163 && edx == 0x69746e65)||(ebx == 0x6f677948 && ecx == 0x656e6975 && edx == 0x6e65476e)) - { - unsigned int extended_model; - diff --git a/glibc.spec b/glibc.spec index 17984c4..82047c0 100644 --- a/glibc.spec +++ b/glibc.spec @@ -1052,7 +1052,6 @@ Patch2006: glibc-Sync-to-lnd-35-for-LoongArch.patch Patch2007: Fix-tst-cancel21.c-to-suit-kernel-struct-sigcontext-.patch Patch2008: glibc-aarch64-Increase-small-and-medium-cases-for-__memcpy.patch -Patch2009: glibc-Add-Hygon-Dhyana-support.patch ############################################################################## # Continued list of core "glibc" package information: ############################################################################## From a398b2b0b10bd96b3cc3f967d74be549210f5d74 Mon Sep 17 00:00:00 2001 From: Lijing Date: Wed, 3 Jan 2024 18:34:23 +0800 Subject: [PATCH 3/3] Add Hygon Dhyana support --- glibc-Add-Hygon-Dhyana-support.patch | 15 +++++++++++++++ glibc.spec | 6 +++++- 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 glibc-Add-Hygon-Dhyana-support.patch diff --git a/glibc-Add-Hygon-Dhyana-support.patch b/glibc-Add-Hygon-Dhyana-support.patch new file mode 100644 index 0000000..52b232d --- /dev/null +++ b/glibc-Add-Hygon-Dhyana-support.patch @@ -0,0 +1,15 @@ +diff --git a/glibc-2.28/sysdeps/x86/cpu-features.c b/glibc-2.28/sysdeps/x86/cpu-features.c +index 91042505..1cc43bf7 100644 +--- a/glibc-2.28/sysdeps/x86/cpu-features.c ++++ b/glibc-2.28/sysdeps/x86/cpu-features.c +@@ -527,8 +527,8 @@ init_cpu_features (struct cpu_features *cpu_features) + cpu_features->preferred[index_arch_Prefer_No_AVX512] + |= bit_arch_Prefer_No_AVX512; + } +- /* This spells out "AuthenticAMD". */ +- else if (ebx == 0x68747541 && ecx == 0x444d4163 && edx == 0x69746e65) ++ /* This spells out "AuthenticAMD" or "HygonGenuine". */ ++ else if ((ebx == 0x68747541 && ecx == 0x444d4163 && edx == 0x69746e65)||(ebx == 0x6f677948 && ecx == 0x656e6975 && edx == 0x6e65476e)) + { + unsigned int extended_model; + diff --git a/glibc.spec b/glibc.spec index 82047c0..1585736 100644 --- a/glibc.spec +++ b/glibc.spec @@ -1,4 +1,4 @@ -%global anolis_release .0.5 +%global anolis_release .0.6 %define glibcsrcdir glibc-2.28 %define glibcversion 2.28 %define glibcrelease 225%{anolis_release}%{?dist} @@ -1052,6 +1052,7 @@ Patch2006: glibc-Sync-to-lnd-35-for-LoongArch.patch Patch2007: Fix-tst-cancel21.c-to-suit-kernel-struct-sigcontext-.patch Patch2008: glibc-aarch64-Increase-small-and-medium-cases-for-__memcpy.patch +Patch2009: glibc-Add-Hygon-Dhyana-support.patch ############################################################################## # Continued list of core "glibc" package information: ############################################################################## @@ -2886,6 +2887,9 @@ fi %files -f compat-libpthread-nonshared.filelist -n compat-libpthread-nonshared %changelog +* Wed Jan 03 2024 Jing Li - 2.28-225.0.6.6 +- Add Hygon Dhyana support + * Mon Dec 11 2023 Kaiqiang Wang - 2.28-225.0.5.6 * aarch64: Increase small and medium cases for __memcpy_generic (bug#7060)