diff --git a/0001-add-pagesize-64k-support.patch b/0001-add-pagesize-64k-support.patch new file mode 100644 index 0000000000000000000000000000000000000000..e7f8e73d9e159fe2b95a42981d1d6415cdf2c795 --- /dev/null +++ b/0001-add-pagesize-64k-support.patch @@ -0,0 +1,114 @@ +From 481f91521af752751ed7d965686145a1b08ae491 Mon Sep 17 00:00:00 2001 +From: root +Date: Thu, 9 Feb 2023 10:14:27 +0800 +Subject: [PATCH] add pagesize 64k support + +--- + .../partition_allocator/page_allocator_constants.h | 6 ++++-- + .../partition_allocator/partition_alloc_constants.h | 4 +++- + src/3rdparty/chromium/build/config/BUILD.gn | 4 ++++ + src/3rdparty/chromium/build/config/features.gni | 2 ++ + .../third_party/blink/renderer/platform/heap/heap_page.h | 2 +- + src/core/config/linux.pri | 7 +++++++ + 6 files changed, 21 insertions(+), 4 deletions(-) + +diff --git a/src/3rdparty/chromium/base/allocator/partition_allocator/page_allocator_constants.h b/src/3rdparty/chromium/base/allocator/partition_allocator/page_allocator_constants.h +index 555700a7d..55933b6f3 100644 +--- a/src/3rdparty/chromium/base/allocator/partition_allocator/page_allocator_constants.h ++++ b/src/3rdparty/chromium/base/allocator/partition_allocator/page_allocator_constants.h +@@ -10,7 +10,7 @@ + #include "build/build_config.h" + + namespace base { +-#if defined(OS_WIN) || defined(ARCH_CPU_PPC64) ++#if defined(OS_WIN) || defined(ARCH_CPU_PPC64) || defined (PAGESIZE_64K) + static constexpr size_t kPageAllocationGranularityShift = 16; // 64KB + #elif defined(_MIPS_ARCH_LOONGSON) + static constexpr size_t kPageAllocationGranularityShift = 14; // 16KB +@@ -24,7 +24,9 @@ static constexpr size_t kPageAllocationGranularityOffsetMask = + static constexpr size_t kPageAllocationGranularityBaseMask = + ~kPageAllocationGranularityOffsetMask; + +-#if defined(_MIPS_ARCH_LOONGSON) ++#if defined(PAGESIZE_64K) ++static const size_t kSystemPageSize = 65536; ++#elif defined(_MIPS_ARCH_LOONGSON) + static constexpr size_t kSystemPageSize = 16384; + #elif defined(ARCH_CPU_PPC64) + // Modern ppc64 systems support 4KB and 64KB page sizes. +diff --git a/src/3rdparty/chromium/base/allocator/partition_allocator/partition_alloc_constants.h b/src/3rdparty/chromium/base/allocator/partition_allocator/partition_alloc_constants.h +index fbc851c15..b6efa1f2b 100644 +--- a/src/3rdparty/chromium/base/allocator/partition_allocator/partition_alloc_constants.h ++++ b/src/3rdparty/chromium/base/allocator/partition_allocator/partition_alloc_constants.h +@@ -35,7 +35,9 @@ static const size_t kBucketShift = (kAllocationGranularity == 8) ? 3 : 2; + // other constant values, we pack _all_ `PartitionRootGeneric::Alloc` sizes + // perfectly up against the end of a system page. + +-#if defined(_MIPS_ARCH_LOONGSON) ++#if defined(PAGESIZE_64K) ++static const size_t kPartitionPageShift = 18; // 256KB ++#elif defined(_MIPS_ARCH_LOONGSON) + static const size_t kPartitionPageShift = 16; // 64 KiB + #elif defined(ARCH_CPU_PPC64) + static const size_t kPartitionPageShift = 18; // 256 KiB +diff --git a/src/3rdparty/chromium/build/config/BUILD.gn b/src/3rdparty/chromium/build/config/BUILD.gn +index e2462f189..5fc344311 100644 +--- a/src/3rdparty/chromium/build/config/BUILD.gn ++++ b/src/3rdparty/chromium/build/config/BUILD.gn +@@ -112,6 +112,10 @@ config("feature_flags") { + defines += [ "TOOLKIT_QT" ] + } + ++ if (use_pagesize_64k) { ++ defines += [ "PAGESIZE_64K" ] ++ } ++ + # ============================================== + # PLEASE DO NOT ADD MORE THINGS TO THIS LIST + # ============================================== +diff --git a/src/3rdparty/chromium/build/config/features.gni b/src/3rdparty/chromium/build/config/features.gni +index 390e9f006..8810f76f3 100644 +--- a/src/3rdparty/chromium/build/config/features.gni ++++ b/src/3rdparty/chromium/build/config/features.gni +@@ -33,6 +33,8 @@ declare_args() { + use_gio = is_linux && !is_chromeos && !is_chromecast + + use_qt = false ++ ++ use_pagesize_64k = false + } + # + # ============================================= +diff --git a/src/3rdparty/chromium/third_party/blink/renderer/platform/heap/heap_page.h b/src/3rdparty/chromium/third_party/blink/renderer/platform/heap/heap_page.h +index f9f007611..ce16abc38 100644 +--- a/src/3rdparty/chromium/third_party/blink/renderer/platform/heap/heap_page.h ++++ b/src/3rdparty/chromium/third_party/blink/renderer/platform/heap/heap_page.h +@@ -69,7 +69,7 @@ constexpr size_t kBlinkPageBaseMask = ~kBlinkPageOffsetMask; + constexpr size_t kBlinkPagesPerRegion = 10; + + // TODO(nya): Replace this with something like #if ENABLE_NACL. +-#if defined(ARCH_CPU_PPC64) ++#if defined(ARCH_CPU_PPC64) || defined(PAGESIZE_64K) + // NaCl's system page size is 64 KiB. This causes a problem in Oilpan's heap + // layout because Oilpan allocates two guard pages for each Blink page (whose + // size is kBlinkPageSize = 2^17 = 128 KiB). So we don't use guard pages in +diff --git a/src/core/config/linux.pri b/src/core/config/linux.pri +index 26d0dcf7d..99bb779fb 100644 +--- a/src/core/config/linux.pri ++++ b/src/core/config/linux.pri +@@ -1,5 +1,12 @@ + include(common.pri) + ++get_pagesize_res = $$system( getconf PAGESIZE ) ++message(system kernel pagesize is $$get_pagesize_res) ++equals(get_pagesize_res , 65536){ ++ message("system kernel pagesize is 64k,set use_pagesize_64k true.") ++ gn_args += use_pagesize_64k=true ++} ++ + qtConfig(webengine-embedded-build) { + gn_args += is_desktop_linux=false + } +-- +2.31.1 + diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index a110cd5b796df5087113b3e60da0db7de4a5a1fe..d38472c3bad2cf4460e5bb0eb196d27ffbc31f8e 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -1,3 +1,4 @@ +Excludearch:loongarch64 %global qt_module qtwebengine %global _hardened_build 1 @@ -53,7 +54,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.15.2 -Release: 1%{?dist} +Release: 1%{?dist}.04 # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -101,7 +102,7 @@ Patch24: qtwebengine-everywhere-src-5.11.3-aarch64-new-stat.patch Patch26: qtwebengine-everywhere-5.13.2-use-python2.patch # Missing #includes for gcc-11 Patch27: qtwebengine-gcc11.patch - +Patch100: 0001-add-pagesize-64k-support.patch ## Upstream patches: %if 0%{?fedora} || 0%{?epel} > 7 @@ -402,6 +403,7 @@ popd %patch24 -p1 -b .aarch64-new-stat %patch26 -p1 -b .use-python2 %patch27 -p1 -b .gcc11 +%patch100 -p1 # the xkbcommon config/feature was renamed in 5.12, so need to adjust QT_CONFIG references # when building on older Qt releases @@ -632,6 +634,18 @@ done %changelog +* Wed Mar 01 2023 liweiganga - 5.15.2-1.04 +- feat: modify patch100 + +* Thu Feb 09 2023 mahailiang - 5.15.2-1.03 +- feat: add pagesize 64k support + +* Wed Jan 11 2023 liweiganga - 5.15.2-1.02 +- rebuild: rebuild (libevent) + +* Tue Dec 06 2022 binyanling - 5.15.2-1.01 +- arch:Excludearch loongarch64 + * Fri Nov 20 09:12:35 CET 2020 Jan Grulich - 5.15.2-1 - 5.15.2