From 642010a97cf364d7dd1b67d9a28a1d4b80592a23 Mon Sep 17 00:00:00 2001 From: Dan Duval Date: Sat, 12 Dec 2015 03:09:55 -0500 Subject: [PATCH] conditionalize Secure Boot initialization on x86 platform Orabug: 22364965 A previous commit, bbb87ba5690c72821614acdd465c24eeb99fa923, introduced a call to efi_secure_boot_init() into the start_kernel() sequence. The new call was not conditionalized based on platform. Secure Boot is only implmented on the x86 platform; the definition of efi_secure_boot_init() is in arch/x86/platform/efi/efi.c. On non-x86 architectures, this caused a implicit-declaration error and broke the build. This commit wraps the call in #ifdef CONFIG_X86/#endif to eliminate the error. Signed-off-by: Dan Duval (cherry picked from commit 289ef170a213f9b078886327a162cbcb7a325838) Signed-off-by: Dan Duval --- init/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init/main.c b/init/main.c index eee9db77db76..a796b4fb3e30 100644 --- a/init/main.c +++ b/init/main.c @@ -638,9 +638,9 @@ asmlinkage __visible void __init start_kernel(void) #ifdef CONFIG_X86 if (efi_enabled(EFI_RUNTIME_SERVICES)) efi_enter_virtual_mode(); -#endif if (efi_enabled(EFI_RUNTIME_SERVICES)) efi_secure_boot_init(); +#endif #ifdef CONFIG_X86_ESPFIX64 /* Should be run before the first non-init thread is created */ init_espfix_bsp(); -- 2.50.1