From patchwork Tue Jun 30 05:54:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vincent Chen X-Patchwork-Id: 39834 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 18D2F385ED4C; Tue, 30 Jun 2020 05:54:26 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pj1-x102f.google.com (mail-pj1-x102f.google.com [IPv6:2607:f8b0:4864:20::102f]) by sourceware.org (Postfix) with ESMTPS id E1DD13858D38 for ; Tue, 30 Jun 2020 05:54:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org E1DD13858D38 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=sifive.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=vincent.chen@sifive.com Received: by mail-pj1-x102f.google.com with SMTP id i4so9022893pjd.0 for ; Mon, 29 Jun 2020 22:54:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; h=from:to:cc:subject:date:message-id; bh=/2E/FMty7gv4SYmuAs87fXJsNnmOBeNwLedMdtA/YtQ=; b=VOIjlCGcQFD2VtXxxjaxI3Fz/8VHy6b8MfrSHK7Lf45CQSF8y+cgupz41DkBEJ881+ v3r/2rYwOozwyWFXhK8ecqPN5WgtUoSHcWjlb52S6xLrona5JhrSEdVgGzsKfOW95pNg 5pyju3t2UzGQIwqpXZmEsBJ4/62WzpguA/xPgGYfiOLvZ7USl0OvIK6o2VRkJMh55ljj gm3ojHEiqpl14n1d61037f89qTP5tt/HQLuVGkeOtnaojkzcNIF2lr/rST66EpXEK+pP 3qoTFuOpYAbQOm2gmOZux1J7RNgAb1vPqRQSN6dC9UywgSKgRGFphZu/I9TavPIGdoqk H8kA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=/2E/FMty7gv4SYmuAs87fXJsNnmOBeNwLedMdtA/YtQ=; b=oi4U5EV2qA5gVX5qR2FZv0O538zvLMGd7p+7kTL2NXfQiFlgB1nxmIIrmST063d52K Zb9m9r1qR6Wr2jAT8ZXozmHGKZlXcIspBZZH7OomN8BhyDTCWwbGtUoTlVPwFRjDmQSL k08fz31SPnzsiiG9qEN8UOgqQ3MY+uznHg1JxUkRo+gRu643x7pco+ChJeW5wCkRtxhr OPppIloHhXG+8nS98JBYqP3PXW3YLomDPjZHkIDlpa0Ilz7d6J0zNnuWWiCuNt58zStc ll8rMFC9jBiz0gNAL4QB5KobvR/5sjddIrvjs6dDaudwW5Z9jnmPI+BtrQuZXGIh6dTA SxOQ== X-Gm-Message-State: AOAM531J8E+CpqLnCXd6xialOXc53BHCHJMcFisv2RAN1b+3MWrKZf3P CJ09/ghY1JAKrk/eTBXlA/kPwUSPx4M= X-Google-Smtp-Source: ABdhPJwP3hBnu3FWmR1W9hGQlDr11RsLVCr4ShMvNjo/gQcIF56dkrD04zc1iiAKUFDkTTiPKIU9pA== X-Received: by 2002:a17:90a:778c:: with SMTP id v12mr20974389pjk.34.1593496461687; Mon, 29 Jun 2020 22:54:21 -0700 (PDT) Received: from VincentChen-ThinkPad-T480s.internal.sifive.com (114-34-229-221.HINET-IP.hinet.net. [114.34.229.221]) by smtp.gmail.com with ESMTPSA id gm11sm1125862pjb.9.2020.06.29.22.54.20 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 29 Jun 2020 22:54:21 -0700 (PDT) From: Vincent Chen To: libc-alpha@sourceware.org, palmer@dabbelt.com Subject: [RFC PATCH] riscv: remove riscv-specific sigcontext.h Date: Tue, 30 Jun 2020 13:54:09 +0800 Message-Id: <1593496449-24439-1-git-send-email-vincent.chen@sifive.com> X-Mailer: git-send-email 2.7.4 X-Spam-Status: No, score=-12.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: vincent.chen@sifive.com Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" Many RISC-V extensions are under development, such as Vector extension, even though RISC-V allows vendors to customize their extension. A new extension may introduce new registers to the contents of the signal context. To align the contents of struct sigcontext between kernel and glibc, the developers need to perform the same modifications twice. This RFC patch attempts to use the Glibc generic sigcontext.h to reduce the modification from two to one. Because The element names of struct sigcontext in these two sigcontext.h are different, this change will cause some backward-incompatible issues. To evaluate the impact, I issued a discussion in the RISC-V software group https://groups.google.com/a/groups.riscv.org/g/sw-dev/c/52cbGQCyy2s. I followed the suggestions to build the OpenEmbedded with this Glibc change, and all utility programs were passed. Therefore, I think that the backward-incompatible issue may not be serious at this moment. If everyone thinks this change is reasonable and feasible, I will discuss with compiler guys to come up with a solution to apply the new sigcontext.h to the GCC stack unwinding. --- sysdeps/unix/sysv/linux/riscv/bits/sigcontext.h | 31 ------------------------- 1 file changed, 31 deletions(-) delete mode 100644 sysdeps/unix/sysv/linux/riscv/bits/sigcontext.h diff --git a/sysdeps/unix/sysv/linux/riscv/bits/sigcontext.h b/sysdeps/unix/sysv/linux/riscv/bits/sigcontext.h deleted file mode 100644 index 4b7c09e..0000000 --- a/sysdeps/unix/sysv/linux/riscv/bits/sigcontext.h +++ /dev/null @@ -1,31 +0,0 @@ -/* Machine-dependent signal context structure for Linux. RISC-V version. - Copyright (C) 1996-2020 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 _BITS_SIGCONTEXT_H -#define _BITS_SIGCONTEXT_H 1 - -#if !defined _SIGNAL_H && !defined _SYS_UCONTEXT_H -# error "Never use directly; include instead." -#endif - -struct sigcontext { - /* gregs[0] holds the program counter. */ - unsigned long int gregs[32]; - unsigned long long int fpregs[66] __attribute__ ((__aligned__ (16))); -}; - -#endif