From patchwork Mon Aug 5 20:48:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Jeanson X-Patchwork-Id: 1969208 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=efficios.com header.i=@efficios.com header.a=rsa-sha256 header.s=smtpout1 header.b=eSSlhU7+; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=libc-alpha-bounces~incoming=patchwork.ozlabs.org@sourceware.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Wd7rz065Qz1ybS for ; Tue, 6 Aug 2024 06:51:31 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id D3905385DDDF for ; Mon, 5 Aug 2024 20:51:28 +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 9C366385842D for ; Mon, 5 Aug 2024 20:49:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9C366385842D 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 9C366385842D 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=e+etfkhQDv3l0Q++j01Ab162J5/loJmJbSTcmTEU6/Up+kzV5wSuOyVnq8zSnU94sjtB+oqNu7Xy/5+O4Kd4OUeUJtat5ZkZMtVyRqZmTKrVqFLYZzY0Gpa9o/Cl3fahN7APmpmzlnGQUvQwj31UNTYh8CdH38uV3ShsgQo5DHw= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1722890949; c=relaxed/simple; bh=TDFKqTgFbj1GBQtXdzgWclwbh5GrSaEX0I+TlIayXSA=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=oO5KnYQbcTZHbNmb7mxVtgmAGCLbtr5sqJZX0WR0y237FjO1yHweMenj+StrxKtr4St6zUhBC3iJ8WlYT25uWalXnKAxfQ8XyNq38mLtdBkaU5/pW8VSQ8iBhJnd22A6s+MnDbUV49jnmpOkV71wNqmbCOgVgOyA9ujYb4RHKH8= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=efficios.com; s=smtpout1; t=1722890946; bh=TDFKqTgFbj1GBQtXdzgWclwbh5GrSaEX0I+TlIayXSA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eSSlhU7+5OWxMKvnv2FG9cP3YrYOkhpzlyj73Yfb6FU25WSWIi/tpicyIxEr6ixz2 SptZmwzZYLGOvNWIhrSVTukO+dEGI5DVcovsxHTm6hJ1PAU40cv5TqiwAuORwlMyTO nYA6klNKWY9bxFThRzHoeIp0dhwWalsLk/eY9xnT2mWKpdiDEaFzDhFLPeljxq1I5P IuXe+qQA/PDkpkPqMiyTznXrvFdjZdLzj7LopY/DCvQ2w05UDdgdU+SnhbzUuGRD5T 439KWKbrXq67UPStQo22fXw7+KcbieuC7g5/XUzDjKAZKiXy01iL/+AYBZlXH6ANPS DP2aEe3Cu9xBg== 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 4Wd7pB1lLYz1GYF; Mon, 5 Aug 2024 16:49:06 -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 09/17] nptl: Add for nios2 Date: Mon, 5 Aug 2024 16:48:31 -0400 Message-Id: <20240801-rseq-abi-v11-split-v12-9-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=-11.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_NUMSUBJECT, 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~incoming=patchwork.ozlabs.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/nios2/nptl/thread_pointer.h | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/sysdeps/nios2/nptl/thread_pointer.h b/sysdeps/nios2/nptl/thread_pointer.h new file mode 100644 index 0000000000..0cd6fe2295 --- /dev/null +++ b/sysdeps/nios2/nptl/thread_pointer.h @@ -0,0 +1,30 @@ +/* __thread_pointer definition. nios2 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 ("r23"); + +static inline void * +__thread_pointer (void) +{ + return __thread_register; +} + +#endif /* _SYS_THREAD_POINTER_H */