kernel_optimize_test/arch/mips
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
..
alchemy MIPS: Replace setup_irq() by request_irq() 2020-03-05 16:47:35 +01:00
ar7 MIPS: Replace setup_irq() by request_irq() 2020-03-05 16:47:35 +01:00
ath25 MIPS: Replace setup_irq() by request_irq() 2020-03-05 16:47:35 +01:00
ath79 MIPS: ath79: Replace <linux/clk-provider.h> by <linux/of_clk.h> 2020-02-19 10:34:22 -08:00
bcm47xx
bcm63xx MIPS: Replace setup_irq() by request_irq() 2020-03-05 16:47:35 +01:00
bmips MIPS: BMIPS: Replace <linux/clk-provider.h> by <linux/of_clk.h> 2020-02-19 10:36:02 -08:00
boot SPDX patches for 5.7-rc1. 2020-04-03 13:12:26 -07:00
cavium-octeon MIPS updates for v5.7: 2020-03-31 08:51:45 -07:00
cobalt MIPS: Replace setup_irq() by request_irq() 2020-03-05 16:47:35 +01:00
configs SCSI misc on 20200402 2020-04-02 17:03:53 -07:00
crypto crypto: {arm,arm64,mips}/poly1305 - remove redundant non-reduction from emit 2020-01-16 15:18:12 +08:00
dec MIPS: pass non-NULL dev_id on shared request_irq() 2020-03-16 16:04:49 +01:00
emma MIPS: Replace setup_irq() by request_irq() 2020-03-05 16:47:35 +01:00
fw MIPS: fw: arc: add __weak to prom_meminit and prom_free_prom_memory 2020-04-09 00:13:45 +09:00
generic MIPS: generic: Replace <linux/clk-provider.h> by <linux/of_clk.h> 2020-02-19 10:36:07 -08:00
include arch: split MODULE_ARCH_VERMAGIC definitions out to <asm/vermagic.h> 2020-04-23 10:50:26 +09:00
jazz MIPS: Replace setup_irq() by request_irq() 2020-03-05 16:47:35 +01:00
jz4740 MIPS: jz4740: Replace <linux/clk-provider.h> by <linux/of_clk.h> 2020-02-19 10:36:12 -08:00
kernel asm-generic: fix unistd_32.h generation format 2020-04-07 10:43:42 -07:00
kvm virtio: fixes, vdpa 2020-04-08 10:51:53 -07:00
lantiq remove ioremap_nocache and devm_ioremap_nocache 2020-01-06 09:45:59 +01:00
lasat MIPS: Replace setup_irq() by request_irq() 2020-03-05 16:47:35 +01:00
lib MIPS: do not compile generic functions for CONFIG_CAVIUM_OCTEON_SOC 2020-03-25 16:07:13 +01:00
loongson2ef MIPS: pass non-NULL dev_id on shared request_irq() 2020-03-16 16:04:49 +01:00
loongson32 MIPS: Replace setup_irq() by request_irq() 2020-03-05 16:47:35 +01:00
loongson64 MIPS: Loongson64: Load built-in dtbs 2020-03-25 16:07:12 +01:00
math-emu MIPS: Add MAC2008 Support 2020-01-22 15:56:08 -08:00
mm mm/vma: append unlikely() while testing VMA access permissions 2020-04-07 10:43:38 -07:00
mti-malta MIPS: Replace setup_irq() by request_irq() 2020-03-05 16:47:35 +01:00
net MIPS: BPF: Use sizeof_field() instead of FIELD_SIZEOF() 2020-01-10 11:33:35 -08:00
netlogic MIPS: Replace setup_irq() by request_irq() 2020-03-05 16:47:35 +01:00
oprofile
paravirt
pci The main MIPS changes for 5.6: 2020-01-31 11:28:31 -08:00
pic32 MIPS: pic32mzda: Drop pointless static qualifier 2020-02-28 12:44:39 +01:00
pistachio MIPS: Pistachio: Replace <linux/clk-provider.h> by <linux/of_clk.h> 2020-02-19 10:36:21 -08:00
pmcs-msp71xx MIPS: pass non-NULL dev_id on shared request_irq() 2020-03-16 16:04:49 +01:00
pnx833x
power
ralink MIPS: ralink: mt7621: Fix soc_device introduction 2020-03-28 17:26:36 +01:00
rb532 remove ioremap_nocache and devm_ioremap_nocache 2020-01-06 09:45:59 +01:00
sgi-ip22 MIPS: Replace setup_irq() by request_irq() 2020-03-05 16:47:35 +01:00
sgi-ip27 mfd: ioc3: Add driver for SGI IOC3 chip 2020-01-09 15:30:59 -08:00
sgi-ip30 MIPS: SGI-IP30: Check for valid pointer before using it 2020-01-22 10:15:45 -08:00
sgi-ip32 MIPS: Replace setup_irq() by request_irq() 2020-03-05 16:47:35 +01:00
sibyte
sni MIPS: pass non-NULL dev_id on shared request_irq() 2020-03-16 16:04:49 +01:00
tools .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
txx9
vdso .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
vr41xx MIPS: Replace setup_irq() by request_irq() 2020-03-05 16:47:35 +01:00
Kbuild
Kbuild.platforms
Kconfig dma-mapping updates for 5.7 2020-04-04 10:12:47 -07:00
Kconfig.debug
Makefile Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2019-11-25 19:49:58 -08:00
Makefile.postlink MIPS: fix indentation of the 'RELOCS' message 2020-01-20 15:37:30 -08:00