xref: /OK3568_Linux_fs/kernel/arch/x86/um/tls_64.c (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun // SPDX-License-Identifier: GPL-2.0
2*4882a593Smuzhiyun #include <linux/sched.h>
3*4882a593Smuzhiyun #include <asm/ptrace-abi.h>
4*4882a593Smuzhiyun 
clear_flushed_tls(struct task_struct * task)5*4882a593Smuzhiyun void clear_flushed_tls(struct task_struct *task)
6*4882a593Smuzhiyun {
7*4882a593Smuzhiyun }
8*4882a593Smuzhiyun 
arch_set_tls(struct task_struct * t,unsigned long tls)9*4882a593Smuzhiyun int arch_set_tls(struct task_struct *t, unsigned long tls)
10*4882a593Smuzhiyun {
11*4882a593Smuzhiyun 	/*
12*4882a593Smuzhiyun 	 * If CLONE_SETTLS is set, we need to save the thread id
13*4882a593Smuzhiyun 	 * so it can be set during context switches.
14*4882a593Smuzhiyun 	 */
15*4882a593Smuzhiyun 	t->thread.arch.fs = tls;
16*4882a593Smuzhiyun 
17*4882a593Smuzhiyun 	return 0;
18*4882a593Smuzhiyun }
19