blob: 3a621e0d39253aa30a7d5eadb523cd4a2e1315cb [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001// SPDX-License-Identifier: GPL-2.0
Al Viro37185b32012-10-08 03:27:32 +01002#include <linux/sched.h>
Richard Weinbergerda028d52015-06-25 22:44:11 +02003#include <asm/ptrace-abi.h>
Paolo 'Blaisorblade' Giarrussoaa6758d2006-03-31 02:30:22 -08004
Paolo 'Blaisorblade' Giarrussoaa6758d2006-03-31 02:30:22 -08005void clear_flushed_tls(struct task_struct *task)
6{
7}
8
9int arch_copy_tls(struct task_struct *t)
10{
Jeff Dikef3555592007-02-10 01:44:29 -080011 /*
12 * If CLONE_SETTLS is set, we need to save the thread id
13 * (which is argument 5, child_tid, of clone) so it can be set
14 * during context switches.
15 */
Jeff Dike18baddd2007-10-16 01:27:07 -070016 t->thread.arch.fs = t->thread.regs.regs.gp[R8 / sizeof(long)];
Jeff Dikef3555592007-02-10 01:44:29 -080017
Jeff Dikeba180fd2007-10-16 01:27:00 -070018 return 0;
Paolo 'Blaisorblade' Giarrussoaa6758d2006-03-31 02:30:22 -080019}