Commit a53efe5f authored by Martin Schwidefsky's avatar Martin Schwidefsky

sched/mm: call finish_arch_post_lock_switch in idle_task_exit and use_mm

The finish_arch_post_lock_switch is called at the end of the task
switch after all locks have been released. In concept it is paired
with the switch_mm function, but the current code only does the
call in finish_task_switch. Add the call to idle_task_exit and
use_mm. One use case for the additional calls is s390 which will
use finish_arch_post_lock_switch to wait for the completion of
TLB flush operations.
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent 56f15e51
...@@ -4692,8 +4692,10 @@ void idle_task_exit(void) ...@@ -4692,8 +4692,10 @@ void idle_task_exit(void)
BUG_ON(cpu_online(smp_processor_id())); BUG_ON(cpu_online(smp_processor_id()));
if (mm != &init_mm) if (mm != &init_mm) {
switch_mm(mm, &init_mm, current); switch_mm(mm, &init_mm, current);
finish_arch_post_lock_switch();
}
mmdrop(mm); mmdrop(mm);
} }
......
...@@ -31,6 +31,9 @@ void use_mm(struct mm_struct *mm) ...@@ -31,6 +31,9 @@ void use_mm(struct mm_struct *mm)
tsk->mm = mm; tsk->mm = mm;
switch_mm(active_mm, mm, tsk); switch_mm(active_mm, mm, tsk);
task_unlock(tsk); task_unlock(tsk);
#ifdef finish_arch_post_lock_switch
finish_arch_post_lock_switch();
#endif
if (active_mm != mm) if (active_mm != mm)
mmdrop(active_mm); mmdrop(active_mm);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment