aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/mm/pgtable.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/s390/mm/pgtable.c')
-rw-r--r--arch/s390/mm/pgtable.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/arch/s390/mm/pgtable.c b/arch/s390/mm/pgtable.c
index 0767827540b1..be6c1cf4ad5a 100644
--- a/arch/s390/mm/pgtable.c
+++ b/arch/s390/mm/pgtable.c
@@ -117,6 +117,7 @@ repeat:
117 crst_table_init(table, entry); 117 crst_table_init(table, entry);
118 pgd_populate(mm, (pgd_t *) table, (pud_t *) pgd); 118 pgd_populate(mm, (pgd_t *) table, (pud_t *) pgd);
119 mm->pgd = (pgd_t *) table; 119 mm->pgd = (pgd_t *) table;
120 mm->task_size = mm->context.asce_limit;
120 table = NULL; 121 table = NULL;
121 } 122 }
122 spin_unlock(&mm->page_table_lock); 123 spin_unlock(&mm->page_table_lock);
@@ -154,6 +155,7 @@ void crst_table_downgrade(struct mm_struct *mm, unsigned long limit)
154 BUG(); 155 BUG();
155 } 156 }
156 mm->pgd = (pgd_t *) (pgd_val(*pgd) & _REGION_ENTRY_ORIGIN); 157 mm->pgd = (pgd_t *) (pgd_val(*pgd) & _REGION_ENTRY_ORIGIN);
158 mm->task_size = mm->context.asce_limit;
157 crst_table_free(mm, (unsigned long *) pgd); 159 crst_table_free(mm, (unsigned long *) pgd);
158 } 160 }
159 update_mm(mm, current); 161 update_mm(mm, current);
@@ -256,6 +258,10 @@ int s390_enable_sie(void)
256 struct task_struct *tsk = current; 258 struct task_struct *tsk = current;
257 struct mm_struct *mm, *old_mm; 259 struct mm_struct *mm, *old_mm;
258 260
261 /* Do we have switched amode? If no, we cannot do sie */
262 if (!switch_amode)
263 return -EINVAL;
264
259 /* Do we have pgstes? if yes, we are done */ 265 /* Do we have pgstes? if yes, we are done */
260 if (tsk->mm->context.has_pgste) 266 if (tsk->mm->context.has_pgste)
261 return 0; 267 return 0;
@@ -290,7 +296,7 @@ int s390_enable_sie(void)
290 tsk->mm = tsk->active_mm = mm; 296 tsk->mm = tsk->active_mm = mm;
291 preempt_disable(); 297 preempt_disable();
292 update_mm(mm, tsk); 298 update_mm(mm, tsk);
293 cpu_set(smp_processor_id(), mm->cpu_vm_mask); 299 cpumask_set_cpu(smp_processor_id(), mm_cpumask(mm));
294 preempt_enable(); 300 preempt_enable();
295 task_unlock(tsk); 301 task_unlock(tsk);
296 mmput(old_mm); 302 mmput(old_mm);