From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1944) id CF9723857355; Fri, 5 Aug 2022 19:34:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CF9723857355 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: 63bee6f1550d7b8a2a270d644c5f8514adcf5b29 X-Git-Newrev: 01faa1bcd44274b672ab75f13fd7282c9ce9656d Message-Id: <20220805193459.CF9723857355@sourceware.org> Date: Fri, 5 Aug 2022 19:34:59 +0000 (GMT) X-BeenThere: glibc-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Glibc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Aug 2022 19:34:59 -0000 https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=01faa1bcd44274b672ab75f13fd7282c9ce9656d commit 01faa1bcd44274b672ab75f13fd7282c9ce9656d 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