linux-stable/arch/arm
Masahiro Yamada 56769ba4b2 kbuild: unify vdso_install rules
Currently, there is no standard implementation for vdso_install,
leading to various issues:

 1. Code duplication

    Many architectures duplicate similar code just for copying files
    to the install destination.

    Some architectures (arm, sparc, x86) create build-id symlinks,
    introducing more code duplication.

 2. Unintended updates of in-tree build artifacts

    The vdso_install rule depends on the vdso files to install.
    It may update in-tree build artifacts. This can be problematic,
    as explained in commit 19514fc665 ("arm, kbuild: make
    "make install" not depend on vmlinux").

 3. Broken code in some architectures

    Makefile code is often copied from one architecture to another
    without proper adaptation.

    'make vdso_install' for parisc does not work.

    'make vdso_install' for s390 installs vdso64, but not vdso32.

To address these problems, this commit introduces a generic vdso_install
rule.

Architectures that support vdso_install need to define vdso-install-y
in arch/*/Makefile. vdso-install-y lists the files to install.

For example, arch/x86/Makefile looks like this:

  vdso-install-$(CONFIG_X86_64)           += arch/x86/entry/vdso/vdso64.so.dbg
  vdso-install-$(CONFIG_X86_X32_ABI)      += arch/x86/entry/vdso/vdsox32.so.dbg
  vdso-install-$(CONFIG_X86_32)           += arch/x86/entry/vdso/vdso32.so.dbg
  vdso-install-$(CONFIG_IA32_EMULATION)   += arch/x86/entry/vdso/vdso32.so.dbg

These files will be installed to $(MODLIB)/vdso/ with the .dbg suffix,
if exists, stripped away.

vdso-install-y can optionally take the second field after the colon
separator. This is needed because some architectures install a vdso
file as a different base name.

The following is a snippet from arch/arm64/Makefile.

  vdso-install-$(CONFIG_COMPAT_VDSO)      += arch/arm64/kernel/vdso32/vdso.so.dbg:vdso32.so

This will rename vdso.so.dbg to vdso32.so during installation. If such
architectures change their implementation so that the base names match,
this workaround will go away.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Acked-by: Sven Schnelle <svens@linux.ibm.com> # s390
Reviewed-by: Nicolas Schier <nicolas@fjasle.eu>
Reviewed-by: Guo Ren <guoren@kernel.org>
Acked-by: Helge Deller <deller@gmx.de>  # parisc
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
2023-10-28 21:09:02 +09:00
..
boot ARM: dts: ti: omap: Fix noisy serial with overrun-throttle-ms for mapphone 2023-09-13 10:18:09 +03:00
common ARM: 9318/1: locomo: move kernel-doc to prevent warnings 2023-08-14 12:17:00 +01:00
configs Kbuild updates for v6.6 2023-09-05 11:01:47 -07:00
crypto
include ARM: locomo: fix locomolcd_power declaration 2023-09-28 09:15:51 +02:00
kernel ARM updates for v6.6-rc1 2023-08-31 12:49:10 -07:00
lib - Yosry Ahmed brought back some cgroup v1 stats in OOM logs. 2023-06-28 10:28:11 -07:00
mach-actions
mach-airoha
mach-alpine ARM: alpine: Drop unused includes 2023-08-12 10:30:59 +02:00
mach-artpec
mach-asm9260
mach-aspeed
mach-at91 ARM: at91: Explicitly include correct DT includes 2023-07-29 16:56:04 +03:00
mach-axxia
mach-bcm ARM: bcm: Drop unused includes 2023-07-21 10:01:47 -07:00
mach-berlin ARM: berlin: Drop unused includes 2023-08-12 10:30:59 +02:00
mach-clps711x
mach-davinci ARM: davinci: Drop unused includes 2023-08-29 16:01:32 -04:00
mach-digicolor
mach-dove ARM: dove: Drop unused includes 2023-08-12 10:30:59 +02:00
mach-ep93xx
mach-exynos ARM: SoC changes for 6.5 2023-06-29 15:28:33 -07:00
mach-footbridge
mach-gemini
mach-highbank
mach-hisi ARM: hisi: Drop unused includes 2023-07-19 06:29:04 +00:00
mach-hpe ARM: hpe: Drop unused includes 2023-08-12 10:30:59 +02:00
mach-imx ARM: imx: Drop unused includes 2023-07-19 15:28:44 +08:00
mach-ixp4xx
mach-keystone ARM: keystone: Merge PM function into main support file 2023-08-01 23:57:28 -05:00
mach-lpc18xx
mach-lpc32xx
mach-mediatek
mach-meson ARM: meson: Drop unused includes 2023-07-31 11:58:18 +02:00
mach-milbeaut
mach-mmp ARM: mmp: Drop unused includes 2023-08-12 10:31:00 +02:00
mach-moxart
mach-mstar
mach-mv78xx0
mach-mvebu ARM: mvebu: Explicitly include correct DT includes 2023-08-12 10:31:00 +02:00
mach-mxs ARM: 9298/1: Drop custom mdesc->handle_irq() 2023-06-19 09:35:48 +01:00
mach-nomadik ARM: nomadik: Drop unused includes 2023-08-12 10:31:00 +02:00
mach-npcm ARM: npcm: Drop unused includes 2023-08-12 10:31:00 +02:00
mach-nspire ARM: nspire: Remove unused header file mmio.h 2023-08-12 11:49:32 +02:00
mach-omap1 ARM: SoC changes for 6.5 2023-06-29 15:28:33 -07:00
mach-omap2 ARM: omap2+: Downgrade u-boot version warnings to debug statements 2023-09-13 10:18:19 +03:00
mach-orion5x
mach-pxa ARM: SoC cleanups for 6.6 2023-08-30 16:49:40 -07:00
mach-qcom
mach-rda
mach-realtek
mach-rockchip ARM: rockchip: Drop unused includes 2023-08-12 10:31:00 +02:00
mach-rpc
mach-s3c
mach-s5pv210 ARM: s5pv210: Explicitly include correct DT includes 2023-08-14 18:15:48 +02:00
mach-sa1100 ARM: locomo: fix locomolcd_power declaration 2023-09-28 09:15:51 +02:00
mach-shmobile ARM: shmobile: rcar-gen2: Drop unused OF includes 2023-07-25 11:11:42 +02:00
mach-socfpga ARM: socfpga: Explicitly include correct DT includes 2023-07-20 14:38:38 -05:00
mach-spear ARM: spear: Explicitly include correct DT includes 2023-08-12 10:31:01 +02:00
mach-sti ARM: sti: Drop unused includes 2023-08-12 10:30:59 +02:00
mach-stm32
mach-sunplus
mach-sunxi
mach-tegra
mach-uniphier
mach-ux500 ARM: ux500: Move power-domain driver to the genpd dir 2023-07-14 10:41:59 +02:00
mach-versatile ARM: versatile: Drop unused includes 2023-08-12 10:31:00 +02:00
mach-vt8500
mach-zynq ARM: zynq: Explicitly include correct DT includes 2023-07-20 17:06:50 +02:00
mm ARM: uniphier: fix cache kernel-doc warnings 2023-09-27 11:02:14 +02:00
net
nwfpe
plat-orion
probes ARM: 9303/1: kprobes: avoid missing-declaration warnings 2023-06-19 09:35:51 +01:00
tools arch: Register fchmodat2, usually as syscall 452 2023-07-27 12:25:35 +02:00
vdso kbuild: unify vdso_install rules 2023-10-28 21:09:02 +09:00
vfp Merge branch 'devel-stable' into for-next 2023-08-14 12:18:06 +01:00
xen xen: simplify evtchn_do_upcall() call maze 2023-09-19 07:04:49 +02:00
Kbuild
Kconfig treewide: drop CONFIG_EMBEDDED 2023-08-21 13:46:25 -07:00
Kconfig-nommu
Kconfig.assembler
Kconfig.debug
Makefile kbuild: unify vdso_install rules 2023-10-28 21:09:02 +09:00