From: Clark Williams <willi...@redhat.com> rt-64k: Enable building 64k page-size RT kernel
Add changes to priority files, specfile, variants file and configs to enable building 64-page-size RT kernel. Note that this only works for ELN and is disabled on Fedora Signed-off-by: Clark Williams <willi...@redhat.com> diff --git a/redhat/configs/common/rt/arm/aarch64/64k/CONFIG_ARM64_4K_PAGES b/redhat/configs/common/rt/arm/aarch64/64k/CONFIG_ARM64_4K_PAGES new file mode 100644 index blahblah..blahblah 100644 --- /dev/null +++ b/redhat/configs/common/rt/arm/aarch64/64k/CONFIG_ARM64_4K_PAGES @@ -0,0 +1 @@ +# CONFIG_ARM64_4K_PAGES is not set diff --git a/redhat/configs/common/rt/arm/aarch64/64k/CONFIG_ARM64_64K_PAGES b/redhat/configs/common/rt/arm/aarch64/64k/CONFIG_ARM64_64K_PAGES new file mode 100644 index blahblah..blahblah 100644 --- /dev/null +++ b/redhat/configs/common/rt/arm/aarch64/64k/CONFIG_ARM64_64K_PAGES @@ -0,0 +1 @@ +CONFIG_ARM64_64K_PAGES=y diff --git a/redhat/configs/common/rt/arm/aarch64/64k/CONFIG_ARM64_PA_BITS_48 b/redhat/configs/common/rt/arm/aarch64/64k/CONFIG_ARM64_PA_BITS_48 new file mode 100644 index blahblah..blahblah 100644 --- /dev/null +++ b/redhat/configs/common/rt/arm/aarch64/64k/CONFIG_ARM64_PA_BITS_48 @@ -0,0 +1 @@ +# CONFIG_ARM64_PA_BITS_48 is not set diff --git a/redhat/configs/common/rt/arm/aarch64/64k/CONFIG_ARM64_PA_BITS_52 b/redhat/configs/common/rt/arm/aarch64/64k/CONFIG_ARM64_PA_BITS_52 new file mode 100644 index blahblah..blahblah 100644 --- /dev/null +++ b/redhat/configs/common/rt/arm/aarch64/64k/CONFIG_ARM64_PA_BITS_52 @@ -0,0 +1 @@ +CONFIG_ARM64_PA_BITS_52=y diff --git a/redhat/configs/common/rt/arm/aarch64/64k/CONFIG_ARM64_VA_BITS_42 b/redhat/configs/common/rt/arm/aarch64/64k/CONFIG_ARM64_VA_BITS_42 new file mode 100644 index blahblah..blahblah 100644 --- /dev/null +++ b/redhat/configs/common/rt/arm/aarch64/64k/CONFIG_ARM64_VA_BITS_42 @@ -0,0 +1 @@ +# CONFIG_ARM64_VA_BITS_42 is not set diff --git a/redhat/configs/common/rt/arm/aarch64/64k/CONFIG_ARM64_VA_BITS_48 b/redhat/configs/common/rt/arm/aarch64/64k/CONFIG_ARM64_VA_BITS_48 new file mode 100644 index blahblah..blahblah 100644 --- /dev/null +++ b/redhat/configs/common/rt/arm/aarch64/64k/CONFIG_ARM64_VA_BITS_48 @@ -0,0 +1 @@ +CONFIG_ARM64_VA_BITS_48=y diff --git a/redhat/configs/common/rt/arm/aarch64/64k/CONFIG_FORCE_MAX_ZONEORDER b/redhat/configs/common/rt/arm/aarch64/64k/CONFIG_FORCE_MAX_ZONEORDER new file mode 100644 index blahblah..blahblah 100644 --- /dev/null +++ b/redhat/configs/common/rt/arm/aarch64/64k/CONFIG_FORCE_MAX_ZONEORDER @@ -0,0 +1,3 @@ +# This relies on an out of tree patch to arch/arm64/Kconfig +# Otherwise, we would be stuck with a default of 10 +CONFIG_ARCH_FORCE_MAX_ORDER=13 diff --git a/redhat/configs/common/rt/arm/aarch64/64k/CONFIG_PAGE_SIZE_64KB b/redhat/configs/common/rt/arm/aarch64/64k/CONFIG_PAGE_SIZE_64KB new file mode 100644 index blahblah..blahblah 100644 --- /dev/null +++ b/redhat/configs/common/rt/arm/aarch64/64k/CONFIG_PAGE_SIZE_64KB @@ -0,0 +1 @@ +CONFIG_PAGE_SIZE_64KB=y diff --git a/redhat/configs/priority.fedora b/redhat/configs/priority.fedora index blahblah..blahblah 100644 --- a/redhat/configs/priority.fedora +++ b/redhat/configs/priority.fedora @@ -40,6 +40,8 @@ aarch64-16k=generic:generic-arm:generic-arm-aarch64:generic-arm-aarch64-16k aarch64-16k-debug=generic:generic-arm:generic-arm-aarch64:generic-arm-aarch64-16k:debug:debug-arm-aarch64:debug-arm-aarch64-16k aarch64-rt=generic:generic-arm:generic-arm-aarch64:rt-generic:rt-generic-arm:rt-generic-arm-aarch64 aarch64-rt-debug=generic:generic-arm:generic-arm-aarch64:debug:debug-arm:debug-arm-aarch64:rt-generic:rt-generic-arm:rt-generic-arm-aarch64:rt-debug:rt-debug-arm:rt-debug-arm-aarch64 +aarch64-rt-64k=generic:generic-arm:generic-arm-aarch64:rt-generic:rt-arm-aarch64:rt-arm-aarch64-64k +aarch64-rt-64k-debug=generic:generic-arm:generic-arm-aarch64:rt-generic:rt-arm-aarch64:rt-arm-aarch64-64k:debug:debug-arm-aarch64:rt-debug # riscv64 riscv64=generic:generic-riscv:generic-riscv-riscv64 diff --git a/redhat/configs/priority.rhel b/redhat/configs/priority.rhel index blahblah..blahblah 100644 --- a/redhat/configs/priority.rhel +++ b/redhat/configs/priority.rhel @@ -42,5 +42,7 @@ aarch64-64k=generic:generic-arm:generic-arm-aarch64:generic-arm-aarch64-64k aarch64-64k-debug=generic:generic-arm:generic-arm-aarch64:generic-arm-aarch64-64k:debug:debug-arm-aarch64:debug-arm-aarch64-64k aarch64-rt=generic:generic-arm:generic-arm-aarch64:rt-generic:rt-generic-arm:rt-generic-arm-aarch64 aarch64-rt-debug=generic:generic-arm:generic-arm-aarch64:debug:debug-arm:debug-arm-aarch64:rt-generic:rt-generic-arm:rt-generic-arm-aarch64:rt-debug:rt-debug-arm:rt-debug-arm-aarch64 +aarch64-rt-64k=generic:generic-arm:generic-arm-aarch64:rt-generic:rt-arm-aarch64:rt-arm-aarch64-64k +aarch64-rt-64k-debug=generic:generic-arm:generic-arm-aarch64:rt-generic:rt-arm-aarch64:rt-arm-aarch64-64k:debug:debug-arm-aarch64:rt-debug aarch64-automotive=generic:generic-arm:generic-arm-aarch64:rt-generic:rt-generic-arm:rt-generic-arm-aarch64:automotive-generic:automotive-generic-arm:automotive-generic-arm-aarch64 aarch64-automotive-debug=generic:generic-arm:generic-arm-aarch64:debug:debug-arm:debug-arm-aarch64:rt-generic:rt-generic-arm:rt-generic-arm-aarch64:rt-debug:rt-debug-arm:rt-debug-arm-aarch64:automotive-generic:automotive-generic-arm:automotive-generic-arm-aarch64:automotive-debug:automotive-debug-arm:automotive-debug-arm-aarch64 diff --git a/redhat/kernel.spec.template b/redhat/kernel.spec.template index blahblah..blahblah 100644 --- a/redhat/kernel.spec.template +++ b/redhat/kernel.spec.template @@ -207,6 +207,8 @@ Summary: The Linux kernel %define with_arm64_64k %{?_without_arm64_64k: 0} %{?!_without_arm64_64k: 1} # kernel-rt (x86_64 and aarch64 only PREEMPT_RT enabled kernel) %define with_realtime %{?_without_realtime: 0} %{?!_without_realtime: 1} +# kernel-rt-64k (aarch64 RT kernel with 64K page_size) +%define with_realtime_arm64_64k %{?_without_realtime_arm64_64k: 0} %{?!_without_realtime_arm64_64k: 1} # kernel-automotive (x86_64 and aarch64 with PREEMPT_RT enabled - currently off by default) %define with_automotive %{?_with_automotive: 1} %{?!_with_automotive: 0} @@ -301,6 +303,7 @@ Summary: The Linux kernel %define with_kernel_abi_stablelists 0 %define with_arm64_64k 0 %define with_realtime 0 +%define with_realtime_arm64_64k 0 %define with_automotive 0 %endif @@ -393,6 +396,7 @@ Summary: The Linux kernel # if requested, only build realtime kernel %if %{with_rtonly} %define with_realtime 1 +%define with_realtime_arm64_64k 1 %define with_automotive 0 %define with_up 0 %define with_debug 0 @@ -435,6 +439,7 @@ Summary: The Linux kernel # automotive does not support the following variants %define with_realtime 0 +%define with_realtime_arm64_64k 0 %define with_arm64_16k 0 %define with_arm64_64k 0 %define with_efiuki 0 @@ -514,6 +519,7 @@ Summary: The Linux kernel %ifnarch aarch64 %define with_arm64_16k 0 %define with_arm64_64k 0 +%define with_realtime_arm64_64k 0 %endif %if 0%{?fedora} @@ -591,6 +597,7 @@ Summary: The Linux kernel %define with_arm64_16k 0 %define with_arm64_64k 0 %define with_realtime 0 +%define with_realtime_arm64_64k 0 %define with_automotive 0 %define with_debuginfo 0 @@ -654,6 +661,11 @@ Summary: The Linux kernel %else %define with_arm64_64k_base 0 %endif +%if %{with_realtime_arm64_64k} && %{with_base} +%define with_realtime_arm64_64k_base 1 +%else +%define with_realtime_arm64_64k_base 0 +%endif # # Packages that need to be installed before the kernel is, because the %%post @@ -1024,25 +1036,29 @@ Source301: kernel-kabi-dw-%{kabiversion}.tar.xz %if 0%{include_rhel} Source474: %{name}-aarch64-rt-rhel.config Source475: %{name}-aarch64-rt-debug-rhel.config -Source476: %{name}-x86_64-rt-rhel.config -Source477: %{name}-x86_64-rt-debug-rhel.config +Source476: %{name}-aarch64-rt-64k-rhel.config +Source477: %{name}-aarch64-rt-64k-debug-rhel.config +Source478: %{name}-x86_64-rt-rhel.config +Source479: %{name}-x86_64-rt-debug-rhel.config %endif %if 0%{include_fedora} -Source478: %{name}-aarch64-rt-fedora.config -Source479: %{name}-aarch64-rt-debug-fedora.config -Source480: %{name}-x86_64-rt-fedora.config -Source481: %{name}-x86_64-rt-debug-fedora.config -Source482: %{name}-riscv64-rt-fedora.config -Source483: %{name}-riscv64-rt-debug-fedora.config +Source480: %{name}-aarch64-rt-fedora.config +Source481: %{name}-aarch64-rt-debug-fedora.config +Source482: %{name}-aarch64-rt-64k-fedora.config +Source483: %{name}-aarch64-rt-64k-debug-fedora.config +Source484: %{name}-x86_64-rt-fedora.config +Source485: %{name}-x86_64-rt-debug-fedora.config +Source486: %{name}-riscv64-rt-fedora.config +Source487: %{name}-riscv64-rt-debug-fedora.config %endif %endif %if %{include_automotive} # automotive config files -Source484: %{name}-aarch64-automotive-rhel.config -Source485: %{name}-aarch64-automotive-debug-rhel.config -Source486: %{name}-x86_64-automotive-rhel.config -Source487: %{name}-x86_64-automotive-debug-rhel.config +Source488: %{name}-aarch64-automotive-rhel.config +Source489: %{name}-aarch64-automotive-debug-rhel.config +Source490: %{name}-x86_64-automotive-rhel.config +Source491: %{name}-x86_64-automotive-debug-rhel.config %endif @@ -1527,7 +1543,7 @@ summary: kernel meta-package for the %{1} kernel\ Requires: kernel-%{1}-core-uname-r = %{KVERREL}%{uname_suffix %{1}}\ Requires: kernel-%{1}-modules-uname-r = %{KVERREL}%{uname_suffix %{1}}\ Requires: kernel-%{1}-modules-core-uname-r = %{KVERREL}%{uname_suffix %{1}}\ -%if "%{1}" == "rt" || "%{1}" == "rt-debug"\ +%if "%{1}" == "rt" || "%{1}" == "rt-debug" || "%{1}" == "rt-64k" || "%{1}" == "rt-64k-debug"\ Requires: realtime-setup\ %endif\ Provides: installonlypkg(kernel)\ @@ -1535,7 +1551,7 @@ Provides: installonlypkg(kernel)\ The meta-package for the %{1} kernel\ %{nil} -%if %{with_realtime} +%if %{with_realtime} || %{with_realtime_arm64_64k} # # this macro creates a kernel-rt-<subpackage>-kvm package # %%kernel_kvm_package <subpackage> @@ -1584,7 +1600,7 @@ Requires: kernel-%{?1:%{1}-}-modules-core-uname-r = %{KVERREL}%{uname_variant %{ %endif\ %{expand:%%kernel_debuginfo_package %{?1:%{1}}}\ %endif\ -%if "%{1}" == "rt" || "%{1}" == "rt-debug"\ +%if "%{1}" == "rt" || "%{1}" == "rt-debug" || "%{1}" == "rt-64k" || "%{1}" == "rt-64k-debug"\ %{expand:%%kernel_kvm_package %{?1:%{1}} %{!?{-n}:%{1}}%{?{-n}:%{-n*}}}\ %else \ %if %{with_efiuki}\ @@ -1707,6 +1723,29 @@ This package includes a version of the Linux kernel compiled with the PREEMPT_RT real-time preemption support %endif +%if %{with_realtime_arm64_64k_base} +%define variant_summary The Linux PREEMPT_RT kernel compiled for 64k pagesize usage +%kernel_variant_package rt-64k +%description rt-64k-core +The kernel package contains a variant of the ARM64 Linux PREEMPT_RT kernel using +a 64K page size. +%endif + +%if %{with_realtime_arm64_64k} && %{with_debug} +%define variant_summary The Linux PREEMPT_RT kernel compiled with extra debugging enabled +%if !%{debugbuildsenabled} +%kernel_variant_package -m rt-64k-debug +%else +%kernel_variant_package rt-64k-debug +%endif +%description rt-64k-debug-core +The debug kernel package contains a variant of the ARM64 Linux PREEMPT_RT kernel using +a 64K page size. +This variant of the kernel has numerous debugging options enabled. +It should only be installed when trying to gather additional information +on kernel bugs, as some of these options impact performance noticably. +%endif + %if %{with_debug} && %{with_automotive} %define variant_summary The Linux Automotive kernel compiled with extra debugging enabled %kernel_variant_package automotive-debug @@ -2656,7 +2695,7 @@ BuildKernel() { # Copy the System.map file for depmod to use cp System.map $RPM_BUILD_ROOT/. - if [[ "$Variant" == "rt" || "$Variant" == "rt-debug" || "$Variant" == "automotive" || "$Variant" == "automotive-debug" ]]; then + if [[ "$Variant" == "rt" || "$Variant" == "rt-debug" || "$Variant" == "rt-64k" || "$Variant" == "rt-64k-debug" || "$Variant" == "automotive" || "$Variant" == "automotive-debug" ]]; then %{log_msg "Skipping efiuki build"} else %if %{with_efiuki} @@ -2811,6 +2850,9 @@ BuildKernel() { if [[ "$Variant" == "rt" || "$Variant" == "rt-debug" ]]; then variants_param="-r rt" fi + if [[ "$Variant" == "rt-64k" || "$Variant" == "rt-64k-debug" ]]; then + variants_param="-r rt-64k" + fi if [[ "$Variant" == "automotive" || "$Variant" == "automotive-debug" ]]; then variants_param="-r automotive" fi @@ -2836,6 +2878,9 @@ BuildKernel() { if [[ "$Variant" == "rt" || "$Variant" == "rt-debug" ]]; then create_module_file_list "kvm" ../modules-rt-kvm.list ../kernel${Variant:+-${Variant}}-modules-rt-kvm.list 0 1 fi + if [[ "$Variant" == "rt-64k" || "$Variant" == "rt-64k-debug" ]]; then + create_module_file_list "kvm" ../modules-rt-64k-kvm.list ../kernel${Variant:+-${Variant}}-modules-rt-64k-kvm.list 0 1 + fi %if 0%{!?fedora:1} create_module_file_list "partner" ../modules-partner.list ../kernel${Variant:+-${Variant}}-modules-partner.list 1 1 %endif @@ -2945,6 +2990,10 @@ cd linux-%{KVERREL} BuildKernel %make_target %kernel_image %{_use_vdso} rt-debug %endif +%if %{with_realtime_arm64_64k} +BuildKernel %make_target %kernel_image %{_use_vdso} rt-64k-debug +%endif + %if %{with_automotive} BuildKernel %make_target %kernel_image %{_use_vdso} automotive-debug %endif @@ -2978,6 +3027,10 @@ BuildKernel %make_target %kernel_image %{_use_vdso} 64k BuildKernel %make_target %kernel_image %{_use_vdso} rt %endif +%if %{with_realtime_arm64_64k_base} +BuildKernel %make_target %kernel_image %{_use_vdso} rt-64k +%endif + %if %{with_automotive_base} BuildKernel %make_target %kernel_image %{_use_vdso} automotive %endif @@ -2987,7 +3040,7 @@ BuildKernel %make_target %kernel_image %{_use_vdso} %endif %ifnarch noarch i686 %{nobuildarches} -%if !%{with_debug} && !%{with_zfcpdump} && !%{with_up} && !%{with_arm64_16k} && !%{with_arm64_64k} && !%{with_realtime} && !%{with_automotive} +%if !%{with_debug} && !%{with_zfcpdump} && !%{with_up} && !%{with_arm64_16k} && !%{with_arm64_64k} && !%{with_realtime} && !%{with_realtime_arm64_64k} && !%{with_automotive} # If only building the user space tools, then initialize the build environment # and some variables so that the various userspace tools can be built. %{log_msg "Initialize userspace tools build environment"} @@ -3627,7 +3680,7 @@ fi\ /sbin/depmod -a %{KVERREL}%{?1:+%{1}}\ %{nil} -%if %{with_realtime} +%if %{with_realtime} || %{with_realtime_arm64_64k} # # This macro defines a %%post script for a kernel*-kvm package. # It also defines a %%postun script that does the same thing. @@ -3821,6 +3874,18 @@ fi\ %kernel_kvm_post rt-debug %endif +%if %{with_realtime_arm64_64k_base} +%kernel_variant_preun -v rt-64k +%kernel_variant_post -v rt-64k +%kernel_kvm_post rt-64k +%endif + +%if %{with_debug} && %{with_realtime_arm64_64k} +%kernel_variant_preun -v rt-64k-debug +%kernel_variant_post -v rt-64k-debug +%kernel_kvm_post rt-64k-debug +%endif + %if %{with_automotive} && %{with_debug} %kernel_variant_preun -v automotive-debug %kernel_variant_post -v automotive-debug @@ -4102,9 +4167,13 @@ fi\ %{expand:%%files -f debuginfo%{?3}.list %{?3:%{3}-}debuginfo}\ %endif\ %endif\ +%if "%{3}" == "rt" || "%{3}" == "rt-debug" || "%{3}" == "rt-64k" || "%{3}" == "rt-64k-debug"\ %if "%{3}" == "rt" || "%{3}" == "rt-debug"\ %{expand:%%files -f kernel-%{?3:%{3}-}modules-rt-kvm.list %{?3:%{3}-}kvm}\ %else\ +%{expand:%%files -f kernel-%{?3:%{3}-}modules-rt-64k-kvm.list %{?3:%{3}-}kvm}\ +%endif\ +%else\ %if %{with_efiuki}\ %{expand:%%files %{?3:%{3}-}uki-virt}\ %dir /lib/modules\ @@ -4178,6 +4247,10 @@ fi\ %kernel_variant_files %{_use_vdso} %{with_zfcpdump} zfcpdump %kernel_variant_files %{_use_vdso} %{with_arm64_16k_base} 16k %kernel_variant_files %{_use_vdso} %{with_arm64_64k_base} 64k +%kernel_variant_files %{_use_vdso} %{with_realtime_arm64_64k_base} rt-64k +%if %{with_realtime_arm64_64k} +%kernel_variant_files %{_use_vdso} %{with_debug} rt-64k-debug +%endif # plz don't put in a version string unless you're going to tag # and build. diff --git a/redhat/rhel_files/def_variants.yaml.rhel b/redhat/rhel_files/def_variants.yaml.rhel index blahblah..blahblah 100644 --- a/redhat/rhel_files/def_variants.yaml.rhel +++ b/redhat/rhel_files/def_variants.yaml.rhel @@ -16,6 +16,10 @@ packages: if_variant_in: ["rt"] depends-on: - modules-core + - name: modules-rt-64k-kvm + if_variant_in: ["rt-64k"] + depends-on: + - modules-core - name: modules-partner depends-on: - modules-core @@ -28,6 +32,8 @@ rules: - arch/x86/kvm/kvm(-amd|-intel|\.).*: modules-rt-kvm if_variant_in: ["rt"] + - arch/x86/kvm/kvm(-amd|-intel|\.).*: modules-rt-64k-kvm + if_variant_in: ["rt-64k"] - arch/.*: modules-core - block/t10-pi.ko: modules-core @@ -80,6 +86,8 @@ rules: - drivers/gpio/.*: modules-core - drivers/gpu/drm/i915/kvmgt.*: modules-rt-kvm if_variant_in: ["rt"] + - drivers/gpu/drm/i915/kvmgt.*: modules-rt-64k-kvm + if_variant_in: ["rt-64k"] - drivers/gpu/drm/display/drm_.*: modules-core - drivers/gpu/drm/drm.*: modules-core - drivers/gpu/drm/etnaviv/.*: modules-core @@ -258,6 +266,8 @@ rules: - drivers/pps/.*: modules-core - drivers/ptp/ptp_kvm.*: modules-rt-kvm if_variant_in: ["rt"] + - drivers/ptp/ptp_kvm.*: modules-rt-64k-kvm + if_variant_in: ["rt-64k"] - drivers/ptp/ptp_mock.*: modules-internal - drivers/ptp/ptp_dfl_tod.*: modules - drivers/ptp/.*: modules-core -- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/3832 -- _______________________________________________ kernel mailing list -- kernel@lists.fedoraproject.org To unsubscribe send an email to kernel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue