Message ID | 02bea72edffeb116ab4d139d1e14b89d1f58c7ce.1591201405.git.alistair.francis@wdc.com |
---|---|
State | Committed |
Headers |
Return-Path: <libc-alpha-bounces@sourceware.org> 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 2EDA4388C013; Wed, 3 Jun 2020 16:34:20 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2EDA4388C013 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1591202060; bh=mPJD5fW2rn+hsNlfujDEXp4+4UUTtqbFZibaAnNHu3s=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=OsRwfg67FiD87OC9nOE8KqW1M8sI4PeEM236c6q6V25XGKX0UzHmvJFhBMoYswsAP 0x/I32pk7wAERtUgzU3CXUQqdCrC6UCVwo5q2Cm1oyFAwHwBZwtJ2oWxrYP9hyl33q CbMjGBKS6FkWFqIoemE2+i3X8Jq0p8Sin6GpnmHg= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from esa3.hgst.iphmx.com (esa3.hgst.iphmx.com [216.71.153.141]) by sourceware.org (Postfix) with ESMTPS id 8AD0B388B018 for <libc-alpha@sourceware.org>; Wed, 3 Jun 2020 16:34:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 8AD0B388B018 IronPort-SDR: rCAa3RVuQfOTIo7OGtE82EKupiwGElCDt+JagxrM87KSflBJM1dpWQYannzAoqyhU8gyPKceNZ OtidvGVpWmsWlshGnrMLDHubCRYFeC67gdFOx5ICN/I7Z+Z4o3ypRlro7KXDS3O4jeWrSSGMOf fRabKYkd/FzJqUPFYpsb1te3PHxJfn0eB16tJgmjoNopVTQ3mhuXHixD88VLYN+K+2TAJQvVRU C2Xa00UPOwr5PXohUVnDbuv9nwsxtYKkjKIE0CDT1rWDFZrgWgIRtN3JA7qbA3wDoFFHTL31og 8vg= X-IronPort-AV: E=Sophos;i="5.73,468,1583164800"; d="scan'208";a="143452230" Received: from uls-op-cesaip01.wdc.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 04 Jun 2020 00:34:18 +0800 IronPort-SDR: wVgUi++v3VmgmH/68GSGAduOkPqvrjMjijHVqWjWyybuh8UuwRx0j3sdQbtF0lhn8Tjpg9l8AM qJTnPLcrgg/4ssAHg3hJGTPOOOi+GMVJQ= Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep01.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Jun 2020 09:23:55 -0700 IronPort-SDR: 3MRL/lfnnYXX92TZ61Oq+Eqru41FCD1Xujs2txckcgh7bk1/SzvbIUc3Intmj0TmD5Vddu+E5z ClnivtZzLrHQ== WDCIronportException: Internal Received: from cne220230.ad.shared (HELO risc6-mainframe.hgst.com) ([10.86.57.144]) by uls-op-cesaip02.wdc.com with ESMTP; 03 Jun 2020 09:34:17 -0700 To: libc-alpha@sourceware.org Subject: [PATCH v2 03/18] RISC-V: Add support for 32-bit vDSO calls Date: Wed, 3 Jun 2020 09:25:31 -0700 Message-Id: <02bea72edffeb116ab4d139d1e14b89d1f58c7ce.1591201405.git.alistair.francis@wdc.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <cover.1591201405.git.alistair.francis@wdc.com> References: <cover.1591201405.git.alistair.francis@wdc.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-16.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, 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 <libc-alpha.sourceware.org> List-Unsubscribe: <http://sourceware.org/mailman/options/libc-alpha>, <mailto:libc-alpha-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/libc-alpha/> List-Post: <mailto:libc-alpha@sourceware.org> List-Help: <mailto:libc-alpha-request@sourceware.org?subject=help> List-Subscribe: <http://sourceware.org/mailman/listinfo/libc-alpha>, <mailto:libc-alpha-request@sourceware.org?subject=subscribe> From: Alistair Francis via Libc-alpha <libc-alpha@sourceware.org> Reply-To: Alistair Francis <alistair.francis@wdc.com> Cc: alistair.francis@wdc.com Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" <libc-alpha-bounces@sourceware.org> |
Series |
glibc port for 32-bit RISC-V (RV32)
|
|
Commit Message
Alistair Francis
June 3, 2020, 4:25 p.m. UTC
--- sysdeps/unix/sysv/linux/riscv/sysdep.h | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-)
Comments
On Wed, 3 Jun 2020, Alistair Francis via Libc-alpha wrote: > diff --git a/sysdeps/unix/sysv/linux/riscv/sysdep.h b/sysdeps/unix/sysv/linux/riscv/sysdep.h > index aa61e8b04d..9f6ed2001b 100644 > --- a/sysdeps/unix/sysv/linux/riscv/sysdep.h > +++ b/sysdeps/unix/sysv/linux/riscv/sysdep.h > @@ -182,14 +182,21 @@ > > #ifndef __ASSEMBLER__ > > -# define VDSO_NAME "LINUX_4.15" > -# define VDSO_HASH 182943605 > +# if __riscv_xlen == 32 Same note on __riscv_xlen vs __WORDSIZE as with 02/18. Also given it is a two-way conditional we can choose which leg is first and I'd make that the RV64 variant, as the first to be there and more developed, as evident here. > /* List of system calls which are supported as vsyscalls. */ > -# define HAVE_CLOCK_GETRES64_VSYSCALL "__vdso_clock_getres" > -# define HAVE_CLOCK_GETTIME64_VSYSCALL "__vdso_clock_gettime" > -# define HAVE_GETTIMEOFDAY_VSYSCALL "__vdso_gettimeofday" > -# define HAVE_GETCPU_VSYSCALL "__vdso_getcpu" > +# else > +# define VDSO_NAME "LINUX_4.15" > +# define VDSO_HASH 182943605 > + > +/* List of system calls which are supported as vsyscalls. */ > +# define HAVE_CLOCK_GETRES64_VSYSCALL "__vdso_clock_getres" > +# define HAVE_CLOCK_GETTIME64_VSYSCALL "__vdso_clock_gettime" > +# define HAVE_GETTIMEOFDAY_VSYSCALL "__vdso_gettimeofday" > +# define HAVE_GETCPU_VSYSCALL "__vdso_getcpu" > +# endif Also "__vdso_getcpu" does get exported unlike the time calls with RV32 AFAICT: # Symbols present in the vdso vdso-syms = rt_sigreturn ifdef CONFIG_64BIT vdso-syms += vgettimeofday endif vdso-syms += getcpu vdso-syms += flush_icache so it should be included (and placed outside the conditional, unlike with an earlier version of this change). Then the change description (and preferably a comment as well) ought to explain why the remaining ones have been left out for RV32. Maciej
On Tue, Jul 7, 2020 at 6:02 PM Maciej W. Rozycki via Libc-alpha <libc-alpha@sourceware.org> wrote: > > On Wed, 3 Jun 2020, Alistair Francis via Libc-alpha wrote: > > > diff --git a/sysdeps/unix/sysv/linux/riscv/sysdep.h b/sysdeps/unix/sysv/linux/riscv/sysdep.h > > index aa61e8b04d..9f6ed2001b 100644 > > --- a/sysdeps/unix/sysv/linux/riscv/sysdep.h > > +++ b/sysdeps/unix/sysv/linux/riscv/sysdep.h > > @@ -182,14 +182,21 @@ > > > > #ifndef __ASSEMBLER__ > > > > -# define VDSO_NAME "LINUX_4.15" > > -# define VDSO_HASH 182943605 > > +# if __riscv_xlen == 32 > > Same note on __riscv_xlen vs __WORDSIZE as with 02/18. Fixed > > Also given it is a two-way conditional we can choose which leg is first > and I'd make that the RV64 variant, as the first to be there and more > developed, as evident here. Fixed. > > > /* List of system calls which are supported as vsyscalls. */ > > -# define HAVE_CLOCK_GETRES64_VSYSCALL "__vdso_clock_getres" > > -# define HAVE_CLOCK_GETTIME64_VSYSCALL "__vdso_clock_gettime" > > -# define HAVE_GETTIMEOFDAY_VSYSCALL "__vdso_gettimeofday" > > -# define HAVE_GETCPU_VSYSCALL "__vdso_getcpu" > > +# else > > +# define VDSO_NAME "LINUX_4.15" > > +# define VDSO_HASH 182943605 > > + > > +/* List of system calls which are supported as vsyscalls. */ > > +# define HAVE_CLOCK_GETRES64_VSYSCALL "__vdso_clock_getres" > > +# define HAVE_CLOCK_GETTIME64_VSYSCALL "__vdso_clock_gettime" > > +# define HAVE_GETTIMEOFDAY_VSYSCALL "__vdso_gettimeofday" > > +# define HAVE_GETCPU_VSYSCALL "__vdso_getcpu" > > +# endif > > Also "__vdso_getcpu" does get exported unlike the time calls with RV32 > AFAICT: > > # Symbols present in the vdso > vdso-syms = rt_sigreturn > ifdef CONFIG_64BIT > vdso-syms += vgettimeofday > endif > vdso-syms += getcpu > vdso-syms += flush_icache > > so it should be included (and placed outside the conditional, unlike with > an earlier version of this change). Then the change description (and > preferably a comment as well) ought to explain why the remaining ones have > been left out for RV32. Ok, I have fixed this as well. Alistair > > Maciej
diff --git a/sysdeps/unix/sysv/linux/riscv/sysdep.h b/sysdeps/unix/sysv/linux/riscv/sysdep.h index aa61e8b04d..9f6ed2001b 100644 --- a/sysdeps/unix/sysv/linux/riscv/sysdep.h +++ b/sysdeps/unix/sysv/linux/riscv/sysdep.h @@ -182,14 +182,21 @@ #ifndef __ASSEMBLER__ -# define VDSO_NAME "LINUX_4.15" -# define VDSO_HASH 182943605 +# if __riscv_xlen == 32 +# define VDSO_NAME "LINUX_5.4" +# define VDSO_HASH 61765876 /* List of system calls which are supported as vsyscalls. */ -# define HAVE_CLOCK_GETRES64_VSYSCALL "__vdso_clock_getres" -# define HAVE_CLOCK_GETTIME64_VSYSCALL "__vdso_clock_gettime" -# define HAVE_GETTIMEOFDAY_VSYSCALL "__vdso_gettimeofday" -# define HAVE_GETCPU_VSYSCALL "__vdso_getcpu" +# else +# define VDSO_NAME "LINUX_4.15" +# define VDSO_HASH 182943605 + +/* List of system calls which are supported as vsyscalls. */ +# define HAVE_CLOCK_GETRES64_VSYSCALL "__vdso_clock_getres" +# define HAVE_CLOCK_GETTIME64_VSYSCALL "__vdso_clock_gettime" +# define HAVE_GETTIMEOFDAY_VSYSCALL "__vdso_gettimeofday" +# define HAVE_GETCPU_VSYSCALL "__vdso_getcpu" +# endif # define INTERNAL_SYSCALL(name, nr, args...) \ internal_syscall##nr (SYS_ify (name), args)