More patch cleanup and clarifications.

- Added jit_arches conditionals for files not being built
  with Zero.
This commit is contained in:
Severin Gehwolf 2018-04-18 11:29:08 +02:00
parent 43a65df630
commit 5c40ec3f3e
7 changed files with 119 additions and 6 deletions

View File

@ -0,0 +1,27 @@
# HG changeset patch
# User aph
# Date 1501690960 -3600
# Wed Aug 02 17:22:40 2017 +0100
# Node ID 76ae018d7d596b9674c23901eaa41fe71674f19a
# Parent c68024d52834ce6551a558f4caac24491ea1bfae
8185723: Zero: segfaults on Power PC 32-bit
Reviewed-by: duke
diff --git a/src/os_cpu/linux_zero/vm/os_linux_zero.hpp b/src/os_cpu/linux_zero/vm/os_linux_zero.hpp
--- a/src/os_cpu/linux_zero/vm/os_linux_zero.hpp
+++ b/src/os_cpu/linux_zero/vm/os_linux_zero.hpp
@@ -38,10 +38,10 @@
static void atomic_copy64(volatile void *src, volatile void *dst) {
#if defined(PPC32)
double tmp;
- asm volatile ("lfd %0, 0(%1)\n"
- "stfd %0, 0(%2)\n"
- : "=f"(tmp)
- : "b"(src), "b"(dst));
+ asm volatile ("lfd %0, %2\n"
+ "stfd %0, %1\n"
+ : "=&f"(tmp), "=Q"(*(volatile double*)dst)
+ : "Q"(*(volatile double*)src));
#elif defined(S390) && !defined(_LP64)
double tmp;
asm volatile ("ld %0, %2\n"

View File

@ -0,0 +1,31 @@
# HG changeset patch
# User glaubitz
# Date 1511522185 -3600
# Fri Nov 24 12:16:25 2017 +0100
# Node ID 63dd266d5514681d6c84cc0ae8d667bc8b6d0c29
# Parent a9fbc10dc406312d79c088696811a21fe3bddfc0
8186461: Zero's atomic_copy64() should use SPE instructions on linux-powerpcspe
diff --git a/src/os_cpu/linux_zero/vm/os_linux_zero.hpp b/src/os_cpu/linux_zero/vm/os_linux_zero.hpp
--- a/src/os_cpu/linux_zero/vm/os_linux_zero.hpp
+++ b/src/os_cpu/linux_zero/vm/os_linux_zero.hpp
@@ -36,12 +36,18 @@
// Atomically copy 64 bits of data
static void atomic_copy64(volatile void *src, volatile void *dst) {
-#if defined(PPC32)
+#if defined(PPC32) && !defined(__SPE__)
double tmp;
asm volatile ("lfd %0, %2\n"
"stfd %0, %1\n"
: "=&f"(tmp), "=Q"(*(volatile double*)dst)
: "Q"(*(volatile double*)src));
+#elif defined(PPC32) && defined(__SPE__)
+ long tmp;
+ asm volatile ("evldd %0, %2\n"
+ "evstdd %0, %1\n"
+ : "=&r"(tmp), "=Q"(*(volatile long*)dst)
+ : "Q"(*(volatile long*)src));
#elif defined(S390) && !defined(_LP64)
double tmp;
asm volatile ("ld %0, %2\n"

View File

@ -0,0 +1,18 @@
diff --git openjdk/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.hpp openjdk/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.hpp
--- openjdk/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.hpp
+++ openjdk/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.hpp
@@ -44,10 +44,10 @@
: "b"(src), "b"(dst));
#elif defined(S390) && !defined(_LP64)
double tmp;
- asm volatile ("ld %0, 0(%1)\n"
- "std %0, 0(%2)\n"
- : "=r"(tmp)
- : "a"(src), "a"(dst));
+ asm volatile ("ld %0, %2\n"
+ "std %0, %1\n"
+ : "=&f"(tmp), "=Q"(*(volatile double*)dst)
+ : "Q"(*(volatile double*)src));
#else
*(jlong *) dst = *(jlong *) src;
#endif

View File

@ -488,7 +488,9 @@ exit 0
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/tnameserv
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/unpack200
%dir %{_jvmdir}/%{sdkdir -- %{?1}}/lib
%ifarch %{jit_arches}
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/classlist
%endif
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/jexec
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/jrt-fs.jar
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/modules
@ -523,7 +525,9 @@ exit 0
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libnio.so
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libprefs.so
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/librmi.so
%ifarch %{jit_arches}
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libsaproc.so
%endif
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libsctp.so
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libsunec.so
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libunpack.so
@ -604,7 +608,9 @@ exit 0
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/jdeps
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/jdeprscan
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/jimage
%ifarch %{jit_arches}
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/jhsdb
%endif
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/jinfo
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/jlink
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/jmap
@ -854,7 +860,7 @@ Provides: java-%{javaver}-%{origin}-accessiblity = %{epoch}:%{version}-%{release
Name: java-%{majorver}-%{origin}
Version: %{newjavaver}.%{buildver}
Release: 7%{?dist}
Release: 8%{?dist}
# java-1.5.0-ibm from jpackage.org set Epoch to 1 for unknown reasons,
# and this change was brought into RHEL-4. java-1.5.0-ibm packages
# also included the epoch in their virtual provides. This created a
@ -876,7 +882,7 @@ URL: http://openjdk.java.net/
# PROJECT_NAME=jdk-updates REPO_NAME=jdk9u VERSION=jdk-%%{majorver}.%%{minorver}.%%{securityver}+%%{buildver} ./generate_source_tarball.sh
#
# Example:
# PROJECT_NAME=jdk-updates REPO_NAME=jdk9u VERSION=jdk-9.0.4+11 ./generate_source_tarball.sh
# PROJECT_NAME=jdk-updates REPO_NAME=jdk9u VERSION=jdk-9.0.4+12 ./generate_source_tarball.sh
Source0: jdk-updates-jdk%{majorver}u-jdk-%{newjavaver}+%{buildver}.tar.xz
# Custom README for -src subpackage
@ -908,28 +914,43 @@ Source14: TestECDSA.java
# RPM/distribution specific patches
#
# NSS via SunPKCS11 Provider (disabled comment
# due to memory leak).
Patch1000: enableCommentedOutSystemNss.patch
# Ignore AWTError when assistive technologies are loaded
Patch1: accessible-toolkit.patch
# Restrict access to java-atk-wrapper classes
Patch2: java-atk-wrapper-security.patch
Patch3: system-nss-ec-rh1537049.patch
# Enable EC ciphers via SunEC provider and system NSS.
Patch3: RHBZ-1537049-system-nss-via-sunec.patch
Patch4: libjpeg-turbo-1.4-compat.patch
#
# OpenJDK specific patches
#
# s390 (Zero) build does not bootcycle without this patch
# Already in JDK-11. Missing backports.
Patch100: JDK-8201495-s390-java-opts.patch
# See JDK-8198844. This won't be needed any more in
# JDK 11+
Patch101: sorted-diff.patch
# Type fixing for s390
# Type fixing for s390 (Zero). Not upstream.
Patch102: java-9-openjdk-size_t.patch
Patch103: bootcycle_jobs.patch
# Arm (32 bit JIT) does not bootcycle without this fix.
# Pending upstream.
Patch103: JDK-8201788-arm-bootcycle-jobs.patch
# s390 (Zero) build fix. Pending upstream.
Patch104: JDK-8201509-s390-atomic_store.patch
Patch400: aarch64BuildFailure.patch
# aarch64 slowdebug build fix. Pending upstream
Patch400: JDK-8200556-aarch64-slowdebug-crash.patch
# Zero fixes for PPC32. Already in latest upstream,
# but in no JDK 9 repository. Missing backport.
Patch501: JDK-8185723-zero-atomic_copy64-ppc1.patch
Patch502: JDK-8186461-zero-atomic_copy64-ppc2.patch
BuildRequires: autoconf
BuildRequires: automake
@ -1222,8 +1243,14 @@ sh %{SOURCE12}
%patch101 -p1
%patch102 -p1
%patch103 -p1
%patch104 -p1
%patch400 -p1
pushd hotspot
%patch501 -p1
%patch502 -p1
popd # hotspot
popd # openjdk
%patch1000
@ -1807,6 +1834,16 @@ require "copy_jdk_configs.lua"
%changelog
* Wed Apr 18 2018 Severin Gehwolf <sgehwolf@redhat.com> - 1:9.0.4.11-8
- Add Zero build fixes for ppc (32 bit) Zero and s390 (32 bit) Zero:
JDK-8185723-zero-atomic_copy64-ppc1.patch,
JDK-8186461-zero-atomic_copy64-ppc2.patch,
JDK-8201509-s390-atomic_store.patch
- Renamed some patches for clarity:
bootcycle_jobs.patch => JDK-8201788-arm-bootcycle-jobs.patch
system-nss-ec-rh1537049.patch => RHBZ-1537049-system-nss-via-sunec.patch
aarch64BuildFailure.patch => JDK-8200556-aarch64-slowdebug-crash.patch
* Tue Apr 17 2018 Severin Gehwolf <sgehwolf@redhat.com> - 1:9.0.4.11-7
- Remove JDK-8195685, JDK-8196136, JDK-8195859, JDK-8196221
now upstream.