On Mon, Jul 29, 2019 at 12:45 PM Ard Biesheuvel <ard.biesheuvel@xxxxxxxxxx> wrote: > On Mon, 29 Jul 2019 at 13:32, Arnd Bergmann <arnd@xxxxxxxx> wrote: > > It looks like there are a number of these that could be handled the > > same way. Should we do that for the asm-generic tree afterwards? > > > > I guess it depends whether any dependencies on those headers exist in > code that is truly generic. If they are only needed by some common > infrastructure that cannot be enabled for a certain architecture > anyway, I don't think making it a mandatory header is appropriate. > > So I think the question is whether the first column and the number of > per-arch instances of that header add up to 25 (disregarding the > exception for arch/um for now) Here is a list of how many architectures besides arch/um do not have a given file with either generic-y or as a private copy: $ git grep -h generic-y arch/*/include/asm/Kbuild | sort | uniq -c | sort -nr | cut -f 2 -d= | while read file ; do for arch in arch/*/include/asm ; do if [ ! -e ${arch}/${file} ] && ! grep -q ${file} ${arch}/Kbuild ; then echo ${arch}/${file} ; fi ; done | grep -v arch/um/ | echo `wc -l` $file ; done | sort -n 0 atomic.h 0 barrier.h 0 bitops.h 0 bug.h 0 bugs.h 0 cacheflush.h 0 checksum.h 0 compat.h 0 current.h 0 delay.h 0 device.h 0 div64.h 0 dma.h 0 dma-mapping.h 0 emergency-restart.h 0 exec.h 0 fb.h 0 ftrace.h 0 futex.h 0 hardirq.h 0 hw_irq.h 0 io.h 0 irq.h 0 irq_regs.h 0 irq_work.h 0 kdebug.h 0 kmap_types.h 0 kprobes.h 0 linkage.h 0 local.h 0 mm-arch-hooks.h 0 mmiowb.h 0 mmu_context.h 0 mmu.h 0 module.h 0 pci.h 0 percpu.h 0 pgalloc.h 0 preempt.h 0 sections.h 0 serial.h 0 shmparam.h 0 switch_to.h 0 timex.h 0 tlbflush.h 0 topology.h 0 trace_clock.h 0 uaccess.h 0 unaligned.h 0 vga.h 0 word-at-a-time.h 0 xor.h 1 asm-offsets.h 1 cmpxchg.h 1 spinlock.h 1 user.h 2 kvm_para.h 3 mcs_spinlock.h 4 extable.h 4 local64.h 9 parport.h 12 syscalls.h 13 param.h 14 seccomp.h 15 export.h 16 dma-contiguous.h 16 flat.h 16 msi.h 17 qrwlock.h 18 gpio.h 18 qspinlock.h 20 early_ioremap.h 20 set_memory.h 20 simd.h 20 vmlinux.lds.h 21 vtime.h 22 iomap.h 23 qrwlock_types.h 23 qspinlock_types.h 24 bpf_perf_event.h Arnd