public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Szabolcs Nagy <nsz@sourceware.org>
To: glibc-cvs@sourceware.org
Subject: [glibc/arm/morello/main] aarch64: morello: nptl: fix thread pointer setup
Date: Fri,  5 Aug 2022 19:34:59 +0000 (GMT)	[thread overview]
Message-ID: <20220805193459.CF9723857355@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=01faa1bcd44274b672ab75f13fd7282c9ce9656d

commit 01faa1bcd44274b672ab75f13fd7282c9ce9656d
Author: Szabolcs Nagy <szabolcs.nagy@arm.com>
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


             reply	other threads:[~2022-08-05 19:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-05 19:34 Szabolcs Nagy [this message]
2022-10-26 15:17 Szabolcs Nagy
2022-10-27 13:56 Szabolcs Nagy
2022-11-23 14:46 Szabolcs Nagy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220805193459.CF9723857355@sourceware.org \
    --to=nsz@sourceware.org \
    --cc=glibc-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).