mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-23 01:13:55 +07:00
630f289b71
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: |
||
---|---|---|
.. | ||
asm-compat.h | ||
asm-offsets.h | ||
atomic.h | ||
barrier.h | ||
cache.h | ||
cacheflush.h | ||
checksum.h | ||
cmpxchg.h | ||
cpuinfo.h | ||
current.h | ||
delay.h | ||
dma.h | ||
elf.h | ||
entry.h | ||
exceptions.h | ||
fixmap.h | ||
flat.h | ||
ftrace.h | ||
futex.h | ||
hash.h | ||
highmem.h | ||
io.h | ||
irq.h | ||
irqflags.h | ||
Kbuild | ||
kgdb.h | ||
mmu_context_mm.h | ||
mmu_context.h | ||
mmu.h | ||
module.h | ||
page.h | ||
pci-bridge.h | ||
pci.h | ||
pgalloc.h | ||
pgtable.h | ||
processor.h | ||
ptrace.h | ||
pvr.h | ||
registers.h | ||
seccomp.h | ||
sections.h | ||
setup.h | ||
string.h | ||
switch_to.h | ||
syscall.h | ||
thread_info.h | ||
timex.h | ||
tlbflush.h | ||
uaccess.h | ||
unaligned.h | ||
unistd.h | ||
unwind.h | ||
vmalloc.h |