linux_dsm_epyc7002/arch/microblaze/include/asm
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
..
asm-compat.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
asm-offsets.h
atomic.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
barrier.h microblaze: Define microblaze barrier 2020-02-25 12:33:19 +01:00
cache.h microblaze: Convert headers to SPDX license 2020-02-25 12:33:19 +01:00
cacheflush.h microblaze: Convert headers to SPDX license 2020-02-25 12:33:19 +01:00
checksum.h microblaze: Convert headers to SPDX license 2020-02-25 12:33:19 +01:00
cmpxchg.h microblaze: Use asm generic cmpxchg.h for !SMP case 2020-02-25 12:33:31 +01:00
cpuinfo.h microblaze: Convert headers to SPDX license 2020-02-25 12:33:19 +01:00
current.h microblaze: Convert headers to SPDX license 2020-02-25 12:33:19 +01:00
delay.h microblaze: Convert headers to SPDX license 2020-02-25 12:33:19 +01:00
dma.h microblaze: Convert headers to SPDX license 2020-02-25 12:33:19 +01:00
elf.h microblaze: Convert headers to SPDX license 2020-02-25 12:33:19 +01:00
entry.h microblaze: Convert headers to SPDX license 2020-02-25 12:33:19 +01:00
exceptions.h microblaze: Convert headers to SPDX license 2020-02-25 12:33:19 +01:00
fixmap.h microblaze: Convert headers to SPDX license 2020-02-25 12:33:19 +01:00
flat.h microblaze: Convert headers to SPDX license 2020-02-25 12:33:19 +01:00
ftrace.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
futex.h futex: arch_futex_atomic_op_inuser() calling conventions change 2020-03-27 23:58:51 -04:00
hash.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
highmem.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
io.h microblaze: Convert headers to SPDX license 2020-02-25 12:33:19 +01:00
irq.h Microblaze patches for 5.7-rc1 2020-03-31 09:58:07 -07:00
irqflags.h microblaze: Convert headers to SPDX license 2020-02-25 12:33:19 +01:00
Kbuild asm-generic: make more kernel-space headers mandatory 2020-04-02 09:35:25 -07:00
kgdb.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mmu_context_mm.h microblaze: Convert headers to SPDX license 2020-02-25 12:33:19 +01:00
mmu_context.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mmu.h microblaze: Convert headers to SPDX license 2020-02-25 12:33:19 +01:00
module.h microblaze: Convert headers to SPDX license 2020-02-25 12:33:19 +01:00
page.h microblaze: Convert headers to SPDX license 2020-02-25 12:33:19 +01:00
pci-bridge.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
pci.h PCI: Convert pci_resource_to_user() to a weak function 2019-08-08 15:12:07 -05:00
pgalloc.h microblaze: Convert headers to SPDX license 2020-02-25 12:33:19 +01:00
pgtable.h microblaze: Convert headers to SPDX license 2020-02-25 12:33:19 +01:00
processor.h microblaze: Convert headers to SPDX license 2020-02-25 12:33:19 +01:00
ptrace.h microblaze: Convert headers to SPDX license 2020-02-25 12:33:19 +01:00
pvr.h microblaze: Convert headers to SPDX license 2020-02-25 12:33:19 +01:00
registers.h microblaze: Convert headers to SPDX license 2020-02-25 12:33:19 +01:00
seccomp.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
sections.h microblaze: Convert headers to SPDX license 2020-02-25 12:33:19 +01:00
setup.h microblaze: Remove unused boot_cpuid variable 2020-02-25 12:33:19 +01:00
string.h microblaze: Convert headers to SPDX license 2020-02-25 12:33:19 +01:00
switch_to.h microblaze: Convert headers to SPDX license 2020-02-25 12:33:19 +01:00
syscall.h audit/stable-5.2 PR 20190507 2019-05-07 19:06:04 -07:00
thread_info.h microblaze: Convert headers to SPDX license 2020-02-25 12:33:19 +01:00
timex.h microblaze: Convert headers to SPDX license 2020-02-25 12:33:19 +01:00
tlbflush.h microblaze: Convert headers to SPDX license 2020-02-25 12:33:19 +01:00
uaccess.h Microblaze patches for 5.7-rc1 2020-03-31 09:58:07 -07:00
unaligned.h microblaze: Convert headers to SPDX license 2020-02-25 12:33:19 +01:00
unistd.h microblaze: Convert headers to SPDX license 2020-02-25 12:33:19 +01:00
unwind.h microblaze: Convert headers to SPDX license 2020-02-25 12:33:19 +01:00
vmalloc.h mm/vmalloc: Add empty <asm/vmalloc.h> headers and use them from <linux/vmalloc.h> 2019-12-10 10:12:55 +01:00