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
Showing the changes to include/linux (1 of 22 files). Show all
Unified · Split
| @@ -618,18 +618,30 @@ extern int __init efi_setup_pcdp_console(char *); · 617 unmodified lines | |||
| 618 | #endif | 618 | #endif |
| 619 | 619 | ||
| 620 | /* | 620 | /* |
| 621 | * We play games with efi_enabled so that the compiler will, if possible, remove | 621 | * We play games with efi_enabled so that the compiler will, if |
| 622 | * EFI-related code altogether. | 622 | * possible, remove EFI-related code altogether. |
| 623 | */ | 623 | */ |
| 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 | |||
| 624 | #ifdef CONFIG_EFI | 631 | #ifdef CONFIG_EFI |
| 625 | # ifdef CONFIG_X86 | 632 | # ifdef CONFIG_X86 |
| 626 | extern int efi_enabled; | 633 | extern int efi_enabled(int facility); |
| 627 | extern bool efi_64bit; | ||
| 628 | # else | 634 | # else |
| 629 | # define efi_enabled 1 | 635 | static inline int efi_enabled(int facility) |
| 636 | { | ||
| 637 | return 1; | ||
| 638 | } | ||
| 630 | # endif | 639 | # endif |
| 631 | #else | 640 | #else |
| 632 | # define efi_enabled 0 | 641 | static inline int efi_enabled(int facility) |
| 642 | { | ||
| 643 | return 0; | ||
| 644 | } | ||
| 633 | #endif | 645 | #endif |
| 634 | 646 | ||
| 635 | /* | 647 | /* |