diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-04-08 15:02:28 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-04-08 15:02:28 -0400 |
commit | d586c86d50cefa0897a51a2dbc714060ccedae76 (patch) | |
tree | 76a7f454637badb74390047aebca5c071c0988fe /arch/s390/mm/pgtable.c | |
parent | e9f37d3a8d126e73f5737ef548cdf6f618e295e4 (diff) | |
parent | 457f2180951cdcbfb4657ddcc83b486e93497f56 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux
Pull second set of s390 patches from Martin Schwidefsky:
"The second part of Heikos uaccess rework, the page table walker for
uaccess is now a thing of the past (yay!)
The code change to fix the theoretical TLB flush problem allows us to
add a TLB flush optimization for zEC12, this machine has new
instructions that allow to do CPU local TLB flushes for single pages
and for all pages of a specific address space.
Plus the usual bug fixing and some more cleanup"
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
s390/uaccess: rework uaccess code - fix locking issues
s390/mm,tlb: optimize TLB flushing for zEC12
s390/mm,tlb: safeguard against speculative TLB creation
s390/irq: Use defines for external interruption codes
s390/irq: Add defines for external interruption codes
s390/sclp: add timeout for queued requests
kvm/s390: also set guest pages back to stable on kexec/kdump
lcs: Add missing destroy_timer_on_stack()
s390/tape: Add missing destroy_timer_on_stack()
s390/tape: Use del_timer_sync()
s390/3270: fix crash with multiple reset device requests
s390/bitops,atomic: add missing memory barriers
s390/zcrypt: add length check for aligned data to avoid overflow in msg-type 6
Diffstat (limited to 'arch/s390/mm/pgtable.c')
-rw-r--r-- | arch/s390/mm/pgtable.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/arch/s390/mm/pgtable.c b/arch/s390/mm/pgtable.c index 5d8324cd866b..d7cfd57815fb 100644 --- a/arch/s390/mm/pgtable.c +++ b/arch/s390/mm/pgtable.c | |||
@@ -54,7 +54,7 @@ static void __crst_table_upgrade(void *arg) | |||
54 | struct mm_struct *mm = arg; | 54 | struct mm_struct *mm = arg; |
55 | 55 | ||
56 | if (current->active_mm == mm) | 56 | if (current->active_mm == mm) |
57 | update_mm(mm, current); | 57 | update_user_asce(mm, 1); |
58 | __tlb_flush_local(); | 58 | __tlb_flush_local(); |
59 | } | 59 | } |
60 | 60 | ||
@@ -107,8 +107,10 @@ void crst_table_downgrade(struct mm_struct *mm, unsigned long limit) | |||
107 | { | 107 | { |
108 | pgd_t *pgd; | 108 | pgd_t *pgd; |
109 | 109 | ||
110 | if (current->active_mm == mm) | 110 | if (current->active_mm == mm) { |
111 | clear_user_asce(mm, 1); | ||
111 | __tlb_flush_mm(mm); | 112 | __tlb_flush_mm(mm); |
113 | } | ||
112 | while (mm->context.asce_limit > limit) { | 114 | while (mm->context.asce_limit > limit) { |
113 | pgd = mm->pgd; | 115 | pgd = mm->pgd; |
114 | switch (pgd_val(*pgd) & _REGION_ENTRY_TYPE_MASK) { | 116 | switch (pgd_val(*pgd) & _REGION_ENTRY_TYPE_MASK) { |
@@ -132,7 +134,7 @@ void crst_table_downgrade(struct mm_struct *mm, unsigned long limit) | |||
132 | crst_table_free(mm, (unsigned long *) pgd); | 134 | crst_table_free(mm, (unsigned long *) pgd); |
133 | } | 135 | } |
134 | if (current->active_mm == mm) | 136 | if (current->active_mm == mm) |
135 | update_mm(mm, current); | 137 | update_user_asce(mm, 1); |
136 | } | 138 | } |
137 | #endif | 139 | #endif |
138 | 140 | ||
@@ -198,7 +200,7 @@ static int gmap_unlink_segment(struct gmap *gmap, unsigned long *table) | |||
198 | static void gmap_flush_tlb(struct gmap *gmap) | 200 | static void gmap_flush_tlb(struct gmap *gmap) |
199 | { | 201 | { |
200 | if (MACHINE_HAS_IDTE) | 202 | if (MACHINE_HAS_IDTE) |
201 | __tlb_flush_idte((unsigned long) gmap->table | | 203 | __tlb_flush_asce(gmap->mm, (unsigned long) gmap->table | |
202 | _ASCE_TYPE_REGION1); | 204 | _ASCE_TYPE_REGION1); |
203 | else | 205 | else |
204 | __tlb_flush_global(); | 206 | __tlb_flush_global(); |
@@ -217,7 +219,7 @@ void gmap_free(struct gmap *gmap) | |||
217 | 219 | ||
218 | /* Flush tlb. */ | 220 | /* Flush tlb. */ |
219 | if (MACHINE_HAS_IDTE) | 221 | if (MACHINE_HAS_IDTE) |
220 | __tlb_flush_idte((unsigned long) gmap->table | | 222 | __tlb_flush_asce(gmap->mm, (unsigned long) gmap->table | |
221 | _ASCE_TYPE_REGION1); | 223 | _ASCE_TYPE_REGION1); |
222 | else | 224 | else |
223 | __tlb_flush_global(); | 225 | __tlb_flush_global(); |