linux/arch/arm
Masahiro Yamada 630f289b71 asm-generic: make more kernel-space headers mandatory
Change a header to mandatory-y if both of the following are met:

[1] At least one architecture (except um) specifies it as generic-y in
    arch/*/include/asm/Kbuild

[2] Every architecture (except um) either has its own implementation
    (arch/*/include/asm/*.h) or specifies it as generic-y in
    arch/*/include/asm/Kbuild

This commit was generated by the following shell script.

----------------------------------->8-----------------------------------

arches=$(cd arch; ls -1 | sed -e '/Kconfig/d' -e '/um/d')

tmpfile=$(mktemp)

grep "^mandatory-y +=" include/asm-generic/Kbuild > $tmpfile

find arch -path 'arch/*/include/asm/Kbuild' |
	xargs sed -n 's/^generic-y += \(.*\)/\1/p' | sort -u |
while read header
do
	mandatory=yes

	for arch in $arches
	do
		if ! grep -q "generic-y += $header" arch/$arch/include/asm/Kbuild &&
			! [ -f arch/$arch/include/asm/$header ]; then
			mandatory=no
			break
		fi
	done

	if [ "$mandatory" = yes ]; then
		echo "mandatory-y += $header" >> $tmpfile

		for arch in $arches
		do
			sed -i "/generic-y += $header/d" arch/$arch/include/asm/Kbuild
		done
	fi

done

sed -i '/^mandatory-y +=/d' include/asm-generic/Kbuild

LANG=C sort $tmpfile >> include/asm-generic/Kbuild

----------------------------------->8-----------------------------------

One obvious benefit is the diff stat:

 25 files changed, 52 insertions(+), 557 deletions(-)

It is tedious to list generic-y for each arch that needs it.

So, mandatory-y works like a fallback default (by just wrapping
asm-generic one) when arch does not have a specific header
implementation.

See the following commits:

def3f7cefe
a1b39bae16

It is tedious to convert headers one by one, so I processed by a shell
script.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Michal Simek <michal.simek@xilinx.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Arnd Bergmann <arnd@arndb.de>
Link: http://lkml.kernel.org/r/20200210175452.5030-1-masahiroy@kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2020-04-02 09:35:25 -07:00
..
boot Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next 2020-03-31 17:29:33 -07:00
common ARM: sa1111: Fix irq_retrigger callback return value 2020-03-16 15:48:54 +00:00
configs ARM: socfpga_defconfig: add back DEBUGFS 2020-03-04 08:51:55 -08:00
crypto crypto: arm/chacha - fix build failured when kernel mode NEON is disabled 2020-01-22 16:21:11 +08:00
include asm-generic: make more kernel-space headers mandatory 2020-04-02 09:35:25 -07:00
kernel CPU (hotplug) updates: 2020-03-30 18:06:39 -07:00
kvm KVM: Drop kvm_arch_vcpu_setup() 2020-01-27 19:59:28 +01:00
lib ARM: 8958/1: rename missed uaccess .fixup section 2020-02-21 17:03:21 +00:00
mach-actions
mach-alpine
mach-artpec
mach-asm9260
mach-aspeed ARM: SoC fixes 2019-09-30 10:04:28 -07:00
mach-at91 ARM: at91: pm: use of_device_id array to find the proper shdwc node 2020-01-10 23:40:31 +01:00
mach-axxia
mach-bcm ARM: SoC platform updates 2020-02-08 13:55:25 -08:00
mach-berlin
mach-clps711x
mach-cns3xxx
mach-davinci ARM: SoC: late updates 2020-02-08 14:17:27 -08:00
mach-digicolor
mach-dove
mach-ebsa110
mach-efm32
mach-ep93xx Merge branch 'spi-5.4' into spi-next 2019-09-15 10:32:06 +01:00
mach-exynos ARM: SoC platform updates 2020-02-08 13:55:25 -08:00
mach-footbridge ARM: 8911/1: move pcibios_report_status to <asm/pci.h> 2019-10-27 21:14:40 +00:00
mach-gemini
mach-highbank
mach-hisi ARM: hisi: drop useless depend on ARCH_MULTI_V7 2019-10-26 15:31:22 +08:00
mach-imx ARM: imx: build v7_cpu_resume() unconditionally 2020-02-13 21:21:44 +08:00
mach-integrator
mach-iop32x
mach-ixp4xx ARM/net: ixp4xx: Pass ethernet physical base as resource 2020-01-12 12:59:53 -08:00
mach-keystone
mach-lpc18xx
mach-lpc32xx
mach-mediatek
mach-meson ARM: meson: Drop unneeded select of COMMON_CLK 2020-02-29 08:16:20 -08:00
mach-milbeaut
mach-mmp ARM: mmp: do not divide the clock rate 2020-01-06 09:18:50 -08:00
mach-moxart
mach-mv78xx0
mach-mvebu
mach-mxs
mach-nomadik
mach-npcm ARM: npcm: Bring back GPIOLIB support 2020-02-09 03:44:51 -08:00
mach-nspire
mach-omap1 ARM: OMAP1: drop duplicated dependency on ARCH_OMAP1 2019-11-11 12:30:39 -08:00
mach-omap2 ARM: OMAP2+: Fix compile if CONFIG_HAVE_ARM_SMCCC is not set 2020-02-26 10:49:25 -08:00
mach-orion5x
mach-oxnas
mach-picoxcell
mach-prima2
mach-pxa USB/Thunderbolt/PHY driver updates for 5.6-rc1 2020-01-29 10:09:44 -08:00
mach-qcom
mach-rda
mach-realview
mach-rockchip
mach-rpc
mach-s3c24xx ARM: s3c24xx: Switch to atomic pwm API in rx1950 2020-01-21 20:56:47 +01:00
mach-s3c64xx ARM: SoC platform updates 2020-02-08 13:55:25 -08:00
mach-s5pv210
mach-sa1100
mach-shmobile remove ioremap_nocache and devm_ioremap_nocache 2020-01-06 09:45:59 +01:00
mach-socfpga arm: socfpga: execute cold reboot by default 2019-11-22 12:12:10 -06:00
mach-spear
mach-sti
mach-stm32
mach-sunxi ARM: sunxi: Fix CPU powerdown on A83T 2019-10-29 09:09:56 +01:00
mach-tango
mach-tegra ARM: tegra: Use clk_m CPU on Tegra124 LP1 resume 2020-01-08 12:58:46 +01:00
mach-u300 pinctrl: Allow modules to use pinctrl_[un]register_mappings 2019-12-30 14:27:17 +01:00
mach-uniphier
mach-ux500 mfd: db8500-prcmu: Support U8420-sysclk firmware 2019-11-11 08:45:04 +00:00
mach-versatile
mach-vexpress ARM: vexpress: Set-up shared OPP table instead of individual for each CPU 2019-12-09 11:52:50 +00:00
mach-vt8500
mach-zx
mach-zynq ARM: zynq: use physical cpuid in zynq_slcr_cpu_stop/start 2020-01-08 15:21:09 +01:00
mm lib/vdso: Cleanup clock mode storage leftovers 2020-02-17 20:12:17 +01:00
net ARM: net: bpf: Improve prologue code sequence 2019-12-11 14:34:26 +01:00
nwfpe
oprofile
plat-omap dmaengine: ti: omap-dma: Configure global priority register directly 2019-12-30 09:45:25 -08:00
plat-orion
plat-pxa spi: pxa2xx: No need to keep pointer to platform device 2019-10-18 18:24:50 +01:00
plat-samsung ARM: samsung: Rename Samsung and Exynos to lowercase 2020-01-07 20:44:22 +01:00
plat-versatile
probes
tools threads-v5.6 2020-01-29 19:38:34 -08:00
vdso kbuild: rename hostprogs-y/always to hostprogs/always-y 2020-02-04 01:53:07 +09:00
vfp
xen dma-mapping updates for 5.5-rc1 2019-11-28 11:16:43 -08:00
Kconfig ARM/arm64: vdso: Use common vdso clock mode storage 2020-02-17 20:12:16 +01:00
Kconfig-nommu
Kconfig.debug ARM: debug-ll: select DEBUG_AT91_RM9200_DBGU for sam9x60 2019-12-10 00:45:30 +01:00
Makefile ARM: 8961/2: Fix Kbuild issue caused by per-task stack protector GCC plugin 2020-02-21 17:03:22 +00:00