From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-il1-x143.google.com (mail-il1-x143.google.com [IPv6:2607:f8b0:4864:20::143]) by sourceware.org (Postfix) with ESMTPS id 679E73858D34 for ; Wed, 8 Jul 2020 18:27:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 679E73858D34 Received: by mail-il1-x143.google.com with SMTP id i18so39936243ilk.10 for ; Wed, 08 Jul 2020 11:27:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=JWFUsMMsjpmDjGtfwQ0FcnhihdcevZ6oGItAqbWdAZs=; b=tu5OZQuw4cXqbtncMdwskcQMdu0GBoFpxLkcAKIzw41cgIlgZ9I+Tp3wqqBNXmvL6b 7LD9i3nHqSSEyX21rUpTgAW/WmU1Ms97gkBJre2jcABTve8fFnhrogLrRZg0sNHHSV4b +/Ns/sBg+LdxcahoJaTKdD+KhbAVzVGKk9M2ZtnF0bZQNt4tnnw3dO4E0ivCVoKPRv6s JpAiWEGF0NnfjevU+GDt5Wd8n3twdW43bTfwmX+90Ubrs3CzWag6INvp175xdfFIuwRJ QTppVJ10Dd+Y2um8BJM68EHlbTUAQ2ZfLrsXFoDCKqsWcSOi2cW3jRPbB1WtRHk2DQEv cGGQ== X-Gm-Message-State: AOAM530a4Eyxo2N0cmR6SU8jfvfS667Ci7tleuwayOKifurhjWdKXQ6v BbEGOX/ygFat+PeKUpY6WdNZKWTx1nN3kKzLzn9cUZ8r X-Google-Smtp-Source: ABdhPJxAsHiYIIIpT1OnHBYY7R4NOGbuhT5h8eeC+TqFgaQFSxF+GrKCUfQ4ArFpHW2FmcIlDwP6SGPszWHR/uHzqiM= X-Received: by 2002:a92:c213:: with SMTP id j19mr43491743ilo.40.1594232834972; Wed, 08 Jul 2020 11:27:14 -0700 (PDT) MIME-Version: 1.0 References: <02bea72edffeb116ab4d139d1e14b89d1f58c7ce.1591201405.git.alistair.francis@wdc.com> In-Reply-To: From: Alistair Francis Date: Wed, 8 Jul 2020 11:17:24 -0700 Message-ID: Subject: Re: [PATCH v2 03/18] RISC-V: Add support for 32-bit vDSO calls To: "Maciej W. Rozycki" Cc: Alistair Francis , GNU C Library Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-10.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, GIT_PATCH_0, 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: , X-List-Received-Date: Wed, 08 Jul 2020 18:27:16 -0000 On Tue, Jul 7, 2020 at 6:02 PM Maciej W. Rozycki via Libc-alpha 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