]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
conditionalize Secure Boot initialization on x86 platform
authorDan Duval <dan.duval@oracle.com>
Sat, 12 Dec 2015 08:09:55 +0000 (03:09 -0500)
committerChuck Anderson <chuck.anderson@oracle.com>
Wed, 16 Mar 2016 15:20:09 +0000 (08:20 -0700)
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 <dan.duval@oracle.com>
(cherry picked from commit 289ef170a213f9b078886327a162cbcb7a325838)
Signed-off-by: Dan Duval <dan.duval@oracle.com>
init/main.c

index eee9db77db76bfbd487d5d5f0dc38acfc8274a00..a796b4fb3e3057945b176c5873422f0eda8127d0 100644 (file)
@@ -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();