From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1944) id E354D3846433; Wed, 26 Oct 2022 15:17:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E354D3846433 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1666797455; bh=qOY8k5bOilKTK0g9E/XNgXZ7yjG3DMUxkmH+X0xmM/o=; h=From:To:Subject:Date:From; b=AY3TWfUFhUbNcFvLQGUoMY3/gP9W5N3R/zW7c78N8+wUb3xJVaW0oVSkU/e0965Eu O+D5OKg/IRNhBOufrVq+1MRHCOHJILkYBM5eD7gSfLE+F9YDmmO3xFLLQbC3YV/jO+ yWgKCp25O05xxI1hv7SpL/u/MgCXzbmmCasq/QWY= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Szabolcs Nagy To: glibc-cvs@sourceware.org Subject: [glibc/arm/morello/main] aarch64: morello: nptl: fix thread pointer setup X-Act-Checkin: glibc X-Git-Author: Szabolcs Nagy X-Git-Refname: refs/heads/arm/morello/main X-Git-Oldrev: c7b27043ec55a11224568a6e240d307ac0355cf4 X-Git-Newrev: bc25c2538274bcd4b507148d2851ce2271bb83d9 Message-Id: <20221026151735.E354D3846433@sourceware.org> Date: Wed, 26 Oct 2022 15:17:32 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=bc25c2538274bcd4b507148d2851ce2271bb83d9 commit bc25c2538274bcd4b507148d2851ce2271bb83d9 Author: Szabolcs Nagy Date: Wed Jul 13 12:15:16 2022 +0100 aarch64: morello: nptl: fix thread pointer setup Diff: --- sysdeps/aarch64/nptl/tls.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sysdeps/aarch64/nptl/tls.h b/sysdeps/aarch64/nptl/tls.h index 8d62b31e23..92eb5a3b51 100644 --- a/sysdeps/aarch64/nptl/tls.h +++ b/sysdeps/aarch64/nptl/tls.h @@ -71,8 +71,13 @@ typedef struct /* Code to initially initialize the thread pointer. This might need special attention since 'errno' is not yet available and if the operation can cause a failure 'errno' must not be touched. */ +# ifdef __CHERI_PURE_CAPABILITY__ +# define TLS_INIT_TP(tcbp) \ + ({ __asm __volatile ("msr ctpidr_el0, %0" : : "r" (tcbp)); NULL; }) +# else # define TLS_INIT_TP(tcbp) \ ({ __asm __volatile ("msr tpidr_el0, %0" : : "r" (tcbp)); NULL; }) +# endif /* Value passed to 'clone' for initialization of the thread register. */ # define TLS_DEFINE_INIT_TP(tp, pd) void *tp = (pd) + 1