diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2019-07-17 11:58:04 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-07-17 11:58:04 -0400 |
commit | 57a8ec387e1441ea5e1232bc0749fb99a8cba7e7 (patch) | |
tree | b5fb03fc6bc5754de8b5b1f8b0e4f36d67c8315c /arch/x86 | |
parent | 0a8ad0ffa4d80a544f6cbff703bf6394339afcdf (diff) | |
parent | 43e11fa2d1d3b6e35629fa556eb7d571edba2010 (diff) |
Merge branch 'akpm' (patches from Andrew)
Merge more updates from Andrew Morton:
"VM:
- z3fold fixes and enhancements by Henry Burns and Vitaly Wool
- more accurate reclaimed slab caches calculations by Yafang Shao
- fix MAP_UNINITIALIZED UAPI symbol to not depend on config, by
Christoph Hellwig
- !CONFIG_MMU fixes by Christoph Hellwig
- new novmcoredd parameter to omit device dumps from vmcore, by
Kairui Song
- new test_meminit module for testing heap and pagealloc
initialization, by Alexander Potapenko
- ioremap improvements for huge mappings, by Anshuman Khandual
- generalize kprobe page fault handling, by Anshuman Khandual
- device-dax hotplug fixes and improvements, by Pavel Tatashin
- enable synchronous DAX fault on powerpc, by Aneesh Kumar K.V
- add pte_devmap() support for arm64, by Robin Murphy
- unify locked_vm accounting with a helper, by Daniel Jordan
- several misc fixes
core/lib:
- new typeof_member() macro including some users, by Alexey Dobriyan
- make BIT() and GENMASK() available in asm, by Masahiro Yamada
- changed LIST_POISON2 on x86_64 to 0xdead000000000122 for better
code generation, by Alexey Dobriyan
- rbtree code size optimizations, by Michel Lespinasse
- convert struct pid count to refcount_t, by Joel Fernandes
get_maintainer.pl:
- add --no-moderated switch to skip moderated ML's, by Joe Perches
misc:
- ptrace PTRACE_GET_SYSCALL_INFO interface
- coda updates
- gdb scripts, various"
[ Using merge message suggestion from Vlastimil Babka, with some editing - Linus ]
* emailed patches from Andrew Morton <akpm@linux-foundation.org>: (100 commits)
fs/select.c: use struct_size() in kmalloc()
mm: add account_locked_vm utility function
arm64: mm: implement pte_devmap support
mm: introduce ARCH_HAS_PTE_DEVMAP
mm: clean up is_device_*_page() definitions
mm/mmap: move common defines to mman-common.h
mm: move MAP_SYNC to asm-generic/mman-common.h
device-dax: "Hotremove" persistent memory that is used like normal RAM
mm/hotplug: make remove_memory() interface usable
device-dax: fix memory and resource leak if hotplug fails
include/linux/lz4.h: fix spelling and copy-paste errors in documentation
ipc/mqueue.c: only perform resource calculation if user valid
include/asm-generic/bug.h: fix "cut here" for WARN_ON for __WARN_TAINT architectures
scripts/gdb: add helpers to find and list devices
scripts/gdb: add lx-genpd-summary command
drivers/pps/pps.c: clear offset flags in PPS_SETPARAMS ioctl
kernel/pid.c: convert struct pid count to refcount_t
drivers/rapidio/devices/rio_mport_cdev.c: NUL terminate some strings
select: shift restore_saved_sigmask_unless() into poll_select_copy_remaining()
select: change do_poll() to return -ERESTARTNOHAND rather than -EINTR
...
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 |