From patchwork Mon Aug 5 20:48:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Jeanson X-Patchwork-Id: 95327 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 336FC385EC49 for ; Mon, 5 Aug 2024 20:51:10 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from smtpout.efficios.com (smtpout.efficios.com [IPv6:2607:5300:203:b2ee::31e5]) by sourceware.org (Postfix) with ESMTPS id 9CD66385DDE4 for ; Mon, 5 Aug 2024 20:49:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9CD66385DDE4 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=efficios.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=efficios.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 9CD66385DDE4 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:5300:203:b2ee::31e5 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1722890949; cv=none; b=sghUb2dLoCt0cXbZhbOQex6eXR3cND/pdOfAFHI+oNywU+F/ChsPlGGgsV2yGhsqMAkd+qZuEslOtmbVovLl26OImVJLpgvTL7v+f6ISAc+1heWwaSfLj9wS9jKu4h9MMFEv8AJJpQvi68KJ14pqe7Wgwzkmbmy+ym3z21cY7uE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1722890949; c=relaxed/simple; bh=g8QI7f+Y2Sls9rafvl8j9etaPS7E9D014KGx7tk84CE=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=LOFs34WPuFMIpGP+wVS7JXG3lXbGmsbWrM0S0Xn/WPwYgwhg9QiAhVnJwP9kik7i+0gbt7TL4TeP72+5dixGnm5ElB1S8V3+P4e0mkLHeeWhoEXO/zKEFdiWyKFfNbDa3jpenenIWoju/vmzqmuMSgwWMTbbhQlIt9mcJl5+7zU= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=efficios.com; s=smtpout1; t=1722890945; bh=g8QI7f+Y2Sls9rafvl8j9etaPS7E9D014KGx7tk84CE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ca1kmq3Dc85fVcZovanLZ2tBOfhXVc3ToVFktcFUDnbJvmn9uyawi7RkqUCQUvRvs t+Zk6g7IKoCsMocgTbE9rcZ/iByP258+FCBVzVpuT9MgXCoi/JUtHh3Ok0ynjVI1HD rafsgCtN16B9p+Kc8OBNnme8yv4JmvVtCWLDuzbODdQOyTIIVk8Ufi+Ks/PV1m2esn VbvoGl1XajSpP5zvREmvy8LGmVZfMenn5nAibijGr3LXPzFAT8Yed28Ujyp/7blaqI TKIShvqDnkQSflMYF7ZIkJ5X5AggAzuJH8zoWETgw+NqB1spmm1QNvVhxFxehABunp OfW43pPI4x7Pw== Received: from mj-deb12-aarch64-glibc.internal.efficios.com (192-222-143-198.qc.cable.ebox.net [192.222.143.198]) by smtpout.efficios.com (Postfix) with ESMTPSA id 4Wd7p91twQz1Fy8; Mon, 5 Aug 2024 16:49:05 -0400 (EDT) From: Michael Jeanson To: libc-alpha@sourceware.org Cc: Michael Jeanson , Florian Weimer , Carlos O'Donell , DJ Delorie , Mathieu Desnoyers Subject: [PATCH v12 08/17] nptl: Add for or1k Date: Mon, 5 Aug 2024 16:48:30 -0400 Message-Id: <20240801-rseq-abi-v11-split-v12-8-0e87479dddc0@efficios.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240801-rseq-abi-v11-split-v12-0-0e87479dddc0@efficios.com> References: <20240801-rseq-abi-v11-split-v12-0-0e87479dddc0@efficios.com> MIME-Version: 1.0 X-Spam-Status: No, score=-12.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~patchwork=sourceware.org@sourceware.org This will be required by the rseq extensible ABI implementation on all Linux architectures exposing the __rseq_size and __rseq_offset symbols to set the 'cpu_id' field so applications can test if rseq is registered. Signed-off-by: Michael Jeanson --- sysdeps/or1k/nptl/thread_pointer.h | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/sysdeps/or1k/nptl/thread_pointer.h b/sysdeps/or1k/nptl/thread_pointer.h new file mode 100644 index 0000000000..a323fe079b --- /dev/null +++ b/sysdeps/or1k/nptl/thread_pointer.h @@ -0,0 +1,30 @@ +/* __thread_pointer definition. or1k version. + Copyright (C) 2021-2024 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library. If not, see + . */ + +#ifndef _SYS_THREAD_POINTER_H +#define _SYS_THREAD_POINTER_H + +register void *__thread_register asm ("r10"); + +static inline void * +__thread_pointer (void) +{ + return __thread_register; +} + +#endif /* _SYS_THREAD_POINTER_H */