History

Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 fixes from Peter Anvin: "This is a collection of miscellaneous fixes, the most important one is the fix for the Samsung laptop bricking issue (auto-blacklisting the samsung-laptop driver); the efi_enabled() changes you see below are prerequisites for that fix. The other issues fixed are booting on OLPC XO-1.5, an UV fix, NMI debugging, and requiring CAP_SYS_RAWIO for MSR references, just as with I/O port references." * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: samsung-laptop: Disable on EFI hardware efi: Make 'efi_enabled' a function to query EFI facilities smp: Fix SMP function call empty cpu mask race x86/msr: Add capabilities check x86/dma-debug: Bump PREALLOC_DMA_DEBUG_ENTRIES x86/olpc: Fix olpc-xo1-sci.c build errors arch/x86/platform/uv: Fix incorrect tlb flush all issue x86-64: Fix unwind annotations in recent NMI changes x86-32: Start out cr0 clean, disable paging before modifying cr3/4

Linus Torvalds committed 13 years ago

Commit bdb0ae62 parents 0fe94b9 e00942422 files · +118 −66Browse files

Showing the changes to include/linux (1 of 22 files). Show all

Unified · Split

include/linux/efi.h+18−6
@@ -618,18 +618,30 @@ extern int __init efi_setup_pcdp_console(char *); · 617 unmodified lines
618618 #endif
619619
620620 /*
621− * We play games with efi_enabled so that the compiler will, if possible, remove
622− * EFI-related code altogether.
621+ * We play games with efi_enabled so that the compiler will, if
622+ * possible, remove EFI-related code altogether.
623623 */
624+#define EFI_BOOT 0 /* Were we booted from EFI? */
625+#define EFI_SYSTEM_TABLES 1 /* Can we use EFI system tables? */
626+#define EFI_CONFIG_TABLES 2 /* Can we use EFI config tables? */
627+#define EFI_RUNTIME_SERVICES 3 /* Can we use runtime services? */
628+#define EFI_MEMMAP 4 /* Can we use EFI memory map? */
629+#define EFI_64BIT 5 /* Is the firmware 64-bit? */
630+
624631 #ifdef CONFIG_EFI
625632 # ifdef CONFIG_X86
626− extern int efi_enabled;
627− extern bool efi_64bit;
633+extern int efi_enabled(int facility);
628634 # else
629−# define efi_enabled 1
635+static inline int efi_enabled(int facility)
636+{
637+ return 1;
638+}
630639 # endif
631640 #else
632−# define efi_enabled 0
641+static inline int efi_enabled(int facility)
642+{
643+ return 0;
644+}
633645 #endif
634646
635647 /*