From patchwork Thu Oct 31 02:29:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: caiyinyu X-Patchwork-Id: 2004450 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org 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 4Xf7KZ0yjHz1xwF for ; Thu, 31 Oct 2024 13:31:29 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A6EDB3858CD9 for ; Thu, 31 Oct 2024 02:31:27 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail.loongson.cn (mail.loongson.cn [114.242.206.163]) by sourceware.org (Postfix) with ESMTP id C5DFB3858D33 for ; Thu, 31 Oct 2024 02:31:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C5DFB3858D33 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=loongson.cn Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=loongson.cn ARC-Filter: OpenARC Filter v1.0.0 sourceware.org C5DFB3858D33 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=114.242.206.163 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1730341869; cv=none; b=UIiyegWFSHesmOCx36S5Oqr1zWkH6uZJ0AfvlWByJfukBpsO2Mc8LMA6eO+2lte9dXW8frHyDtqVYwF8ZptmpLCcqKHcoJWHcK1bsDSPLlt8SR57fTvbseSxjFOqKuz6KiiR3CA2YBuAHLmYHGdjfI0dinD2++EMeGn3wd9Afpc= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1730341869; c=relaxed/simple; bh=ldK4OvUycvKGkrtG7JJg1Lk5GrJIsJ+/suufZzJyQdY=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=a3XnfjGab/8tpiSXFIE5rpQRiuvU3KHcM6oCScVELXwSPaFiTgjCYikkm3LhMTrcGjE5SylGqJvokhYBAkpmdVarijDGn2yzED7+yOKzDfQUicUHTfXbGHkep9rlOYmZjQ1bVSO1yaT33R2/nebzxLnmA9LIgCo4lSLEsf+Rscw= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from loongson.cn (unknown [10.40.65.51]) by gateway (Coremail) with SMTP id _____8AxUa_k6yJnjwwgAA--.476S3; Thu, 31 Oct 2024 10:31:00 +0800 (CST) Received: from localhost.localdomain (unknown [10.40.65.51]) by front1 (Coremail) with SMTP id qMiowMAxVcDh6yJnEgAsAA--.28022S4; Thu, 31 Oct 2024 10:30:57 +0800 (CST) From: caiyinyu To: libc-alpha@sourceware.org Cc: mjeanson@efficios.com, arjun@redhat.com, caiyinyu Subject: [PATCH] nptl: Add for LoongArch Date: Thu, 31 Oct 2024 10:29:49 +0800 Message-ID: <20241031022948.757019-2-caiyinyu@loongson.cn> X-Mailer: git-send-email 2.45.2 MIME-Version: 1.0 X-CM-TRANSID: qMiowMAxVcDh6yJnEgAsAA--.28022S4 X-CM-SenderInfo: 5fdl5xhq1xqz5rrqw2lrqou0/ X-Coremail-Antispam: 1Uk129KBj93XoW7AFWkJFWUuFyDAFyxAFyUXFc_yoW8ZF47pF W5Cr15CF4kXrnrGryfW3W7u3WrCFWrZFn8KF1ak3yxAw4UJr92q3ZFyr93Ga43A3yS9F40 vF15Z3WDGFy8A3gCm3ZEXasCq-sJn29KB7ZKAUJUUUU8529EdanIXcx71UUUUU7KY7ZEXa sCq-sGcSsGvfJ3Ic02F40EFcxC0VAKzVAqx4xG6I80ebIjqfuFe4nvWSU5nxnvy29KBjDU 0xBIdaVrnRJUUUkYb4IE77IF4wAFF20E14v26r1j6r4UM7CY07I20VC2zVCF04k26cxKx2 IYs7xG6rWj6s0DM7CIcVAFz4kK6r106r15M28lY4IEw2IIxxk0rwA2F7IY1VAKz4vEj48v e4kI8wA2z4x0Y4vE2Ix0cI8IcVAFwI0_JFI_Gr1l84ACjcxK6xIIjxv20xvEc7CjxVAFwI 0_Gr0_Cr1l84ACjcxK6I8E87Iv67AKxVWxJVW8Jr1l84ACjcxK6I8E87Iv6xkF7I0E14v2 6r4UJVWxJr1le2I262IYc4CY6c8Ij28IcVAaY2xG8wAqjxCEc2xF0cIa020Ex4CE44I27w Aqx4xG64xvF2IEw4CE5I8CrVC2j2WlYx0E2Ix0cI8IcVAFwI0_JrI_JrylYx0Ex4A2jsIE 14v26r1j6r4UMcvjeVCFs4IE7xkEbVWUJVW8JwACjcxG0xvY0x0EwIxGrwCF04k20xvY0x 0EwIxGrwCFx2IqxVCFs4IE7xkEbVWUJVW8JwC20s026c02F40E14v26r1j6r18MI8I3I0E 7480Y4vE14v26r106r1rMI8E67AF67kF1VAFwI0_JF0_Jw1lIxkGc2Ij64vIr41lIxAIcV C0I7IYx2IY67AKxVWUJVWUCwCI42IY6xIIjxv20xvEc7CjxVAFwI0_Jr0_Gr1lIxAIcVCF 04k26cxKx2IYs7xG6r1j6r1xMIIF0xvEx4A2jsIE14v26r1j6r4UMIIF0xvEx4A2jsIEc7 CjxVAFwI0_Jr0_GrUvcSsGvfC2KfnxnUUI43ZEXa7IU1EksDUUUUU== 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 [PATCH] LoongArch: Add RSEQ_SIG in rseq.h. Reviewed-by: Xi Ruoyao --- sysdeps/unix/sysv/linux/loongarch/bits/rseq.h | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/loongarch/bits/rseq.h diff --git a/sysdeps/unix/sysv/linux/loongarch/bits/rseq.h b/sysdeps/unix/sysv/linux/loongarch/bits/rseq.h new file mode 100644 index 0000000000..7468a05243 --- /dev/null +++ b/sysdeps/unix/sysv/linux/loongarch/bits/rseq.h @@ -0,0 +1,36 @@ +/* Restartable Sequences Linux LoongArch architecture header. + Copyright (C) 2024 Free Software Foundation, Inc. + + 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_RSEQ_H +# error "Never use directly; include instead." +#endif + +/* RSEQ_SIG is a signature required before each abort handler code. + + It is a 32-bit value that maps to actual architecture code compiled + into applications and libraries. It needs to be defined for each + architecture. When choosing this value, it needs to be taken into + account that generating invalid instructions may have ill effects on + tools like objdump, and may also have impact on the CPU speculative + execution efficiency in some cases. + + RSEQ_SIG uses the following break instruction: + + 0x002a0010 break 0x10 +*/ + +#define RSEQ_SIG 0x002a0010