From: Dan Duval Date: Sat, 12 Dec 2015 08:09:55 +0000 (-0500) Subject: conditionalize Secure Boot initialization on x86 platform X-Git-Tag: v4.1.12-92~184^2 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=642010a97cf364d7dd1b67d9a28a1d4b80592a23;p=users%2Fjedix%2Flinux-maple.git 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 --- 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();