Remove Backport JDK-8316859 for riscv64

This commit is contained in:
Dingli Zhang 2024-07-15 04:23:45 +00:00
parent 724977b05e
commit 842a14722f
3 changed files with 10 additions and 54 deletions

View File

@ -1,38 +0,0 @@
From 1013f0b0b911d24eed216485767ec6eb080afa81 Mon Sep 17 00:00:00 2001
From: Ludovic Henry <git@ludovic.dev>
Date: Mon, 25 Sep 2023 08:01:45 +0000
Subject: [PATCH] 8316859: RISC-V: Disable detection of V through HWCAP
---
.../os_cpu/linux_riscv/vm_version_linux_riscv.cpp | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/src/hotspot/os_cpu/linux_riscv/vm_version_linux_riscv.cpp b/src/hotspot/os_cpu/linux_riscv/vm_version_linux_riscv.cpp
index 454ffbb06d390..69bbf9f366b31 100644
--- a/src/hotspot/os_cpu/linux_riscv/vm_version_linux_riscv.cpp
+++ b/src/hotspot/os_cpu/linux_riscv/vm_version_linux_riscv.cpp
@@ -149,12 +149,21 @@ void VM_Version::setup_cpu_available_features() {
void VM_Version::os_aux_features() {
uint64_t auxv = getauxval(AT_HWCAP);
- int i = 0;
- while (_feature_list[i] != nullptr) {
+ for (int i = 0; _feature_list[i] != nullptr; i++) {
+ if (_feature_list[i]->feature_bit() == HWCAP_ISA_V) {
+ // Special case for V: some dev boards only support RVV version 0.7, while
+ // the OpenJDK only supports RVV version 1.0. These two versions are not
+ // compatible with each other. Given the V bit is set through HWCAP on
+ // some custom kernels, regardless of the version, it can lead to
+ // generating V instructions on boards that don't support RVV version 1.0
+ // (ex: Sipeed LicheePi), leading to a SIGILL.
+ // That is an acceptable workaround as only Linux Kernel v6.5+ supports V,
+ // and that version already support hwprobe anyway
+ continue;
+ }
if ((_feature_list[i]->feature_bit() & auxv) != 0) {
_feature_list[i]->enable_feature();
}
- i++;
}
}

Binary file not shown.

View File

@ -898,7 +898,7 @@ Name: java-latest-%{origin}
Version: %{newjavaver}.%{buildver}
# This package needs `.rolling` as part of Release so as to not conflict on install with
# java-X-openjdk. I.e. when latest rolling release is also an LTS release packaged as
Release: 2
Release: 3
# 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
@ -936,6 +936,7 @@ URL: http://openjdk.java.net/
Source0: jdk-updates-jdk%{majorver}u-jdk-%{filever}+%{buildver}.tar.gz
Source1: OpenJDK21U-jdk_aarch64_linux_hotspot_21.0.3_9.tar.gz
Source2: OpenJDK21U-jdk_x64_linux_hotspot_21.0.3_9.tar.gz
Source3: https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.3%2B9/OpenJDK21U-jdk_riscv64_linux_hotspot_21.0.3_9.tar.gz
Source8: systemtap_3.2_tapsets_hg-icedtea8-9d464368e06d.tar.xz
# Desktop files. Adapted from IcedTea
@ -980,13 +981,6 @@ Patch3: rh649512-remove_uses_of_far_in_jpeg_libjpeg_turbo_1_4_compat_for_jdk10_a
Patch7: downgrade-the-glibc-symver-of-memcpy.patch
Patch8: downgrade-the-glibc-symver-of-log2f-posix_spawn.patch
############################################
#
# RISC-V specific patches
#
############################################
Patch2000: 8316859-RISC-V-Disable-detection-of-V-through-HWCAP.patch
############################################
#
# LoongArch64 specific patches
@ -1227,12 +1221,6 @@ popd # openjdk
%patch1000
%ifarch riscv64
pushd %{top_level_dir_name}
%patch2000 -p1
popd
%endif
%ifarch loongarch64
pushd %{top_level_dir_name}
%patch3000 -p1
@ -1350,7 +1338,8 @@ elif [ "$ARCH" = "aarch64" ]; then
tar -xf %{SOURCE1}
BOOTJDKPATH=$PWD/jdk-21.0.3+9
elif [ "$ARCH" = "riscv64" ]; then
:
tar -xf %{SOURCE3}
BOOTJDKPATH=$PWD/jdk-21.0.3+9
elif [ "$ARCH" = "loongarch64" ]; then
:
elif [ "$ARCH" = "ppc64le" ]; then
@ -1810,10 +1799,15 @@ cjc.mainProgram(arg)
%changelog
* Fri Jul 12 2024 Dingli Zhang <dingli@iscas.ac.cn> - 1:22.0.0.36-3
- Remove Backport JDK-8316859 for riscv64
- Fix typo in changelog
- Add bootjdk for riscv64
* Tue Jun 25 2024 panxuefeng <panxuefeng@loongson.cn> - 1:22.0.0.36-2
- update to jdk22+36 for loongarch64
* Tue Jun 25 2024 peng.zou <peng.zou@shingroup.cn> - 1:21.0.0.36-1
* Tue Jun 25 2024 peng.zou <peng.zou@shingroup.cn> - 1:22.0.0.36-1
- Add support for ppc64le
* Wed Jun 05 2024 Autistic_boyya <wangzhongyi7@huawei.com> - 1:22.0.0.36-rolling