From: Arnd Bergmann Date: Mon, 18 Oct 2021 14:30:10 +0000 (+0100) Subject: ARM: 9140/1: allow compile-testing without machine record X-Git-Tag: v6.6.17~8946^2^3~6 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=336fe1d6c218502af526819507bb710504e0a993;p=platform%2Fkernel%2Flinux-rpi.git ARM: 9140/1: allow compile-testing without machine record A lot of randconfig builds end up not selecting any machine type at all. This is generally fine for the purpose of compile testing, but of course it means that the kernel is not usable on actual hardware, and it causes a warning about this fact. As most of the build bots now force-enable CONFIG_COMPILE_TEST for randconfig builds, use that as a guard to control whether we warn on this type of broken configuration. We could do the same for the missing-cpu-type warning, but those configurations fail to build much earlier. Signed-off-by: Arnd Bergmann Signed-off-by: Russell King (Oracle) --- diff --git a/arch/arm/kernel/vmlinux-xip.lds.S b/arch/arm/kernel/vmlinux-xip.lds.S index 5013682..97adb4b 100644 --- a/arch/arm/kernel/vmlinux-xip.lds.S +++ b/arch/arm/kernel/vmlinux-xip.lds.S @@ -162,7 +162,9 @@ SECTIONS * binutils is too old (for other reasons as well) */ ASSERT((__proc_info_end - __proc_info_begin), "missing CPU support") +#ifndef CONFIG_COMPILE_TEST ASSERT((__arch_info_end - __arch_info_begin), "no machine record defined") +#endif #ifdef CONFIG_XIP_DEFLATED_DATA /* diff --git a/arch/arm/kernel/vmlinux.lds.S b/arch/arm/kernel/vmlinux.lds.S index 20c4f6d..f02d617 100644 --- a/arch/arm/kernel/vmlinux.lds.S +++ b/arch/arm/kernel/vmlinux.lds.S @@ -174,6 +174,8 @@ __start_rodata_section_aligned = ALIGN(__start_rodata, 1 << SECTION_SHIFT); * binutils is too old (for other reasons as well) */ ASSERT((__proc_info_end - __proc_info_begin), "missing CPU support") +#ifndef CONFIG_COMPILE_TEST ASSERT((__arch_info_end - __arch_info_begin), "no machine record defined") +#endif #endif /* CONFIG_XIP_KERNEL */