summaryrefslogtreecommitdiffstats
path: root/include/asm-um/processor-x86_64.h
diff options
context:
space:
mode:
authorJeff Dike <jdike@addtoit.com>2007-02-10 01:44:29 -0800
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-11 10:51:24 -0800
commitf355559cf78455ed6be103b020e4b800230c64eb (patch)
tree0de116766d38975f75178e299031d55967eaa9d7 /include/asm-um/processor-x86_64.h
parent3a150e1da8bc4e840d5a09fc089052011b5b6503 (diff)
downloadop-kernel-dev-f355559cf78455ed6be103b020e4b800230c64eb.zip
op-kernel-dev-f355559cf78455ed6be103b020e4b800230c64eb.tar.gz
[PATCH] uml: x86_64 thread fixes
x86_64 needs some TLS fixes. What was missing was remembering the child thread id during clone and stuffing it into the child during each context switch. The %fs value is stored separately in the thread structure since the host controls what effect it has on the actual register file. The host also needs to store it in its own thread struct, so we need the value kept outside the register file. arch_prctl_skas was fixed to call PTRACE_ARCH_PRCTL appropriately. There is some saving and restoring of registers in the ARCH_SET_* cases so that the correct set of registers are changed on the host and restored to the process when it runs again. Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/asm-um/processor-x86_64.h')
-rw-r--r--include/asm-um/processor-x86_64.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/asm-um/processor-x86_64.h b/include/asm-um/processor-x86_64.h
index 10609af..31c2d4d 100644
--- a/include/asm-um/processor-x86_64.h
+++ b/include/asm-um/processor-x86_64.h
@@ -13,6 +13,7 @@
struct arch_thread {
unsigned long debugregs[8];
int debugregs_seq;
+ unsigned long fs;
struct faultinfo faultinfo;
};
@@ -25,8 +26,9 @@ extern inline void rep_nop(void)
#define cpu_relax() rep_nop()
#define INIT_ARCH_THREAD { .debugregs = { [ 0 ... 7 ] = 0 }, \
- .debugregs_seq = 0, \
- .faultinfo = { 0, 0, 0 } }
+ .debugregs_seq = 0, \
+ .fs = 0, \
+ .faultinfo = { 0, 0, 0 } }
static inline void arch_flush_thread(struct arch_thread *thread)
{
OpenPOWER on IntegriCloud