linux-xiaomi-chiron/arch/arc/include/asm
Masahiro Yamada 62d0fd591d arch: split MODULE_ARCH_VERMAGIC definitions out to <asm/vermagic.h>
As the bug report [1] pointed out, <linux/vermagic.h> must be included
after <linux/module.h>.

I believe we should not impose any include order restriction. We often
sort include directives alphabetically, but it is just coding style
convention. Technically, we can include header files in any order by
making every header self-contained.

Currently, arch-specific MODULE_ARCH_VERMAGIC is defined in
<asm/module.h>, which is not included from <linux/vermagic.h>.

Hence, the straight-forward fix-up would be as follows:

|--- a/include/linux/vermagic.h
|+++ b/include/linux/vermagic.h
|@@ -1,5 +1,6 @@
| /* SPDX-License-Identifier: GPL-2.0 */
| #include <generated/utsrelease.h>
|+#include <linux/module.h>
|
| /* Simply sanity version stamp for modules. */
| #ifdef CONFIG_SMP

This works enough, but for further cleanups, I split MODULE_ARCH_VERMAGIC
definitions into <asm/vermagic.h>.

With this, <linux/module.h> and <linux/vermagic.h> will be orthogonal,
and the location of MODULE_ARCH_VERMAGIC definitions will be consistent.

For arc and ia64, MODULE_PROC_FAMILY is only used for defining
MODULE_ARCH_VERMAGIC. I squashed it.

For hexagon, nds32, and xtensa, I removed <asm/modules.h> entirely
because they contained nothing but MODULE_ARCH_VERMAGIC definition.
Kbuild will automatically generate <asm/modules.h> at build-time,
wrapping <asm-generic/module.h>.

[1] https://lore.kernel.org/lkml/20200411155623.GA22175@zn.tnic

Reported-by: Borislav Petkov <bp@suse.de>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Acked-by: Jessica Yu <jeyu@kernel.org>
2020-04-23 10:50:26 +09:00
..
arcregs.h ARC: allow userspace DSP applications to use AGU extensions 2020-03-16 10:30:49 -07:00
asm-offsets.h
asserts.h ARC: allow userspace DSP applications to use AGU extensions 2020-03-16 10:30:49 -07:00
atomic.h
barrier.h
bitops.h
bug.h
cache.h
cacheflush.h
checksum.h
cmpxchg.h
current.h
delay.h
disasm.h
dma.h
dsp-impl.h ARC: allow userspace DSP applications to use AGU extensions 2020-03-16 10:30:49 -07:00
dsp.h ARC: allow userspace DSP applications to use AGU extensions 2020-03-16 10:30:49 -07:00
dwarf.h
elf.h
entry-arcv2.h ARC: add support for DSP-enabled userspace applications 2020-03-16 10:30:49 -07:00
entry-compact.h
entry.h
exec.h
fb.h
fpu.h ARC: fpu: fix randconfig build error reported by 0-day test service 2020-02-09 22:17:22 -08:00
futex.h futex: arch_futex_atomic_op_inuser() calling conventions change 2020-03-27 23:58:51 -04:00
highmem.h
hugepage.h ARC: mm: drop stale define of __ARCH_USE_5LEVEL_HACK 2019-12-09 10:41:25 -08:00
io.h
irq.h
irqflags-arcv2.h
irqflags-compact.h
irqflags.h
jump_label.h
Kbuild asm-generic: make more kernel-space headers mandatory 2020-04-02 09:35:25 -07:00
kdebug.h
kgdb.h
kmap_types.h
kprobes.h
linkage.h ARC: define __ALIGN_STR and __ALIGN symbols for ARC 2020-03-11 10:07:15 -07:00
mach_desc.h
mmu.h
mmu_context.h
mmzone.h
module.h arch: split MODULE_ARCH_VERMAGIC definitions out to <asm/vermagic.h> 2020-04-23 10:50:26 +09:00
page.h mm/vma: define a default value for VM_DATA_DEFAULT_FLAGS 2020-04-10 15:36:21 -07:00
pci.h
perf_event.h
pgalloc.h
pgtable.h arc: mm: add p?d_leaf() definitions 2020-02-04 03:05:24 +00:00
processor.h ARC: add support for DSP-enabled userspace applications 2020-03-16 10:30:49 -07:00
ptrace.h ARC: add support for DSP-enabled userspace applications 2020-03-16 10:30:49 -07:00
sections.h
segment.h
serial.h
setup.h
shmparam.h
smp.h
spinlock.h
spinlock_types.h
stacktrace.h
string.h
switch_to.h ARC: add support for DSP-enabled userspace applications 2020-03-16 10:30:49 -07:00
syscall.h
syscalls.h ARC: wireup clone3 syscall 2020-01-15 16:08:12 -08:00
thread_info.h
timex.h
tlb-mmu1.h
tlb.h
tlbflush.h
uaccess.h
unaligned.h
unwind.h
vermagic.h arch: split MODULE_ARCH_VERMAGIC definitions out to <asm/vermagic.h> 2020-04-23 10:50:26 +09: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