s390/runtime instrumentation: simplify task exit handling

Free data structures required for runtime instrumentation from
arch_release_task_struct(). This allows to simplify the code a bit,
and also makes the semantics a bit easier: arch_release_task_struct()
is never called from the task that is being removed.

In addition this allows to get rid of exit_thread() in a later patch.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
This commit is contained in:
Heiko Carstens
2017-09-11 11:24:22 +02:00
committed by Martin Schwidefsky
parent d6e646ad7c
commit 8d9047f8b9
3 changed files with 20 additions and 19 deletions

View File

@@ -48,10 +48,8 @@ extern void kernel_thread_starter(void);
*/
void exit_thread(struct task_struct *tsk)
{
if (tsk == current) {
exit_thread_runtime_instr();
if (tsk == current)
exit_thread_gs();
}
}
void flush_thread(void)
@@ -60,6 +58,7 @@ void flush_thread(void)
void arch_release_task_struct(struct task_struct *tsk)
{
runtime_instr_release(tsk);
}
int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src)