diff options
author | Chris Zankel <chris@zankel.net> | 2013-02-23 19:35:57 -0800 |
---|---|---|
committer | Chris Zankel <chris@zankel.net> | 2013-02-23 19:35:57 -0800 |
commit | c50842df47970eab459f13490c152aac85fc02f2 (patch) | |
tree | d2933b4d9641067002ba6d662b0abf6ee3011375 /arch/xtensa/kernel/ptrace.c | |
parent | b0c438e642699f8c47b84de957f30cf586cdbebd (diff) | |
download | op-kernel-dev-c50842df47970eab459f13490c152aac85fc02f2.zip op-kernel-dev-c50842df47970eab459f13490c152aac85fc02f2.tar.gz |
xtensa: add support for TLS
The Xtensa architecture provides a global register called THREADPTR
for the purpose of Thread Local Storage (TLS) support. This allows us
to use a fairly simple implementation, keeping the thread pointer in
the regset and simply saving and restoring it upon entering/exiting
the from user space.
Signed-off-by: Chris Zankel <chris@zankel.net>
Diffstat (limited to 'arch/xtensa/kernel/ptrace.c')
-rw-r--r-- | arch/xtensa/kernel/ptrace.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/xtensa/kernel/ptrace.c b/arch/xtensa/kernel/ptrace.c index a8b0d57..562fac6 100644 --- a/arch/xtensa/kernel/ptrace.c +++ b/arch/xtensa/kernel/ptrace.c @@ -66,6 +66,7 @@ int ptrace_getregs(struct task_struct *child, void __user *uregs) __put_user(regs->lcount, &gregset->lcount); __put_user(regs->windowstart, &gregset->windowstart); __put_user(regs->windowbase, &gregset->windowbase); + __put_user(regs->threadptr, &gregset->threadptr); for (i = 0; i < XCHAL_NUM_AREGS; i++) __put_user(regs->areg[i], @@ -92,6 +93,7 @@ int ptrace_setregs(struct task_struct *child, void __user *uregs) __get_user(regs->lcount, &gregset->lcount); __get_user(ws, &gregset->windowstart); __get_user(wb, &gregset->windowbase); + __get_user(regs->threadptr, &gregset->threadptr); regs->ps = (regs->ps & ~ps_mask) | (ps & ps_mask) | (1 << PS_EXCM_BIT); |