From e3a2c49ace2f707614053a0f6bf06ca7fb83ad86 Mon Sep 17 00:00:00 2001 From: John Kacur Date: Tue, 5 Nov 2024 10:24:48 -0500 Subject: [PATCH] Revert a patch to use that creates a gcc flags mismatch on power Revert a patch to use that creates a gcc flags mismatch on power Remove duplicate sqrt function Resolves:RHEL-65475 Signed-off-by: John Kacur --- ...et-clones.h-add-power11-to-target-cl.patch | 85 +++++++++++++++++++ stress-fp-error-remove-duplicated-sqrt.patch | 34 ++++++++ stress-ng.spec | 9 +- 3 files changed, 127 insertions(+), 1 deletion(-) create mode 100644 Revert-core-target-clones.h-add-power11-to-target-cl.patch create mode 100644 stress-fp-error-remove-duplicated-sqrt.patch diff --git a/Revert-core-target-clones.h-add-power11-to-target-cl.patch b/Revert-core-target-clones.h-add-power11-to-target-cl.patch new file mode 100644 index 0000000..e83a1a6 --- /dev/null +++ b/Revert-core-target-clones.h-add-power11-to-target-cl.patch @@ -0,0 +1,85 @@ +From 663eceec28815d1eacfcd7908df48fe8781e9311 Mon Sep 17 00:00:00 2001 +From: John Kacur +Date: Tue, 5 Nov 2024 09:56:31 -0500 +Subject: [PATCH] Revert "core-target-clones.h: add power11 to target clones" + +This reverts commit 6b78e7450f04bb4251458638303050d7148d6b95. + +This fixes a mismatch where gcc support -mtune=power11 +Where the distro seems to use +-mcpu=power9 -mtune=power10 +resulting in a mismatch. + +Until a workaround is available upstream, reverting this patch. + +Signed-off-by: John Kacur +--- + Makefile.config | 8 -------- + core-target-clones.h | 8 -------- + 2 files changed, 16 deletions(-) + +diff --git a/Makefile.config b/Makefile.config +index 2bd9760b8ac9..8f1e0113b0d3 100644 +--- a/Makefile.config ++++ b/Makefile.config +@@ -1293,7 +1293,6 @@ cpufeatures: \ + TARGET_CLONES_PANTHERLAKE \ + TARGET_CLONES_POWER9 \ + TARGET_CLONES_POWER10 \ +- TARGET_CLONES_POWER11 \ + TARGET_CLONES_ROCKETLAKE \ + TARGET_CLONES_SAPPHIRERAPIDS \ + TARGET_CLONES_SKYLAKE_AVX512 \ +@@ -1682,9 +1681,6 @@ TARGET_CLONES_POWER9: + TARGET_CLONES_POWER10: + $(call check,test-target-clones,HAVE_TARGET_CLONES_POWER10,target_clones cpu=power attribute (power10),,,'"default$(comma)cpu=power10"') + +-TARGET_CLONES_POWER11: +- $(call check,test-target-clones,HAVE_TARGET_CLONES_POWER11,target_clones cpu=power attribute (power11),,,'"default$(comma)cpu=power11"') +- + VECMATH: + $(call check_vecmath,stress-vecmath,HAVE_VECMATH,vector math) + +@@ -2257,7 +2253,6 @@ functions: \ + BUILTIN_CPOWL \ + BUILTIN_CPU_IS_POWER9 \ + BUILTIN_CPU_IS_POWER10 \ +- BUILTIN_CPU_IS_POWER11 \ + BUILTIN_CSIN \ + BUILTIN_CSINF \ + BUILTIN_CSINL \ +@@ -2975,9 +2970,6 @@ BUILTIN_CPU_IS_POWER9: + BUILTIN_CPU_IS_POWER10: + $(call check,test-builtin-cpu-is-power10,HAVE_BUILTIN_CPU_IS_POWER10,__builtin_cpu_is("power10")) + +-BUILTIN_CPU_IS_POWER11: +- $(call check,test-builtin-cpu-is-power11,HAVE_BUILTIN_CPU_IS_POWER11,__builtin_cpu_is("power11")) +- + BUILTIN_EXP: + $(call check,test-mathfunc,HAVE_BUILTIN_EXP,__builtin_exp,$(LIB_M),-DMATHFUNC=__builtin_exp) + +diff --git a/core-target-clones.h b/core-target-clones.h +index 874d590cdc2b..ebc0ba1b1d64 100644 +--- a/core-target-clones.h ++++ b/core-target-clones.h +@@ -212,17 +212,9 @@ + #define TARGET_CLONE_POWER10 + #endif + +-#if defined(HAVE_TARGET_CLONES_POWER11) +-#define TARGET_CLONE_POWER11 "cpu=power11", +-#define TARGET_CLONE_USE +-#else +-#define TARGET_CLONE_POWER11 +-#endif +- + #define TARGET_CLONES_ALL \ + TARGET_CLONE_POWER9 \ + TARGET_CLONE_POWER10 \ +- TARGET_CLONE_POWER11 \ + "default" + + #if defined(TARGET_CLONE_USE) +-- +2.47.0 + diff --git a/stress-fp-error-remove-duplicated-sqrt.patch b/stress-fp-error-remove-duplicated-sqrt.patch new file mode 100644 index 0000000..72824ee --- /dev/null +++ b/stress-fp-error-remove-duplicated-sqrt.patch @@ -0,0 +1,34 @@ +From 7937cf205f653eb056588861e35489c4153c5b1c Mon Sep 17 00:00:00 2001 +From: Colin Ian King +Date: Fri, 1 Nov 2024 18:31:57 +0000 +Subject: [PATCH 2/6] stress-fp-error: remove duplicated sqrt + +The sqrt() is duplictated, remove it. Kudos to Woodrow Shen for spotting +this. + +Closes: https://github.com/ColinIanKing/stress-ng/issues/450 + +Signed-off-by: Colin Ian King +--- + stress-fp-error.c | 5 ----- + 1 file changed, 5 deletions(-) + +diff --git a/stress-fp-error.c b/stress-fp-error.c +index d5eac54c7b95..fe4d80146652 100644 +--- a/stress-fp-error.c ++++ b/stress-fp-error.c +@@ -163,11 +163,6 @@ static int stress_fp_error(stress_args_t *args) + stress_fp_check(args, "sqrt(-1.0)", sqrt(-1.0), (double)NAN, + true, false, EDOM, FE_INVALID, &rc); + #endif +-#if defined(EDOM) && defined(FE_INVALID) +- stress_fp_clear_error(); +- stress_fp_check(args, "sqrt(-1.0)", sqrt(-1.0), (double)NAN, +- true, false, EDOM, FE_INVALID, &rc); +-#endif + #if defined(FE_INEXACT) + #if !defined(STRESS_ARCH_ALPHA) + /* +-- +2.47.0 + diff --git a/stress-ng.spec b/stress-ng.spec index e64a478..4d56e45 100644 --- a/stress-ng.spec +++ b/stress-ng.spec @@ -1,6 +1,6 @@ Name: stress-ng Version: 0.18.06 -Release: 0%{?dist} +Release: 2%{?dist} Summary: Stress test a computer system in various ways License: GPL-2.0-or-later @@ -26,6 +26,8 @@ BuildRequires: Judy-devel # Patches Patch1: core-stress-fflush-opened-writable-files.patch +Patch2: Revert-core-target-clones.h-add-power11-to-target-cl.patch +Patch3: stress-fp-error-remove-duplicated-sqrt.patch %description Stress test a computer system in various ways. It was designed to exercise @@ -55,6 +57,11 @@ install -pm 644 bash-completion/%{name} \ %{_datadir}/bash-completion/completions/%{name} %changelog +* Tue Nov 05 2024 John Kacur - 0.18.06-2 +- Revert a patch to use that creates a gcc flags mismatch on power +- Remove duplicate sqrt function +Resolves:RHEL-65475 + * Fri Nov 01 2024 John Kacur - 0.18.06-1 - Rebase to stress-ng to V0.18.06 - Add single upstream patch