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