summaryrefslogtreecommitdiffstats
path: root/arch/s390/mm/pgalloc.c
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2020-05-19 20:34:12 +0200
committerPeter Zijlstra <peterz@infradead.org>2020-05-19 20:34:12 +0200
commit9013196a467e770e1470cccee6c0fe435ef37c66 (patch)
tree2aefbb9d14a1a7513af9e752fe5bb80cf6b00c0c /arch/s390/mm/pgalloc.c
parent2a0a24ebb499c9d499eea948d3fc108f936e36d4 (diff)
parent39f23ce07b9355d05a64ae303ce20d1c4b92b957 (diff)
downloadlinux-9013196a467e770e1470cccee6c0fe435ef37c66.tar.bz2
Merge branch 'sched/urgent'
Diffstat (limited to 'arch/s390/mm/pgalloc.c')
-rw-r--r--arch/s390/mm/pgalloc.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/arch/s390/mm/pgalloc.c b/arch/s390/mm/pgalloc.c
index 498c98a312f4..fff169d64711 100644
--- a/arch/s390/mm/pgalloc.c
+++ b/arch/s390/mm/pgalloc.c
@@ -70,8 +70,20 @@ static void __crst_table_upgrade(void *arg)
{
struct mm_struct *mm = arg;
- if (current->active_mm == mm)
- set_user_asce(mm);
+ /* we must change all active ASCEs to avoid the creation of new TLBs */
+ if (current->active_mm == mm) {
+ S390_lowcore.user_asce = mm->context.asce;
+ if (current->thread.mm_segment == USER_DS) {
+ __ctl_load(S390_lowcore.user_asce, 1, 1);
+ /* Mark user-ASCE present in CR1 */
+ clear_cpu_flag(CIF_ASCE_PRIMARY);
+ }
+ if (current->thread.mm_segment == USER_DS_SACF) {
+ __ctl_load(S390_lowcore.user_asce, 7, 7);
+ /* enable_sacf_uaccess does all or nothing */
+ WARN_ON(!test_cpu_flag(CIF_ASCE_SECONDARY));
+ }
+ }
__tlb_flush_local();
}