diff options
author | Nicolas Pitre <nicolas.pitre@linaro.org> | 2017-07-28 15:35:35 -0400 |
---|---|---|
committer | Nicolas Pitre <nicolas.pitre@linaro.org> | 2017-09-10 19:31:46 -0400 |
commit | 8fcd6c45f5a65621ec809b7866a3623e9a01d4ed (patch) | |
tree | 2e6eea80b386c293d20e5bb813b8b70bff78baf1 /arch/arm/kernel | |
parent | 569dbb88e80deb68974ef6fdd6a13edb9d686261 (diff) | |
download | linux-stable-8fcd6c45f5a65621ec809b7866a3623e9a01d4ed.tar.gz linux-stable-8fcd6c45f5a65621ec809b7866a3623e9a01d4ed.tar.bz2 linux-stable-8fcd6c45f5a65621ec809b7866a3623e9a01d4ed.zip |
ARM: implement get_tls syscall
When there is no dedicated register to hold the tp value and no MMU
to provide a fixed address kuser helper entry point, all that is
left as fallback is a syscall.
Signed-off-by: Nicolas Pitre <nico@linaro.org>
Acked-by: Mickael GUENE <mickael.guene@st.com>
Tested-by: Vincent Abriou <vincent.abriou@st.com>
Tested-by: Andras Szemzo <szemzo.andras@gmail.com>
Diffstat (limited to 'arch/arm/kernel')
-rw-r--r-- | arch/arm/kernel/traps.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c index 948c648fea00..43c0560f7b2d 100644 --- a/arch/arm/kernel/traps.c +++ b/arch/arm/kernel/traps.c @@ -647,6 +647,9 @@ asmlinkage int arm_syscall(int no, struct pt_regs *regs) set_tls(regs->ARM_r0); return 0; + case NR(get_tls): + return current_thread_info()->tp_value[0]; + default: /* Calls 9f00xx..9f07ff are defined to return -ENOSYS if not implemented, rather than raising SIGILL. This |