summaryrefslogtreecommitdiff
path: root/user/node/ppc-fixes-for-older-models-18.patch
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2025-01-03 23:17:24 -0600
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2025-01-03 23:17:24 -0600
commiteca90cc1e25026a6e278ce989c8fdfb9dfd681d5 (patch)
tree12e850685deaa3bd91195a725da5768df55627ec /user/node/ppc-fixes-for-older-models-18.patch
parent5a785f870b30fbd9949a1c7977e80947a041ff8d (diff)
downloadpackages-eca90cc1e25026a6e278ce989c8fdfb9dfd681d5.tar.gz
packages-eca90cc1e25026a6e278ce989c8fdfb9dfd681d5.tar.bz2
packages-eca90cc1e25026a6e278ce989c8fdfb9dfd681d5.tar.xz
packages-eca90cc1e25026a6e278ce989c8fdfb9dfd681d5.zip
user/node: Fix PPC64 patch to actually compile
The patch as committed was not finished. This finishes the patch. Tested on G5 and Power9. No regressions on P9, 12 failures on G5 - which is significantly better than the 3800 we had before. Fixes: 5a785f870b ("user/node: Added fixes for pre-Power8 ppc64 CPUs") See-also: !817
Diffstat (limited to 'user/node/ppc-fixes-for-older-models-18.patch')
-rw-r--r--user/node/ppc-fixes-for-older-models-18.patch13
1 files changed, 8 insertions, 5 deletions
diff --git a/user/node/ppc-fixes-for-older-models-18.patch b/user/node/ppc-fixes-for-older-models-18.patch
index d081f2435..88d5bd1a0 100644
--- a/user/node/ppc-fixes-for-older-models-18.patch
+++ b/user/node/ppc-fixes-for-older-models-18.patch
@@ -40,7 +40,7 @@ sp is supposed to point to a back chain at all times (V8 may not do this).
--- a/deps/v8/src/base/cpu.cc 2022-02-08 04:37:48.000000000 -0800
+++ b/deps/v8/src/base/cpu.cc 2022-02-19 14:38:37.997161835 -0800
-@@ -14,15 +14,13 @@
+@@ -14,15 +14,16 @@
#if V8_OS_LINUX
#include <linux/auxvec.h> // AT_HWCAP
#endif
@@ -48,6 +48,9 @@ sp is supposed to point to a back chain at all times (V8 may not do this).
+#if V8_GLIBC_PREREQ(2, 16) || \
+ (V8_OS_LINUX && (V8_HOST_ARCH_PPC || V8_HOST_ARCH_PPC64))
#include <sys/auxv.h> // getauxval()
++#if defined(PPC_FEATURE2_HAS_ISEL) && !defined(PPC_FEATURE2_ISEL)
++#define PPC_FEATURE2_ISEL PPC_FEATURE2_HAS_ISEL
++#endif
#endif
#if V8_OS_QNX
#include <sys/syspage.h> // cpuinfo
@@ -58,7 +61,7 @@ sp is supposed to point to a back chain at all times (V8 may not do this).
#if V8_OS_AIX
#include <sys/systemcfg.h> // _system_configuration
#ifndef POWER_8
-@@ -772,56 +770,55 @@
+@@ -772,56 +773,55 @@
#ifndef USE_SIMULATOR
#if V8_OS_LINUX
@@ -128,10 +131,10 @@ sp is supposed to point to a back chain at all times (V8 may not do this).
+ // i-cache coherency requires Power ISA v2.02 or later; has its own flag.
+ has_icache_snoop_ = (hwcap & PPC_FEATURE_ICACHE_SNOOP);
+
-+ // requires Power ISA v2.03 or later, or the HAS_ISEL bit (e.g. e6500).
++ // requires Power ISA v2.03 or later, or the ISEL bit (e.g. e6500).
+ has_isel_ = (hwcap & (PPC_FEATURE_POWER5_PLUS | PPC_FEATURE_ARCH_2_05 |
+ PPC_FEATURE_PA6T | PPC_FEATURE_POWER6_EXT | PPC_FEATURE_ARCH_2_06)) ||
-+ (hwcap2 & PPC_FEATURE2_HAS_ISEL);
++ (hwcap2 & PPC_FEATURE2_ISEL);
+
+ // hwcap mask for older 64-bit PPC CPUs with Altivec, e.g. G5, Cell.
+ static const unsigned long kHwcapMaskPPCG5 =
@@ -164,7 +167,7 @@ sp is supposed to point to a back chain at all times (V8 may not do this).
}
#elif V8_OS_AIX
-@@ -842,9 +839,13 @@
+@@ -842,9 +842,13 @@
part_ = kPPCPower6;
break;
case POWER_5: