diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-10-04 17:05:52 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-10-04 17:05:52 -0400 |
commit | e46cae441824999c858d482ca1f661cf4292c02f (patch) | |
tree | 0bf4dabec0ef16f92723ff0fac0e837f59b48cdc /arch/s390/mm | |
parent | 02bafd96f3a5d8e610b19033ffec55b92459aaae (diff) | |
parent | 6cd997db911f28f2510b771691270c52b63ed2e6 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux
Pull s390 updates from Martin Schwidefsky:
"The new features and main improvements in this merge for v4.9
- Support for the UBSAN sanitizer
- Set HAVE_EFFICIENT_UNALIGNED_ACCESS, it improves the code in some
places
- Improvements for the in-kernel fpu code, in particular the overhead
for multiple consecutive in kernel fpu users is recuded
- Add a SIMD implementation for the RAID6 gen and xor operations
- Add RAID6 recovery based on the XC instruction
- The PCI DMA flush logic has been improved to increase the speed of
the map / unmap operations
- The time synchronization code has seen some updates
And bug fixes all over the place"
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: (48 commits)
s390/con3270: fix insufficient space padding
s390/con3270: fix use of uninitialised data
MAINTAINERS: update DASD maintainer
s390/cio: fix accidental interrupt enabling during resume
s390/dasd: add missing \n to end of dev_err messages
s390/config: Enable config options for Docker
s390/dasd: make query host access interruptible
s390/dasd: fix panic during offline processing
s390/dasd: fix hanging offline processing
s390/pci_dma: improve lazy flush for unmap
s390/pci_dma: split dma_update_trans
s390/pci_dma: improve map_sg
s390/pci_dma: simplify dma address calculation
s390/pci_dma: remove dma address range check
iommu/s390: simplify registration of I/O address translation parameters
s390: migrate exception table users off module.h and onto extable.h
s390: export header for CLP ioctl
s390/vmur: fix irq pointer dereference in int handler
s390/dasd: add missing KOBJ_CHANGE event for unformatted devices
s390: enable UBSAN
...
Diffstat (limited to 'arch/s390/mm')
-rw-r--r-- | arch/s390/mm/fault.c | 2 | ||||
-rw-r--r-- | arch/s390/mm/gmap.c | 15 | ||||
-rw-r--r-- | arch/s390/mm/pageattr.c | 4 | ||||
-rw-r--r-- | arch/s390/mm/pgtable.c | 18 |
4 files changed, 27 insertions, 12 deletions
diff --git a/arch/s390/mm/fault.c b/arch/s390/mm/fault.c index cbb73fabc91e..661d9fe63c43 100644 --- a/arch/s390/mm/fault.c +++ b/arch/s390/mm/fault.c | |||
@@ -24,7 +24,7 @@ | |||
24 | #include <linux/kdebug.h> | 24 | #include <linux/kdebug.h> |
25 | #include <linux/init.h> | 25 | #include <linux/init.h> |
26 | #include <linux/console.h> | 26 | #include <linux/console.h> |
27 | #include <linux/module.h> | 27 | #include <linux/extable.h> |
28 | #include <linux/hardirq.h> | 28 | #include <linux/hardirq.h> |
29 | #include <linux/kprobes.h> | 29 | #include <linux/kprobes.h> |
30 | #include <linux/uaccess.h> | 30 | #include <linux/uaccess.h> |
diff --git a/arch/s390/mm/gmap.c b/arch/s390/mm/gmap.c index 2ce6bb3bab32..3ba622702ce4 100644 --- a/arch/s390/mm/gmap.c +++ b/arch/s390/mm/gmap.c | |||
@@ -94,6 +94,7 @@ out: | |||
94 | struct gmap *gmap_create(struct mm_struct *mm, unsigned long limit) | 94 | struct gmap *gmap_create(struct mm_struct *mm, unsigned long limit) |
95 | { | 95 | { |
96 | struct gmap *gmap; | 96 | struct gmap *gmap; |
97 | unsigned long gmap_asce; | ||
97 | 98 | ||
98 | gmap = gmap_alloc(limit); | 99 | gmap = gmap_alloc(limit); |
99 | if (!gmap) | 100 | if (!gmap) |
@@ -101,6 +102,11 @@ struct gmap *gmap_create(struct mm_struct *mm, unsigned long limit) | |||
101 | gmap->mm = mm; | 102 | gmap->mm = mm; |
102 | spin_lock(&mm->context.gmap_lock); | 103 | spin_lock(&mm->context.gmap_lock); |
103 | list_add_rcu(&gmap->list, &mm->context.gmap_list); | 104 | list_add_rcu(&gmap->list, &mm->context.gmap_list); |
105 | if (list_is_singular(&mm->context.gmap_list)) | ||
106 | gmap_asce = gmap->asce; | ||
107 | else | ||
108 | gmap_asce = -1UL; | ||
109 | WRITE_ONCE(mm->context.gmap_asce, gmap_asce); | ||
104 | spin_unlock(&mm->context.gmap_lock); | 110 | spin_unlock(&mm->context.gmap_lock); |
105 | return gmap; | 111 | return gmap; |
106 | } | 112 | } |
@@ -230,6 +236,7 @@ EXPORT_SYMBOL_GPL(gmap_put); | |||
230 | void gmap_remove(struct gmap *gmap) | 236 | void gmap_remove(struct gmap *gmap) |
231 | { | 237 | { |
232 | struct gmap *sg, *next; | 238 | struct gmap *sg, *next; |
239 | unsigned long gmap_asce; | ||
233 | 240 | ||
234 | /* Remove all shadow gmaps linked to this gmap */ | 241 | /* Remove all shadow gmaps linked to this gmap */ |
235 | if (!list_empty(&gmap->children)) { | 242 | if (!list_empty(&gmap->children)) { |
@@ -243,6 +250,14 @@ void gmap_remove(struct gmap *gmap) | |||
243 | /* Remove gmap from the pre-mm list */ | 250 | /* Remove gmap from the pre-mm list */ |
244 | spin_lock(&gmap->mm->context.gmap_lock); | 251 | spin_lock(&gmap->mm->context.gmap_lock); |
245 | list_del_rcu(&gmap->list); | 252 | list_del_rcu(&gmap->list); |
253 | if (list_empty(&gmap->mm->context.gmap_list)) | ||
254 | gmap_asce = 0; | ||
255 | else if (list_is_singular(&gmap->mm->context.gmap_list)) | ||
256 | gmap_asce = list_first_entry(&gmap->mm->context.gmap_list, | ||
257 | struct gmap, list)->asce; | ||
258 | else | ||
259 | gmap_asce = -1UL; | ||
260 | WRITE_ONCE(gmap->mm->context.gmap_asce, gmap_asce); | ||
246 | spin_unlock(&gmap->mm->context.gmap_lock); | 261 | spin_unlock(&gmap->mm->context.gmap_lock); |
247 | synchronize_rcu(); | 262 | synchronize_rcu(); |
248 | /* Put reference */ | 263 | /* Put reference */ |
diff --git a/arch/s390/mm/pageattr.c b/arch/s390/mm/pageattr.c index af7cf28cf97e..44f150312a16 100644 --- a/arch/s390/mm/pageattr.c +++ b/arch/s390/mm/pageattr.c | |||
@@ -309,11 +309,11 @@ static void ipte_range(pte_t *pte, unsigned long address, int nr) | |||
309 | int i; | 309 | int i; |
310 | 310 | ||
311 | if (test_facility(13)) { | 311 | if (test_facility(13)) { |
312 | __ptep_ipte_range(address, nr - 1, pte); | 312 | __ptep_ipte_range(address, nr - 1, pte, IPTE_GLOBAL); |
313 | return; | 313 | return; |
314 | } | 314 | } |
315 | for (i = 0; i < nr; i++) { | 315 | for (i = 0; i < nr; i++) { |
316 | __ptep_ipte(address, pte); | 316 | __ptep_ipte(address, pte, IPTE_GLOBAL); |
317 | address += PAGE_SIZE; | 317 | address += PAGE_SIZE; |
318 | pte++; | 318 | pte++; |
319 | } | 319 | } |
diff --git a/arch/s390/mm/pgtable.c b/arch/s390/mm/pgtable.c index 5f092015aaa7..7a1897c51c54 100644 --- a/arch/s390/mm/pgtable.c +++ b/arch/s390/mm/pgtable.c | |||
@@ -35,9 +35,9 @@ static inline pte_t ptep_flush_direct(struct mm_struct *mm, | |||
35 | atomic_inc(&mm->context.flush_count); | 35 | atomic_inc(&mm->context.flush_count); |
36 | if (MACHINE_HAS_TLB_LC && | 36 | if (MACHINE_HAS_TLB_LC && |
37 | cpumask_equal(mm_cpumask(mm), cpumask_of(smp_processor_id()))) | 37 | cpumask_equal(mm_cpumask(mm), cpumask_of(smp_processor_id()))) |
38 | __ptep_ipte_local(addr, ptep); | 38 | __ptep_ipte(addr, ptep, IPTE_LOCAL); |
39 | else | 39 | else |
40 | __ptep_ipte(addr, ptep); | 40 | __ptep_ipte(addr, ptep, IPTE_GLOBAL); |
41 | atomic_dec(&mm->context.flush_count); | 41 | atomic_dec(&mm->context.flush_count); |
42 | return old; | 42 | return old; |
43 | } | 43 | } |
@@ -56,7 +56,7 @@ static inline pte_t ptep_flush_lazy(struct mm_struct *mm, | |||
56 | pte_val(*ptep) |= _PAGE_INVALID; | 56 | pte_val(*ptep) |= _PAGE_INVALID; |
57 | mm->context.flush_mm = 1; | 57 | mm->context.flush_mm = 1; |
58 | } else | 58 | } else |
59 | __ptep_ipte(addr, ptep); | 59 | __ptep_ipte(addr, ptep, IPTE_GLOBAL); |
60 | atomic_dec(&mm->context.flush_count); | 60 | atomic_dec(&mm->context.flush_count); |
61 | return old; | 61 | return old; |
62 | } | 62 | } |
@@ -301,9 +301,9 @@ static inline pmd_t pmdp_flush_direct(struct mm_struct *mm, | |||
301 | atomic_inc(&mm->context.flush_count); | 301 | atomic_inc(&mm->context.flush_count); |
302 | if (MACHINE_HAS_TLB_LC && | 302 | if (MACHINE_HAS_TLB_LC && |
303 | cpumask_equal(mm_cpumask(mm), cpumask_of(smp_processor_id()))) | 303 | cpumask_equal(mm_cpumask(mm), cpumask_of(smp_processor_id()))) |
304 | __pmdp_idte_local(addr, pmdp); | 304 | __pmdp_idte(addr, pmdp, IDTE_LOCAL); |
305 | else | 305 | else |
306 | __pmdp_idte(addr, pmdp); | 306 | __pmdp_idte(addr, pmdp, IDTE_GLOBAL); |
307 | atomic_dec(&mm->context.flush_count); | 307 | atomic_dec(&mm->context.flush_count); |
308 | return old; | 308 | return old; |
309 | } | 309 | } |
@@ -322,7 +322,7 @@ static inline pmd_t pmdp_flush_lazy(struct mm_struct *mm, | |||
322 | pmd_val(*pmdp) |= _SEGMENT_ENTRY_INVALID; | 322 | pmd_val(*pmdp) |= _SEGMENT_ENTRY_INVALID; |
323 | mm->context.flush_mm = 1; | 323 | mm->context.flush_mm = 1; |
324 | } else if (MACHINE_HAS_IDTE) | 324 | } else if (MACHINE_HAS_IDTE) |
325 | __pmdp_idte(addr, pmdp); | 325 | __pmdp_idte(addr, pmdp, IDTE_GLOBAL); |
326 | else | 326 | else |
327 | __pmdp_csp(pmdp); | 327 | __pmdp_csp(pmdp); |
328 | atomic_dec(&mm->context.flush_count); | 328 | atomic_dec(&mm->context.flush_count); |
@@ -374,9 +374,9 @@ static inline pud_t pudp_flush_direct(struct mm_struct *mm, | |||
374 | atomic_inc(&mm->context.flush_count); | 374 | atomic_inc(&mm->context.flush_count); |
375 | if (MACHINE_HAS_TLB_LC && | 375 | if (MACHINE_HAS_TLB_LC && |
376 | cpumask_equal(mm_cpumask(mm), cpumask_of(smp_processor_id()))) | 376 | cpumask_equal(mm_cpumask(mm), cpumask_of(smp_processor_id()))) |
377 | __pudp_idte_local(addr, pudp); | 377 | __pudp_idte(addr, pudp, IDTE_LOCAL); |
378 | else | 378 | else |
379 | __pudp_idte(addr, pudp); | 379 | __pudp_idte(addr, pudp, IDTE_GLOBAL); |
380 | atomic_dec(&mm->context.flush_count); | 380 | atomic_dec(&mm->context.flush_count); |
381 | return old; | 381 | return old; |
382 | } | 382 | } |
@@ -620,7 +620,7 @@ bool test_and_clear_guest_dirty(struct mm_struct *mm, unsigned long addr) | |||
620 | pte = *ptep; | 620 | pte = *ptep; |
621 | if (dirty && (pte_val(pte) & _PAGE_PRESENT)) { | 621 | if (dirty && (pte_val(pte) & _PAGE_PRESENT)) { |
622 | pgste = pgste_pte_notify(mm, addr, ptep, pgste); | 622 | pgste = pgste_pte_notify(mm, addr, ptep, pgste); |
623 | __ptep_ipte(addr, ptep); | 623 | __ptep_ipte(addr, ptep, IPTE_GLOBAL); |
624 | if (MACHINE_HAS_ESOP || !(pte_val(pte) & _PAGE_WRITE)) | 624 | if (MACHINE_HAS_ESOP || !(pte_val(pte) & _PAGE_WRITE)) |
625 | pte_val(pte) |= _PAGE_PROTECT; | 625 | pte_val(pte) |= _PAGE_PROTECT; |
626 | else | 626 | else |