From patchwork Wed Aug 12 14:40:57 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alistair Francis X-Patchwork-Id: 40253 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 7939538618E8; Wed, 12 Aug 2020 14:51:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7939538618E8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1597243861; bh=Nosl0TfXFtyaDe+8tlHWkPv74dn/x+VTkg8+aIJfGpE=; 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=yTcQ3Esu2zZwQX/F/ELCo0eF0KS+k8sZUsMzJ0LHAlfm4ufqgYxAts6lT+RK/3Cd3 W58AoUe47UZPURckHJdBvmYNpbr48alVxcIaB6MNv6acQxQlO5XhGI0hWptEyMJpaP o4Tby+iOTcSV01uTVwIG3UgNy5apdFbBH3ZnUQL0= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from esa6.hgst.iphmx.com (esa6.hgst.iphmx.com [216.71.154.45]) by sourceware.org (Postfix) with ESMTPS id EDA323857C40 for ; Wed, 12 Aug 2020 14:50:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org EDA323857C40 IronPort-SDR: qlOXyLrIg0cmC2r5ufbmI9m0B73Mm3bVXMHiQ1dOAFsurjslcd4nXxFSBs0uqTrrL0MVeJt+Bv FYWUUaDYDehRXtV0FM1jUYE9/Sdb6kQpN9kxDHlPJWBwNTGIiA7LmFIolLQVB2nnU6on2kjmSY ciN3iJJ8w0noL6abz3WKWhgdRryZw34y9/xWDmgpCi/nWpwsU6fO9iD4qN95l0Q9pyoT7E06x2 IBQnOOUXCDd4OrmIhaQZ6cYWf19U9yYDUls/Nhb5UcD+5EBSCjmO3n/OAmvxDRwWFOZsL1qkMR oHI= X-IronPort-AV: E=Sophos;i="5.76,304,1592841600"; d="scan'208";a="145996646" Received: from h199-255-45-14.hgst.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 12 Aug 2020 22:50:58 +0800 IronPort-SDR: WsQr1NZYvL6Q98jqwV9IRQ3Uja0CFGiNzkgH6e/oWDGNYT5bPzI2aWwvQNr2vjFVZdkpMAHxtz jWHLdclMigdQ== Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep01.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Aug 2020 07:38:49 -0700 IronPort-SDR: hnFlSNDaW6793FlvvtrwBtblUQCfM9Z64CYinCDrY5VV/s1bmu52k7xEU51ynSoM+hd2h24Jgk rLEcFFNiC7ig== WDCIronportException: Internal Received: from jbfyk72.ad.shared (HELO risc6-mainframe.hgst.com) ([10.86.59.14]) by uls-op-cesaip01.wdc.com with ESMTP; 12 Aug 2020 07:50:56 -0700 To: libc-alpha@sourceware.org Subject: [PATCH v4 04/18] RISC-V: Add support for 32-bit vDSO calls Date: Wed, 12 Aug 2020 07:40:57 -0700 Message-Id: <387ccbf208e633784d901f01826143e2f16d5ebd.1597243100.git.alistair.francis@wdc.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: References: MIME-Version: 1.0 X-Spam-Status: No, score=-14.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_PASS, 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: , X-Patchwork-Original-From: Alistair Francis via Libc-alpha From: Alistair Francis Reply-To: Alistair Francis Cc: macro@wdc.com, alistair.francis@wdc.com Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" --- sysdeps/unix/sysv/linux/riscv/sysdep.h | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) Reviewed-by: Maciej W. Rozycki diff --git a/sysdeps/unix/sysv/linux/riscv/sysdep.h b/sysdeps/unix/sysv/linux/riscv/sysdep.h index 292484b303..6f26c558b1 100644 --- a/sysdeps/unix/sysv/linux/riscv/sysdep.h +++ b/sysdeps/unix/sysv/linux/riscv/sysdep.h @@ -135,13 +135,24 @@ #else -# define VDSO_NAME "LINUX_4.15" -# define VDSO_HASH 182943605 +# if __WORDSIZE == 64 +# define VDSO_NAME "LINUX_4.15" +# define VDSO_HASH 182943605 + +/* List of system calls which are supported as vsyscalls only + for RV64. */ +# define HAVE_CLOCK_GETRES64_VSYSCALL "__vdso_clock_getres" +# define HAVE_CLOCK_GETTIME64_VSYSCALL "__vdso_clock_gettime" +# define HAVE_GETTIMEOFDAY_VSYSCALL "__vdso_gettimeofday" +# else +# define VDSO_NAME "LINUX_5.4" +# define VDSO_HASH 61765876 + +/* RV32 does not support the gettime VDSO syscalls. */ +# endif -/* 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" +/* List of system calls which are supported as vsyscalls (for RV32 and + RV64). */ # define HAVE_GETCPU_VSYSCALL "__vdso_getcpu" # define INTERNAL_SYSCALL(name, nr, args...) \