From patchwork Tue Nov 5 02:34:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: caiyinyu X-Patchwork-Id: 100272 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 614073858027 for ; Tue, 5 Nov 2024 02:37:22 +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 CC5CD3858027 for ; Tue, 5 Nov 2024 02:35:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org CC5CD3858027 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 CC5CD3858027 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=1730774136; cv=none; b=rE+Yx3EZYhU8LmD5KdMY6xG7GeHiI2nFHo0gB9dmR2fbrlqssllILvCyXPNphisJXu7jMEZ0miI5ojpUJ5RW97iAtRZ7Pgsnaqi9wlvr4vKug3QxATjWhMJpXFLvI+TjtH13A1i1bIhwbwPiQgFJo874oN4IbsIxvpq019ggKLA= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1730774136; c=relaxed/simple; bh=Cq0moAXPnlpbRGJ3ZpCrHCkORyatTIbg/8bdsmf08yI=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=rUlg4RxmRdOALGKyjIoZ+STI7m7woR5R6o4o/TJtVIX7OHRuqiCnlBH7CHjgaXgnGvNpjM8oBnI86LpkQIs1XIiqmoTRVl8+ybU9JwFFIPVCLqgdKrnHJS1+AXo91QhFqG3vFYKSUm2mst+EoooS72Tw9/pNRmnD0IDQbS4gRNA= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from loongson.cn (unknown [10.40.65.51]) by gateway (Coremail) with SMTP id _____8AxbeJkhClnAXswAA--.31669S3; Tue, 05 Nov 2024 10:35:16 +0800 (CST) Received: from localhost.localdomain (unknown [10.40.65.51]) by front1 (Coremail) with SMTP id qMiowMBxuOJjhCln7xFBAA--.33222S4; Tue, 05 Nov 2024 10:35:16 +0800 (CST) From: caiyinyu To: libc-alpha@sourceware.org Cc: mjeanson@efficios.com, xry111@xry111.site, arjun@redhat.com, caiyinyu Subject: [PATCH] nptl: fix __builtin_thread_pointer detection on LoongArch Date: Tue, 5 Nov 2024 10:34:07 +0800 Message-ID: <20241105023406.1415969-2-caiyinyu@loongson.cn> X-Mailer: git-send-email 2.45.2 MIME-Version: 1.0 X-CM-TRANSID: qMiowMBxuOJjhCln7xFBAA--.33222S4 X-CM-SenderInfo: 5fdl5xhq1xqz5rrqw2lrqou0/ X-Coremail-Antispam: 1Uk129KBj9xXoWruF1kWw4DKw1kXw4rAFW7WrX_yoWkJrb_Wa yfAr4DWF93Jw47Jw4jyas5Jw18ZFn3Aw1fXF95tr42grn5WrW5XF47Zw4rAr1aqF43trn8 JFyqy3yrZ34jkosvyTuYvTs0mTUanT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUj1kv1TuYvT s0mT0YCTnIWjqI5I8CrVACY4xI64kE6c02F40Ex7xfYxn0WfASr-VFAUDa7-sFnT9fnUUI cSsGvfJTRUUUb78YFVCjjxCrM7AC8VAFwI0_Jr0_Gr1l1xkIjI8I6I8E6xAIw20EY4v20x vaj40_Wr0E3s1l1IIY67AEw4v_Jrv_JF1l8cAvFVAK0II2c7xJM28CjxkF64kEwVA0rcxS w2x7M28EF7xvwVC0I7IYx2IY67AKxVWUCVW8JwA2z4x0Y4vE2Ix0cI8IcVCY1x0267AKxV W8JVWxJwA2z4x0Y4vEx4A2jsIE14v26r4j6F4UM28EF7xvwVC2z280aVCY1x0267AKxVW8 JVW8Jr1le2I262IYc4CY6c8Ij28IcVAaY2xG8wAqjxCEc2xF0cIa020Ex4CE44I27wAqx4 xG64xvF2IEw4CE5I8CrVC2j2WlYx0E2Ix0cI8IcVAFwI0_JrI_JrylYx0Ex4A2jsIE14v2 6r1j6r4UMcvjeVCFs4IE7xkEbVWUJVW8JwACjcxG0xvY0x0EwIxGrwCF04k20xvY0x0EwI xGrwCFx2IqxVCFs4IE7xkEbVWUJVW8JwC20s026c02F40E14v26r1j6r18MI8I3I0E7480 Y4vE14v26r106r1rMI8E67AF67kF1VAFwI0_JF0_Jw1lIxkGc2Ij64vIr41lIxAIcVC0I7 IYx2IY67AKxVWUJVWUCwCI42IY6xIIjxv20xvEc7CjxVAFwI0_Jr0_Gr1lIxAIcVCF04k2 6cxKx2IYs7xG6r1j6r1xMIIF0xvEx4A2jsIE14v26r1j6r4UMIIF0xvEx4A2jsIEc7CjxV AFwI0_Jr0_GrUvcSsGvfC2KfnxnUUI43ZEXa7IU8j-e5UUUUU== X-Spam-Status: No, score=-12.7 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, 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 is version 3 disscussed in https://sourceware.org/pipermail/libc-alpha/2024-November/161236.html v2: https://sourceware.org/pipermail/libc-alpha/2024-November/161213.html v1: https://sourceware.org/pipermail/libc-alpha/2024-November/161185.html --- sysdeps/loongarch/nptl/thread_pointer.h | 6 ------ 1 file changed, 6 deletions(-) diff --git a/sysdeps/loongarch/nptl/thread_pointer.h b/sysdeps/loongarch/nptl/thread_pointer.h index 5dec2ef4c6..3c5367af24 100644 --- a/sysdeps/loongarch/nptl/thread_pointer.h +++ b/sysdeps/loongarch/nptl/thread_pointer.h @@ -19,18 +19,12 @@ #ifndef _SYS_THREAD_POINTER_H #define _SYS_THREAD_POINTER_H -#include - static inline void * __thread_pointer (void) { -#if __glibc_has_builtin (__builtin_thread_pointer) - return __builtin_thread_pointer (); -#else void *__thread_register; __asm__ ("move %0, $tp" : "=r" (__thread_register)); return __thread_register; -#endif } #endif /* _SYS_THREAD_POINTER_H */