[CRIU] [PATCH 2/8] cr: generalize the type to store the value of the TLS register
Christopher Covington
cov at codeaurora.org
Mon Mar 10 07:33:02 PDT 2014
On 03/10/2014 04:51 AM, Alexander Kartashov wrote:
> Supported machine architectures provide TLS stogares of different sizes:
> the size of the TLS storage in x86-64 is 24 bytes, ARM --- 4 bytes
> and upcoming AArch64 --- 8 bytes. This means every supported architecture
> needs a specific type to store the value of the TLS register.
>
> This patch reworks the insterface of the routines arch_get_tls()
> and restore_tls() passing them the TLS storage by pointer
> rather than by value to simplify the TLS stub for x86.
>
> Signed-off-by: Alexander Kartashov <alekskartashov at parallels.com>
> diff --git a/arch/x86/include/asm/restorer.h b/arch/x86/include/asm/restorer.h
> index 4cc510c..5512155 100644
> --- a/arch/x86/include/asm/restorer.h
> +++ b/arch/x86/include/asm/restorer.h
> @@ -143,6 +143,6 @@ int restore_nonsigframe_gpregs(UserX86RegsEntry *r);
>
> int sigreturn_prep_fpu_frame(struct rt_sigframe *sigframe, fpu_state_t *fpu_state);
>
> -static inline void restore_tls(u32 tls) { }
> +static inline void restore_tls(tls_t *ptls) { (void)ptls; }
Is all of this just to provide a stub that doesn't generate compiler warnings?
(Could the abstraction be simplified so this isn't needed?) Not a big deal though.
Reviewed-by: Christopher Covington <cov at codeaurora.org>
--
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by the Linux Foundation.
More information about the CRIU
mailing list