Merge branch 'efi-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
authorLinus Torvalds <torvalds@linux-foundation.org>
Mon, 3 Oct 2016 18:33:18 +0000 (11:33 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 3 Oct 2016 18:33:18 +0000 (11:33 -0700)
Pull EFI updates from Ingo Molnar:
 "Main changes in this cycle were:

   - Refactor the EFI memory map code into architecture neutral files
     and allow drivers to permanently reserve EFI boot services regions
     on x86, as well as ARM/arm64. (Matt Fleming)

   - Add ARM support for the EFI ESRT driver. (Ard Biesheuvel)

   - Make the EFI runtime services and efivar API interruptible by
     swapping spinlocks for semaphores. (Sylvain Chouleur)

   - Provide the EFI identity mapping for kexec which allows kexec to
     work on SGI/UV platforms with requiring the "noefi" kernel command
     line parameter. (Alex Thorlton)

   - Add debugfs node to dump EFI page tables on arm64. (Ard Biesheuvel)

   - Merge the EFI test driver being carried out of tree until now in
     the FWTS project. (Ivan Hu)

   - Expand the list of flags for classifying EFI regions as "RAM" on
     arm64 so we align with the UEFI spec. (Ard Biesheuvel)

   - Optimise out the EFI mixed mode if it's unsupported (CONFIG_X86_32)
     or disabled (CONFIG_EFI_MIXED=n) and switch the early EFI boot
     services function table for direct calls, alleviating us from
     having to maintain the custom function table. (Lukas Wunner)

   - Miscellaneous cleanups and fixes"

* 'efi-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (30 commits)
  x86/efi: Round EFI memmap reservations to EFI_PAGE_SIZE
  x86/efi: Allow invocation of arbitrary boot services
  x86/efi: Optimize away setup_gop32/64 if unused
  x86/efi: Use kmalloc_array() in efi_call_phys_prolog()
  efi/arm64: Treat regions with WT/WC set but WB cleared as memory
  efi: Add efi_test driver for exporting UEFI runtime service interfaces
  x86/efi: Defer efi_esrt_init until after memblock_x86_fill
  efi/arm64: Add debugfs node to dump UEFI runtime page tables
  x86/efi: Remove unused find_bits() function
  fs/efivarfs: Fix double kfree() in error path
  x86/efi: Map in physical addresses in efi_map_region_fixed
  lib/ucs2_string: Speed up ucs2_utf8size()
  firmware-gsmi: Delete an unnecessary check before the function call "dma_pool_destroy"
  x86/efi: Initialize status to ensure garbage is not returned on small size
  efi: Replace runtime services spinlock with semaphore
  efi: Don't use spinlocks for efi vars
  efi: Use a file local lock for efivars
  efi/arm*: esrt: Add missing call to efi_esrt_init()
  efi/esrt: Use memremap not ioremap to access ESRT table in memory
  x86/efi-bgrt: Use efi_mem_reserve() to avoid copying image data
  ...

1  2 
MAINTAINERS
arch/x86/kernel/setup.c

diff --combined MAINTAINERS
@@@ -913,17 -913,15 +913,17 @@@ F:      arch/arm/include/asm/floppy.
  
  ARM PMU PROFILING AND DEBUGGING
  M:    Will Deacon <will.deacon@arm.com>
 -R:    Mark Rutland <mark.rutland@arm.com>
 +M:    Mark Rutland <mark.rutland@arm.com>
  S:    Maintained
 +L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
  F:    arch/arm*/kernel/perf_*
  F:    arch/arm/oprofile/common.c
  F:    arch/arm*/kernel/hw_breakpoint.c
  F:    arch/arm*/include/asm/hw_breakpoint.h
  F:    arch/arm*/include/asm/perf_event.h
 -F:    drivers/perf/arm_pmu.c
 +F:    drivers/perf/*
  F:    include/linux/perf/arm_pmu.h
 +F:    Documentation/devicetree/bindings/arm/pmu.txt
  
  ARM PORT
  M:    Russell King <linux@armlinux.org.uk>
@@@ -2503,7 -2501,7 +2503,7 @@@ S:      Supporte
  F:    kernel/bpf/
  
  BROADCOM B44 10/100 ETHERNET DRIVER
 -M:    Gary Zambrano <zambrano@broadcom.com>
 +M:    Michael Chan <michael.chan@broadcom.com>
  L:    netdev@vger.kernel.org
  S:    Supported
  F:    drivers/net/ethernet/broadcom/b44.*
@@@ -3284,7 -3282,6 +3284,7 @@@ L:      linux-pm@vger.kernel.or
  S:    Maintained
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git
  T:    git git://git.linaro.org/people/vireshk/linux.git (For ARM Updates)
 +F:    Documentation/cpu-freq/
  F:    drivers/cpufreq/
  F:    include/linux/cpufreq.h
  
@@@ -4587,6 -4584,13 +4587,13 @@@ M:    Peter Jones <pjones@redhat.com
  S:    Maintained
  F:    drivers/video/fbdev/efifb.c
  
+ EFI TEST DRIVER
+ L:    linux-efi@vger.kernel.org
+ M:    Ivan Hu <ivan.hu@canonical.com>
+ M:    Matt Fleming <matt@codeblueprint.co.uk>
+ S:    Maintained
+ F:    drivers/firmware/efi/test/
  EFS FILESYSTEM
  W:    http://aeschi.ch.eu.org/efs/
  S:    Orphan
@@@ -8164,15 -8168,6 +8171,15 @@@ S:    Maintaine
  W:    https://fedorahosted.org/dropwatch/
  F:    net/core/drop_monitor.c
  
 +NETWORKING [DSA]
 +M:    Andrew Lunn <andrew@lunn.ch>
 +M:    Vivien Didelot <vivien.didelot@savoirfairelinux.com>
 +M:    Florian Fainelli <f.fainelli@gmail.com>
 +S:    Maintained
 +F:    net/dsa/
 +F:    include/net/dsa.h
 +F:    drivers/net/dsa/
 +
  NETWORKING [GENERAL]
  M:    "David S. Miller" <davem@davemloft.net>
  L:    netdev@vger.kernel.org
@@@ -8748,7 -8743,7 +8755,7 @@@ F:      drivers/oprofile
  F:    include/linux/oprofile.h
  
  ORACLE CLUSTER FILESYSTEM 2 (OCFS2)
 -M:    Mark Fasheh <mfasheh@suse.com>
 +M:    Mark Fasheh <mfasheh@versity.com>
  M:    Joel Becker <jlbec@evilplan.org>
  L:    ocfs2-devel@oss.oracle.com (moderated for non-subscribers)
  W:    http://ocfs2.wiki.kernel.org
@@@ -8860,7 -8855,6 +8867,7 @@@ S:      Supporte
  F:    Documentation/virtual/paravirt_ops.txt
  F:    arch/*/kernel/paravirt*
  F:    arch/*/include/asm/paravirt.h
 +F:    include/linux/hypervisor.h
  
  PARIDE DRIVERS FOR PARALLEL PORT IDE DEVICES
  M:    Tim Waugh <tim@cyberelk.net>
@@@ -11630,7 -11624,7 +11637,7 @@@ F:   Documentation/devicetree/bindings/th
  THERMAL/CPU_COOLING
  M:    Amit Daniel Kachhap <amit.kachhap@gmail.com>
  M:    Viresh Kumar <viresh.kumar@linaro.org>
 -M:    Javi Merino <javi.merino@arm.com>
 +M:    Javi Merino <javi.merino@kernel.org>
  L:    linux-pm@vger.kernel.org
  S:    Supported
  F:    Documentation/thermal/cpu-cooling-api.txt
diff --combined arch/x86/kernel/setup.c
@@@ -1096,19 -1096,19 +1096,19 @@@ void __init setup_arch(char **cmdline_p
        memblock_set_current_limit(ISA_END_ADDRESS);
        memblock_x86_fill();
  
-       if (efi_enabled(EFI_BOOT)) {
+       reserve_bios_regions();
+       if (efi_enabled(EFI_MEMMAP)) {
                efi_fake_memmap();
                efi_find_mirror();
-       }
-       reserve_bios_regions();
+               efi_esrt_init();
  
-       /*
-        * The EFI specification says that boot service code won't be called
-        * after ExitBootServices(). This is, in fact, a lie.
-        */
-       if (efi_enabled(EFI_MEMMAP))
+               /*
+                * The EFI specification says that boot service code won't be
+                * called after ExitBootServices(). This is, in fact, a lie.
+                */
                efi_reserve_boot_services();
+       }
  
        /* preallocate 4k for mptable mpc */
        early_reserve_e820_mpc_new();
         * auditing all the early-boot CR4 manipulation would be needed to
         * rule it out.
         */
 -      if (boot_cpu_data.cpuid_level >= 0)
 -              /* A CPU has %cr4 if and only if it has CPUID. */
 -              mmu_cr4_features = __read_cr4();
 +      mmu_cr4_features = __read_cr4_safe();
  
        memblock_set_current_limit(get_max_mapped());