Enable the vDSO for arm LPAE
The vDSO can be used on arm as well. The only supported platforms have LPAE enabled so only enable it there.
This commit is contained in:
parent
286455ecc5
commit
df3d8e2f95
107
kernel.spec
107
kernel.spec
@ -218,8 +218,7 @@ Summary: The Linux kernel
|
|||||||
%define all_x86 i386 i686
|
%define all_x86 i386 i686
|
||||||
|
|
||||||
%if %{with_vdso_install}
|
%if %{with_vdso_install}
|
||||||
# These arches install vdso/ directories.
|
%define use_vdso 1
|
||||||
%define vdso_arches %{all_x86} x86_64 %{power64} s390x aarch64
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
# Overrides for generic default options
|
# Overrides for generic default options
|
||||||
@ -287,6 +286,7 @@ Summary: The Linux kernel
|
|||||||
|
|
||||||
%ifarch %{arm}
|
%ifarch %{arm}
|
||||||
%define all_arch_configs kernel-%{version}-arm*.config
|
%define all_arch_configs kernel-%{version}-arm*.config
|
||||||
|
%define skip_nonpae_vdso 1
|
||||||
%define asmarch arm
|
%define asmarch arm
|
||||||
%define hdrarch arm
|
%define hdrarch arm
|
||||||
%define pae lpae
|
%define pae lpae
|
||||||
@ -348,6 +348,19 @@ Summary: The Linux kernel
|
|||||||
# Architectures we build tools/cpupower on
|
# Architectures we build tools/cpupower on
|
||||||
%define cpupowerarchs %{ix86} x86_64 %{power64} %{arm} aarch64
|
%define cpupowerarchs %{ix86} x86_64 %{power64} %{arm} aarch64
|
||||||
|
|
||||||
|
%if %{use_vdso}
|
||||||
|
|
||||||
|
%if 0%{?skip_nonpae_vdso}
|
||||||
|
%define _use_vdso 0
|
||||||
|
%else
|
||||||
|
%define _use_vdso 1
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%else
|
||||||
|
%define _use_vdso 0
|
||||||
|
%endif
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Packages that need to be installed before the kernel is, because the %%post
|
# Packages that need to be installed before the kernel is, because the %%post
|
||||||
# scripts use them.
|
# scripts use them.
|
||||||
@ -1283,9 +1296,10 @@ cp_vmlinux()
|
|||||||
BuildKernel() {
|
BuildKernel() {
|
||||||
MakeTarget=$1
|
MakeTarget=$1
|
||||||
KernelImage=$2
|
KernelImage=$2
|
||||||
Flavour=$3
|
Flavour=$4
|
||||||
|
DoVDSO=$3
|
||||||
Flav=${Flavour:++${Flavour}}
|
Flav=${Flavour:++${Flavour}}
|
||||||
InstallName=${4:-vmlinuz}
|
InstallName=${5:-vmlinuz}
|
||||||
|
|
||||||
# Pick the right config file for the kernel we're building
|
# Pick the right config file for the kernel we're building
|
||||||
Config=kernel-%{version}-%{_target_cpu}${Flavour:+-${Flavour}}.config
|
Config=kernel-%{version}-%{_target_cpu}${Flavour:+-${Flavour}}.config
|
||||||
@ -1383,7 +1397,7 @@ BuildKernel() {
|
|||||||
# we'll get it from the linux-firmware package and we don't want conflicts
|
# we'll get it from the linux-firmware package and we don't want conflicts
|
||||||
%{make} -s ARCH=$Arch INSTALL_MOD_PATH=$RPM_BUILD_ROOT modules_install KERNELRELEASE=$KernelVer mod-fw=
|
%{make} -s ARCH=$Arch INSTALL_MOD_PATH=$RPM_BUILD_ROOT modules_install KERNELRELEASE=$KernelVer mod-fw=
|
||||||
|
|
||||||
%ifarch %{vdso_arches}
|
if [ $DoVDSO -ne 0 ]; then
|
||||||
%{make} -s ARCH=$Arch INSTALL_MOD_PATH=$RPM_BUILD_ROOT vdso_install KERNELRELEASE=$KernelVer
|
%{make} -s ARCH=$Arch INSTALL_MOD_PATH=$RPM_BUILD_ROOT vdso_install KERNELRELEASE=$KernelVer
|
||||||
if [ ! -s ldconfig-kernel.conf ]; then
|
if [ ! -s ldconfig-kernel.conf ]; then
|
||||||
echo > ldconfig-kernel.conf "\
|
echo > ldconfig-kernel.conf "\
|
||||||
@ -1392,7 +1406,7 @@ BuildKernel() {
|
|||||||
%{__install} -D -m 444 ldconfig-kernel.conf \
|
%{__install} -D -m 444 ldconfig-kernel.conf \
|
||||||
$RPM_BUILD_ROOT/etc/ld.so.conf.d/kernel-$KernelVer.conf
|
$RPM_BUILD_ROOT/etc/ld.so.conf.d/kernel-$KernelVer.conf
|
||||||
rm -rf $RPM_BUILD_ROOT/lib/modules/$KernelVer/vdso/.build-id
|
rm -rf $RPM_BUILD_ROOT/lib/modules/$KernelVer/vdso/.build-id
|
||||||
%endif
|
fi
|
||||||
|
|
||||||
# And save the headers/makefiles etc for building modules against
|
# And save the headers/makefiles etc for building modules against
|
||||||
#
|
#
|
||||||
@ -1623,20 +1637,21 @@ mkdir -p $RPM_BUILD_ROOT%{_libexecdir}
|
|||||||
|
|
||||||
cd linux-%{KVERREL}
|
cd linux-%{KVERREL}
|
||||||
|
|
||||||
|
|
||||||
%if %{with_debug}
|
%if %{with_debug}
|
||||||
BuildKernel %make_target %kernel_image debug
|
BuildKernel %make_target %kernel_image %{_use_vdso} debug
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if %{with_pae_debug}
|
%if %{with_pae_debug}
|
||||||
BuildKernel %make_target %kernel_image %{pae}debug
|
BuildKernel %make_target %kernel_image %{use_vdso} %{pae}debug
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if %{with_pae}
|
%if %{with_pae}
|
||||||
BuildKernel %make_target %kernel_image %{pae}
|
BuildKernel %make_target %kernel_image %{use_vdso} %{pae}
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if %{with_up}
|
%if %{with_up}
|
||||||
BuildKernel %make_target %kernel_image
|
BuildKernel %make_target %kernel_image %{_use_vdso}
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%global perf_make \
|
%global perf_make \
|
||||||
@ -2088,68 +2103,70 @@ fi
|
|||||||
# %%kernel_variant_files [-k vmlinux] <condition> <subpackage>
|
# %%kernel_variant_files [-k vmlinux] <condition> <subpackage>
|
||||||
#
|
#
|
||||||
%define kernel_variant_files(k:) \
|
%define kernel_variant_files(k:) \
|
||||||
%if %{1}\
|
%if %{2}\
|
||||||
%{expand:%%files -f kernel-%{?2:%{2}-}core.list %{?2:%{2}-}core}\
|
%{expand:%%files -f kernel-%{?3:%{3}-}core.list %{?3:%{3}-}core}\
|
||||||
%defattr(-,root,root)\
|
%defattr(-,root,root)\
|
||||||
%{!?_licensedir:%global license %%doc}\
|
%{!?_licensedir:%global license %%doc}\
|
||||||
%license linux-%{KVERREL}/COPYING\
|
%license linux-%{KVERREL}/COPYING\
|
||||||
/lib/modules/%{KVERREL}%{?2:+%{2}}/%{?-k:%{-k*}}%{!?-k:vmlinuz}\
|
/lib/modules/%{KVERREL}%{?3:+%{3}}/%{?-k:%{-k*}}%{!?-k:vmlinuz}\
|
||||||
%ghost /%{image_install_path}/%{?-k:%{-k*}}%{!?-k:vmlinuz}-%{KVERREL}%{?2:+%{2}}\
|
%ghost /%{image_install_path}/%{?-k:%{-k*}}%{!?-k:vmlinuz}-%{KVERREL}%{?3:+%{3}}\
|
||||||
/lib/modules/%{KVERREL}%{?2:+%{2}}/.vmlinuz.hmac \
|
/lib/modules/%{KVERREL}%{?3:+%{3}}/.vmlinuz.hmac \
|
||||||
%ghost /%{image_install_path}/.vmlinuz-%{KVERREL}%{?2:+%{2}}.hmac \
|
%ghost /%{image_install_path}/.vmlinuz-%{KVERREL}%{?3:+%{3}}.hmac \
|
||||||
%ifarch %{arm} aarch64\
|
%ifarch %{arm} aarch64\
|
||||||
/lib/modules/%{KVERREL}%{?2:+%{2}}/dtb \
|
/lib/modules/%{KVERREL}%{?3:+%{3}}/dtb \
|
||||||
%ghost /%{image_install_path}/dtb-%{KVERREL}%{?2:+%{2}} \
|
%ghost /%{image_install_path}/dtb-%{KVERREL}%{?3:+%{3}} \
|
||||||
%endif\
|
%endif\
|
||||||
%attr(600,root,root) /lib/modules/%{KVERREL}%{?2:+%{2}}/System.map\
|
%attr(600,root,root) /lib/modules/%{KVERREL}%{?3:+%{3}}/System.map\
|
||||||
%ghost /boot/System.map-%{KVERREL}%{?2:+%{2}}\
|
%ghost /boot/System.map-%{KVERREL}%{?3:+%{3}}\
|
||||||
/lib/modules/%{KVERREL}%{?2:+%{2}}/config\
|
/lib/modules/%{KVERREL}%{?3:+%{3}}/config\
|
||||||
%ghost /boot/config-%{KVERREL}%{?2:+%{2}}\
|
%ghost /boot/config-%{KVERREL}%{?3:+%{3}}\
|
||||||
%ghost /boot/initramfs-%{KVERREL}%{?2:+%{2}}.img\
|
%ghost /boot/initramfs-%{KVERREL}%{?3:+%{3}}.img\
|
||||||
%dir /lib/modules\
|
%dir /lib/modules\
|
||||||
%dir /lib/modules/%{KVERREL}%{?2:+%{2}}\
|
%dir /lib/modules/%{KVERREL}%{?3:+%{3}}\
|
||||||
%dir /lib/modules/%{KVERREL}%{?2:+%{2}}/kernel\
|
%dir /lib/modules/%{KVERREL}%{?3:+%{3}}/kernel\
|
||||||
/lib/modules/%{KVERREL}%{?2:+%{2}}/build\
|
/lib/modules/%{KVERREL}%{?3:+%{3}}/build\
|
||||||
/lib/modules/%{KVERREL}%{?2:+%{2}}/source\
|
/lib/modules/%{KVERREL}%{?3:+%{3}}/source\
|
||||||
/lib/modules/%{KVERREL}%{?2:+%{2}}/updates\
|
/lib/modules/%{KVERREL}%{?3:+%{3}}/updates\
|
||||||
%ifarch %{vdso_arches}\
|
%if %{1}\
|
||||||
/lib/modules/%{KVERREL}%{?2:+%{2}}/vdso\
|
/lib/modules/%{KVERREL}%{?3:+%{3}}/vdso\
|
||||||
/etc/ld.so.conf.d/kernel-%{KVERREL}%{?2:+%{2}}.conf\
|
/etc/ld.so.conf.d/kernel-%{KVERREL}%{?3:+%{3}}.conf\
|
||||||
%endif\
|
%endif\
|
||||||
/lib/modules/%{KVERREL}%{?2:+%{2}}/modules.*\
|
/lib/modules/%{KVERREL}%{?3:+%{3}}/modules.*\
|
||||||
%{expand:%%files -f kernel-%{?2:%{2}-}modules.list %{?2:%{2}-}modules}\
|
%{expand:%%files -f kernel-%{?3:%{3}-}modules.list %{?3:%{3}-}modules}\
|
||||||
%defattr(-,root,root)\
|
%defattr(-,root,root)\
|
||||||
%{expand:%%files %{?2:%{2}-}devel}\
|
%{expand:%%files %{?3:%{3}-}devel}\
|
||||||
%defattr(-,root,root)\
|
%defattr(-,root,root)\
|
||||||
%defverify(not mtime)\
|
%defverify(not mtime)\
|
||||||
/usr/src/kernels/%{KVERREL}%{?2:+%{2}}\
|
/usr/src/kernels/%{KVERREL}%{?3:+%{3}}\
|
||||||
%{expand:%%files %{?2:%{2}-}modules-extra}\
|
%{expand:%%files %{?3:%{3}-}modules-extra}\
|
||||||
%defattr(-,root,root)\
|
%defattr(-,root,root)\
|
||||||
/lib/modules/%{KVERREL}%{?2:+%{2}}/extra\
|
/lib/modules/%{KVERREL}%{?3:+%{3}}/extra\
|
||||||
%if %{with_debuginfo}\
|
%if %{with_debuginfo}\
|
||||||
%ifnarch noarch\
|
%ifnarch noarch\
|
||||||
%{expand:%%files -f debuginfo%{?2}.list %{?2:%{2}-}debuginfo}\
|
%{expand:%%files -f debuginfo%{?3}.list %{?3:%{3}-}debuginfo}\
|
||||||
%defattr(-,root,root)\
|
%defattr(-,root,root)\
|
||||||
%endif\
|
%endif\
|
||||||
%endif\
|
%endif\
|
||||||
%if %{?2:1} %{!?2:0}\
|
%if %{?3:1} %{!?3:0}\
|
||||||
%{expand:%%files %{2}}\
|
%{expand:%%files %{3}}\
|
||||||
%defattr(-,root,root)\
|
%defattr(-,root,root)\
|
||||||
%endif\
|
%endif\
|
||||||
%endif\
|
%endif\
|
||||||
%{nil}
|
%{nil}
|
||||||
|
|
||||||
|
%kernel_variant_files %{_use_vdso} %{with_up}
|
||||||
%kernel_variant_files %{with_up}
|
%kernel_variant_files %{_use_vdso} %{with_debug} debug
|
||||||
%kernel_variant_files %{with_debug} debug
|
%kernel_variant_files %{use_vdso} %{with_pae} %{pae}
|
||||||
%kernel_variant_files %{with_pae} %{pae}
|
%kernel_variant_files %{use_vdso} %{with_pae_debug} %{pae}debug
|
||||||
%kernel_variant_files %{with_pae_debug} %{pae}debug
|
|
||||||
|
|
||||||
# plz don't put in a version string unless you're going to tag
|
# plz don't put in a version string unless you're going to tag
|
||||||
# and build.
|
# and build.
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Jun 06 2017 Laura Abbott <labbott@redhat.com>
|
||||||
|
- Enable the vDSO for arm LPAE
|
||||||
|
|
||||||
* Tue Jun 06 2017 Laura Abbott <labbott@fedoraproject.org> - 4.12.0-0.rc4.git1.1
|
* Tue Jun 06 2017 Laura Abbott <labbott@fedoraproject.org> - 4.12.0-0.rc4.git1.1
|
||||||
- Linux v4.12-rc4-13-gba7b238
|
- Linux v4.12-rc4-13-gba7b238
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user