lkml.org 
[lkml]   [2014]   [Mar]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 04/13] x86/efi: Delete dead code when checking for non-native
    Date
    From: Matt Fleming <matt.fleming@intel.com>

    Both efi_free_boot_services() and efi_enter_virtual_mode() are invoked
    from init/main.c, but only if the EFI runtime services are available.
    This is not the case for non-native boots, e.g. where a 64-bit kernel is
    booted with 32-bit EFI firmware.

    Delete the dead code.

    Acked-by: Borislav Petkov <bp@suse.de>
    Signed-off-by: Matt Fleming <matt.fleming@intel.com>
    ---
    arch/x86/platform/efi/efi.c | 21 ---------------------
    1 file changed, 21 deletions(-)

    diff --git a/arch/x86/platform/efi/efi.c b/arch/x86/platform/efi/efi.c
    index 0c8672b3f9a3..5f623f3bcbba 100644
    --- a/arch/x86/platform/efi/efi.c
    +++ b/arch/x86/platform/efi/efi.c
    @@ -452,9 +452,6 @@ void __init efi_free_boot_services(void)
    {
    void *p;

    - if (!efi_is_native())
    - return;
    -
    for (p = memmap.map; p < memmap.map_end; p += memmap.desc_size) {
    efi_memory_desc_t *md = p;
    unsigned long long start = md->phys_addr;
    @@ -979,15 +976,6 @@ static void __init kexec_enter_virtual_mode(void)
    efi.systab = NULL;

    /*
    - * We don't do virtual mode, since we don't do runtime services, on
    - * non-native EFI
    - */
    - if (!efi_is_native()) {
    - efi_unmap_memmap();
    - return;
    - }
    -
    - /*
    * Map efi regions which were passed via setup_data. The virt_addr is a
    * fixed addr which was used in first kernel of a kexec boot.
    */
    @@ -1066,15 +1054,6 @@ static void __init __efi_enter_virtual_mode(void)

    efi.systab = NULL;

    - /*
    - * We don't do virtual mode, since we don't do runtime services, on
    - * non-native EFI
    - */
    - if (!efi_is_native()) {
    - efi_unmap_memmap();
    - return;
    - }
    -
    efi_merge_regions();
    new_memmap = efi_map_regions(&count, &pg_shift);
    if (!new_memmap) {
    --
    1.8.5.3


    \
     
     \ /
      Last update: 2014-03-04 15:01    [W:2.265 / U:0.084 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site