[linux-yocto] [PATCH 11/14] x86, workaround: Disable mm init BUILD_BUG_ON for LTO

Alejandro Hernandez alejandro.hernandez at linux.intel.com
Mon Feb 13 12:41:24 PST 2017


From: Andi Kleen <ak at linux.intel.com>

On a allyes build with gcc 6 LTO this BUILD_BUG_ON always fires.
I don't belive the vmalloc area is really set up incorrectly.
Disable it for now.

Signed-off-by: Andi Kleen <ak at linux.intel.com>
Signed-off-by: Tom Zanussi <tom.zanussi at linux.intel.com>
---
 arch/x86/mm/init_32.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/x86/mm/init_32.c b/arch/x86/mm/init_32.c
index cb4ef3d..55f3296 100644
--- a/arch/x86/mm/init_32.c
+++ b/arch/x86/mm/init_32.c
@@ -801,8 +801,10 @@ void __init mem_init(void)
 #define __FIXADDR_TOP (-PAGE_SIZE)
 #ifdef CONFIG_HIGHMEM
 	BUILD_BUG_ON(PKMAP_BASE + LAST_PKMAP*PAGE_SIZE	> FIXADDR_START);
+#ifndef CONFIG_LTO /* Something in gcc 6 LTO doesn't like this check */
 	BUILD_BUG_ON(VMALLOC_END			> PKMAP_BASE);
 #endif
+#endif
 #define high_memory (-128UL << 20)
 	BUILD_BUG_ON(VMALLOC_START			>= VMALLOC_END);
 #undef high_memory
-- 
2.6.6



More information about the linux-yocto mailing list