From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1944) id B62BD3852C59; Wed, 23 Nov 2022 14:46:03 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B62BD3852C59 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1669214763; bh=rjqm4yqlNEoRinOxjTuJF7BdiNpu893ZkpmYPCenrEE=; h=From:To:Subject:Date:From; b=pwgoQe3o3BrIAW6/tHNR28TMCEykzhbPIA24m1YvsDKSKYUCpeIWSrZ9ViafbmWdN V9zrxDfT5e31ngN59+VFOxL2kbDns0WftAwIECb8mwSJLmKuQuuv7Zk4l7+Fq03EQW RQ0icOiBomQnW8bn+Ip4IwcIrMjEKZV7mrhT16E4= 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: 1ffce991bd8c38d39d2acc69ee91436079efef53 X-Git-Newrev: 83cc56b97a1d3802044d15d3dc23605e555d3f66 Message-Id: <20221123144603.B62BD3852C59@sourceware.org> Date: Wed, 23 Nov 2022 14:46:03 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=83cc56b97a1d3802044d15d3dc23605e555d3f66 commit 83cc56b97a1d3802044d15d3dc23605e555d3f66 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