Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8fcd6c45 authored by Nicolas Pitre's avatar Nicolas Pitre
Browse files

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: default avatarNicolas Pitre <nico@linaro.org>
Acked-by: default avatarMickael GUENE <mickael.guene@st.com>
Tested-by: default avatarVincent Abriou <vincent.abriou@st.com>
Tested-by: default avatarAndras Szemzo <szemzo.andras@gmail.com>
parent 569dbb88
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -35,5 +35,6 @@
#define __ARM_NR_usr26			(__ARM_NR_BASE+3)
#define __ARM_NR_usr32			(__ARM_NR_BASE+4)
#define __ARM_NR_set_tls		(__ARM_NR_BASE+5)
#define __ARM_NR_get_tls		(__ARM_NR_BASE+6)

#endif /* _UAPI__ASM_ARM_UNISTD_H */
+3 −0
Original line number Diff line number Diff line
@@ -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