diff options
| author | Tony Lindgren <tony@atomide.com> | 2020-06-08 10:14:49 -0700 |
|---|---|---|
| committer | Tony Lindgren <tony@atomide.com> | 2020-06-08 10:14:49 -0700 |
| commit | 4263eb6880df8383fff0efb872278a99eb6142c8 (patch) | |
| tree | 67ab9bf228e4f5f341f9408e055180932b39fe06 /arch/s390/mm/pgalloc.c | |
| parent | 636338d7968e47c7f2e0b772a2a825ad932883fb (diff) | |
| parent | 8e326a8bdef3fb42b92bf2742e8405d9b9209367 (diff) | |
| download | linux-4263eb6880df8383fff0efb872278a99eb6142c8.tar.bz2 | |
Merge branch 'fixes-v5.7' into fixes
Diffstat (limited to 'arch/s390/mm/pgalloc.c')
| -rw-r--r-- | arch/s390/mm/pgalloc.c | 16 |
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(); } |