From 7edee032157b9765ac59297eccc65c74495c962b Mon Sep 17 00:00:00 2001 From: DJ Delorie Date: Fri, 24 Mar 2023 17:23:35 -0400 Subject: [PATCH] x86: Don't check PREFETCHWT1 in tst-cpu-features-cpuinfo.c (#2149615) Resolves: #2149615 Upstream commits: 61a4425dd412701f6c3545d8c1acd7e1a378ee8b db9b47e9f996bbdb831580ff7343542a017c80ee --- glibc-rh2149615-1.patch | 23 +++++++++++++++++++++++ glibc-rh2149615-2.patch | 25 +++++++++++++++++++++++++ glibc.spec | 7 ++++++- 3 files changed, 54 insertions(+), 1 deletion(-) create mode 100644 glibc-rh2149615-1.patch create mode 100644 glibc-rh2149615-2.patch diff --git a/glibc-rh2149615-1.patch b/glibc-rh2149615-1.patch new file mode 100644 index 0000000..319774a --- /dev/null +++ b/glibc-rh2149615-1.patch @@ -0,0 +1,23 @@ +From 61a4425dd412701f6c3545d8c1acd7e1a378ee8b Mon Sep 17 00:00:00 2001 +From: "H.J. Lu" +Date: Wed, 26 Jan 2022 12:18:21 -0800 +Subject: x86: Don't check PTWRITE in tst-cpu-features-cpuinfo.c + +Don't check PTWRITE against /proc/cpuinfo since kernel doesn't report +PTWRITE in /proc/cpuinfo. + +diff --git a/sysdeps/x86/tst-cpu-features-cpuinfo.c b/sysdeps/x86/tst-cpu-features-cpuinfo.c +index 91a656b61d..981b2be5fd 100644 +--- a/sysdeps/x86/tst-cpu-features-cpuinfo.c ++++ b/sysdeps/x86/tst-cpu-features-cpuinfo.c +@@ -218,7 +218,10 @@ do_test (int argc, char **argv) + fails += CHECK_PROC (popcnt, POPCNT); + fails += CHECK_PROC (3dnowprefetch, PREFETCHW); + fails += CHECK_PROC (prefetchwt1, PREFETCHWT1); ++#if 0 ++ /* NB: /proc/cpuinfo doesn't report this feature. */ + fails += CHECK_PROC (ptwrite, PTWRITE); ++#endif + fails += CHECK_PROC (pse, PSE); + fails += CHECK_PROC (pse36, PSE_36); + fails += CHECK_PROC (psn, PSN); diff --git a/glibc-rh2149615-2.patch b/glibc-rh2149615-2.patch new file mode 100644 index 0000000..26a32ef --- /dev/null +++ b/glibc-rh2149615-2.patch @@ -0,0 +1,25 @@ +From db9b47e9f996bbdb831580ff7343542a017c80ee Mon Sep 17 00:00:00 2001 +From: DJ Delorie +Date: Thu, 9 Mar 2023 22:32:54 -0500 +Subject: x86: Don't check PREFETCHWT1 in tst-cpu-features-cpuinfo.c + +Don't check PREFETCHWT1 against /proc/cpuinfo since kernel doesn't report +PREFETCHWT1 in /proc/cpuinfo. + +Reviewed-by: Noah Goldstein + +diff --git a/sysdeps/x86/tst-cpu-features-cpuinfo.c b/sysdeps/x86/tst-cpu-features-cpuinfo.c +index c25240774e..e963592c4b 100644 +--- a/sysdeps/x86/tst-cpu-features-cpuinfo.c ++++ b/sysdeps/x86/tst-cpu-features-cpuinfo.c +@@ -217,7 +217,10 @@ do_test (int argc, char **argv) + fails += CHECK_PROC (pku, PKU); + fails += CHECK_PROC (popcnt, POPCNT); + fails += CHECK_PROC (3dnowprefetch, PREFETCHW); ++#if 0 ++ /* NB: /proc/cpuinfo doesn't report this feature. */ + fails += CHECK_PROC (prefetchwt1, PREFETCHWT1); ++#endif + #if 0 + /* NB: /proc/cpuinfo doesn't report this feature. */ + fails += CHECK_PROC (ptwrite, PTWRITE); diff --git a/glibc.spec b/glibc.spec index db2ae4e..50d4c72 100644 --- a/glibc.spec +++ b/glibc.spec @@ -155,7 +155,7 @@ end \ Summary: The GNU libc libraries Name: glibc Version: %{glibcversion} -Release: 61%{?dist} +Release: 62%{?dist} # In general, GPLv2+ is used by programs, LGPLv2+ is used for # libraries. @@ -701,6 +701,8 @@ Patch468: glibc-upstream-2.34-386.patch Patch469: glibc-upstream-2.34-388.patch Patch470: glibc-upstream-2.34-389.patch Patch471: glibc-rh2172953.patch +Patch472: glibc-rh2149615-1.patch +Patch473: glibc-rh2149615-2.patch ############################################################################## # Continued list of core "glibc" package information: @@ -2860,6 +2862,9 @@ fi %endif %changelog +* Wed Mar 29 2023 DJ Delorie - 2.34-62 +- x86: Don't check PREFETCHWT1 in tst-cpu-features-cpuinfo.c (#2149615) + * Mon Mar 6 2023 Carlos O'Donell - 2.34-61 - Fix nested atexit calls from atexit handlers (#2172953)