diff options
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/Kconfig | 2 | ||||
-rw-r--r-- | arch/x86/include/asm/io.h | 1 | ||||
-rw-r--r-- | arch/x86/include/asm/pgtable.h | 4 | ||||
-rw-r--r-- | arch/x86/include/asm/pgtable_types.h | 1 | ||||
-rw-r--r-- | arch/x86/mm/fault.c | 21 | ||||
-rw-r--r-- | arch/x86/mm/ioremap.c | 5 |
6 files changed, 10 insertions, 24 deletions
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 57d3b5d96bd2..1342654e8057 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig | |||
@@ -70,6 +70,7 @@ config X86 | |||
70 | select ARCH_HAS_KCOV if X86_64 | 70 | select ARCH_HAS_KCOV if X86_64 |
71 | select ARCH_HAS_MEMBARRIER_SYNC_CORE | 71 | select ARCH_HAS_MEMBARRIER_SYNC_CORE |
72 | select ARCH_HAS_PMEM_API if X86_64 | 72 | select ARCH_HAS_PMEM_API if X86_64 |
73 | select ARCH_HAS_PTE_DEVMAP if X86_64 | ||
73 | select ARCH_HAS_PTE_SPECIAL | 74 | select ARCH_HAS_PTE_SPECIAL |
74 | select ARCH_HAS_REFCOUNT | 75 | select ARCH_HAS_REFCOUNT |
75 | select ARCH_HAS_UACCESS_FLUSHCACHE if X86_64 | 76 | select ARCH_HAS_UACCESS_FLUSHCACHE if X86_64 |
@@ -80,7 +81,6 @@ config X86 | |||
80 | select ARCH_HAS_STRICT_MODULE_RWX | 81 | select ARCH_HAS_STRICT_MODULE_RWX |
81 | select ARCH_HAS_SYNC_CORE_BEFORE_USERMODE | 82 | select ARCH_HAS_SYNC_CORE_BEFORE_USERMODE |
82 | select ARCH_HAS_UBSAN_SANITIZE_ALL | 83 | select ARCH_HAS_UBSAN_SANITIZE_ALL |
83 | select ARCH_HAS_ZONE_DEVICE if X86_64 | ||
84 | select ARCH_HAVE_NMI_SAFE_CMPXCHG | 84 | select ARCH_HAVE_NMI_SAFE_CMPXCHG |
85 | select ARCH_MIGHT_HAVE_ACPI_PDC if ACPI | 85 | select ARCH_MIGHT_HAVE_ACPI_PDC if ACPI |
86 | select ARCH_MIGHT_HAVE_PC_PARPORT | 86 | select ARCH_MIGHT_HAVE_PC_PARPORT |
diff --git a/arch/x86/include/asm/io.h b/arch/x86/include/asm/io.h index a06a9f8294ea..6bed97ff6db2 100644 --- a/arch/x86/include/asm/io.h +++ b/arch/x86/include/asm/io.h | |||
@@ -165,7 +165,6 @@ static inline unsigned int isa_virt_to_bus(volatile void *address) | |||
165 | { | 165 | { |
166 | return (unsigned int)virt_to_phys(address); | 166 | return (unsigned int)virt_to_phys(address); |
167 | } | 167 | } |
168 | #define isa_page_to_bus(page) ((unsigned int)page_to_phys(page)) | ||
169 | #define isa_bus_to_virt phys_to_virt | 168 | #define isa_bus_to_virt phys_to_virt |
170 | 169 | ||
171 | /* | 170 | /* |
diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h index 5e0509b41986..0bc530c4eb13 100644 --- a/arch/x86/include/asm/pgtable.h +++ b/arch/x86/include/asm/pgtable.h | |||
@@ -271,7 +271,7 @@ static inline int has_transparent_hugepage(void) | |||
271 | return boot_cpu_has(X86_FEATURE_PSE); | 271 | return boot_cpu_has(X86_FEATURE_PSE); |
272 | } | 272 | } |
273 | 273 | ||
274 | #ifdef __HAVE_ARCH_PTE_DEVMAP | 274 | #ifdef CONFIG_ARCH_HAS_PTE_DEVMAP |
275 | static inline int pmd_devmap(pmd_t pmd) | 275 | static inline int pmd_devmap(pmd_t pmd) |
276 | { | 276 | { |
277 | return !!(pmd_val(pmd) & _PAGE_DEVMAP); | 277 | return !!(pmd_val(pmd) & _PAGE_DEVMAP); |
@@ -732,7 +732,7 @@ static inline int pte_present(pte_t a) | |||
732 | return pte_flags(a) & (_PAGE_PRESENT | _PAGE_PROTNONE); | 732 | return pte_flags(a) & (_PAGE_PRESENT | _PAGE_PROTNONE); |
733 | } | 733 | } |
734 | 734 | ||
735 | #ifdef __HAVE_ARCH_PTE_DEVMAP | 735 | #ifdef CONFIG_ARCH_HAS_PTE_DEVMAP |
736 | static inline int pte_devmap(pte_t a) | 736 | static inline int pte_devmap(pte_t a) |
737 | { | 737 | { |
738 | return (pte_flags(a) & _PAGE_DEVMAP) == _PAGE_DEVMAP; | 738 | return (pte_flags(a) & _PAGE_DEVMAP) == _PAGE_DEVMAP; |
diff --git a/arch/x86/include/asm/pgtable_types.h b/arch/x86/include/asm/pgtable_types.h index d6ff0bbdb394..b5e49e6bac63 100644 --- a/arch/x86/include/asm/pgtable_types.h +++ b/arch/x86/include/asm/pgtable_types.h | |||
@@ -103,7 +103,6 @@ | |||
103 | #if defined(CONFIG_X86_64) || defined(CONFIG_X86_PAE) | 103 | #if defined(CONFIG_X86_64) || defined(CONFIG_X86_PAE) |
104 | #define _PAGE_NX (_AT(pteval_t, 1) << _PAGE_BIT_NX) | 104 | #define _PAGE_NX (_AT(pteval_t, 1) << _PAGE_BIT_NX) |
105 | #define _PAGE_DEVMAP (_AT(u64, 1) << _PAGE_BIT_DEVMAP) | 105 | #define _PAGE_DEVMAP (_AT(u64, 1) << _PAGE_BIT_DEVMAP) |
106 | #define __HAVE_ARCH_PTE_DEVMAP | ||
107 | #else | 106 | #else |
108 | #define _PAGE_NX (_AT(pteval_t, 0)) | 107 | #define _PAGE_NX (_AT(pteval_t, 0)) |
109 | #define _PAGE_DEVMAP (_AT(pteval_t, 0)) | 108 | #define _PAGE_DEVMAP (_AT(pteval_t, 0)) |
diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c index 794f364cb882..d1634c59ed56 100644 --- a/arch/x86/mm/fault.c +++ b/arch/x86/mm/fault.c | |||
@@ -46,23 +46,6 @@ kmmio_fault(struct pt_regs *regs, unsigned long addr) | |||
46 | return 0; | 46 | return 0; |
47 | } | 47 | } |
48 | 48 | ||
49 | static nokprobe_inline int kprobes_fault(struct pt_regs *regs) | ||
50 | { | ||
51 | if (!kprobes_built_in()) | ||
52 | return 0; | ||
53 | if (user_mode(regs)) | ||
54 | return 0; | ||
55 | /* | ||
56 | * To be potentially processing a kprobe fault and to be allowed to call | ||
57 | * kprobe_running(), we have to be non-preemptible. | ||
58 | */ | ||
59 | if (preemptible()) | ||
60 | return 0; | ||
61 | if (!kprobe_running()) | ||
62 | return 0; | ||
63 | return kprobe_fault_handler(regs, X86_TRAP_PF); | ||
64 | } | ||
65 | |||
66 | /* | 49 | /* |
67 | * Prefetch quirks: | 50 | * Prefetch quirks: |
68 | * | 51 | * |
@@ -1282,7 +1265,7 @@ do_kern_addr_fault(struct pt_regs *regs, unsigned long hw_error_code, | |||
1282 | return; | 1265 | return; |
1283 | 1266 | ||
1284 | /* kprobes don't want to hook the spurious faults: */ | 1267 | /* kprobes don't want to hook the spurious faults: */ |
1285 | if (kprobes_fault(regs)) | 1268 | if (kprobe_page_fault(regs, X86_TRAP_PF)) |
1286 | return; | 1269 | return; |
1287 | 1270 | ||
1288 | /* | 1271 | /* |
@@ -1313,7 +1296,7 @@ void do_user_addr_fault(struct pt_regs *regs, | |||
1313 | mm = tsk->mm; | 1296 | mm = tsk->mm; |
1314 | 1297 | ||
1315 | /* kprobes don't want to hook the spurious faults: */ | 1298 | /* kprobes don't want to hook the spurious faults: */ |
1316 | if (unlikely(kprobes_fault(regs))) | 1299 | if (unlikely(kprobe_page_fault(regs, X86_TRAP_PF))) |
1317 | return; | 1300 | return; |
1318 | 1301 | ||
1319 | /* | 1302 | /* |
diff --git a/arch/x86/mm/ioremap.c b/arch/x86/mm/ioremap.c index e500f1df1140..63e99f15d7cf 100644 --- a/arch/x86/mm/ioremap.c +++ b/arch/x86/mm/ioremap.c | |||
@@ -459,6 +459,11 @@ void iounmap(volatile void __iomem *addr) | |||
459 | } | 459 | } |
460 | EXPORT_SYMBOL(iounmap); | 460 | EXPORT_SYMBOL(iounmap); |
461 | 461 | ||
462 | int __init arch_ioremap_p4d_supported(void) | ||
463 | { | ||
464 | return 0; | ||
465 | } | ||
466 | |||
462 | int __init arch_ioremap_pud_supported(void) | 467 | int __init arch_ioremap_pud_supported(void) |
463 | { | 468 | { |
464 | #ifdef CONFIG_X86_64 | 469 | #ifdef CONFIG_X86_64 |