From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io1-xd44.google.com (mail-io1-xd44.google.com [IPv6:2607:f8b0:4864:20::d44]) by sourceware.org (Postfix) with ESMTPS id 5BA3638618E2 for ; Thu, 9 Jul 2020 17:20:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 5BA3638618E2 Received: by mail-io1-xd44.google.com with SMTP id d18so3177132ion.0 for ; Thu, 09 Jul 2020 10:20:35 -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=IZk7hrTFqJsztr/kdeasz/2zgI7pO629wupBBWbVb50=; b=T/pRTBCWiJRkFwyWEk77OUd4PLA5frfsA9rPw0rsOvIK5oSqbkdxOi4S+Qz8UXx3qd /SFBwvYRPz5x0zR9lLG085APcvrRKSQ+EdKXtJ0kKUTAIq0IO0awz9ONgBdVafuMOoNc HO2rMPBfxXFJ7orVP/QjpZ49t+yhRmvj9iP9KPwueDEMP3Fmu9ocuLvz9MMIbATOBdcy 3y2ZQ9EA6q4Zg6KQCRShBRWRRSYOKUqUgKYPBueWq6PMNzMsf8mlPMkOTddN+TOg0JoX T1dVLaytqkvHOiGgqpCB39KfxeMrnr5OiGl/7Y3F7kyx2jZ0HG5QR1YK+9bREKEm9/kW mWkA== X-Gm-Message-State: AOAM531AlkvPgpJNVvlx70yKFIXIm/J+OqcXSftDI9ZOLeJQiNWevWFk LHXw3tURjHZjAahhwRKyvFBkivyIJbmHUzTX2AE= X-Google-Smtp-Source: ABdhPJxFye5riRH3kEFOVPA1n6JgrzsBsAn6Tjf0v0AfewRWe6RV5XU4yHPpkrcomsuwfmvwohWtqMRBLHFXnuT9Qtw= X-Received: by 2002:a5d:9306:: with SMTP id l6mr44279110ion.105.1594315234855; Thu, 09 Jul 2020 10:20:34 -0700 (PDT) MIME-Version: 1.0 References: <56ade7ab382535b83feb14058df9a84aad0dcaac.1591201405.git.alistair.francis@wdc.com> In-Reply-To: From: Alistair Francis Date: Thu, 9 Jul 2020 10:10:43 -0700 Message-ID: Subject: Re: [PATCH v2 02/18] RISC-V: Define __NR_* as __NR_*_time64/64 for 32-bit To: "Maciej W. Rozycki" Cc: Alistair Francis , GNU C Library Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-10.4 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: Thu, 09 Jul 2020 17:20:36 -0000 On Tue, Jul 7, 2020 at 5:09 PM Maciej W. Rozycki via Libc-alpha wrote: > > Alistair, > > I think the change heading is too cryptic and does not express the intent > of the change well enough. How about: > > RISC-V: Use 64-bit-time syscall numbers with the 32-bit port Fixed. > > and then maybe explain in a little more details in the change description. Done. > > 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 83e4adf6a2..aa61e8b04d 100644 > > --- a/sysdeps/unix/sysv/linux/riscv/sysdep.h > > +++ b/sysdeps/unix/sysv/linux/riscv/sysdep.h > > @@ -116,6 +116,67 @@ > > > > #include > > This file is weird, as it includes twice, first > time indirectly via at the top, > and then second time here. So I think this second inclusion can be > removed (along with the preceding inclusion of , as it does not > appear to change anything), and the following conditional moved to the > top, just after the inclusion of . Oddly > has not been protected against multiple inclusion, but its contents do not > trigger compilation warnings if processed more than once. > > The two #ifdef/#ifndef __ASSEMBLER__ conditionals will then become > adjacent and can be merged into a single #ifdef/#else one. > > This clean-up would probably better be made as a separate preceding > change. > > > +#if __riscv_xlen == 32 > > I think using __WORDSIZE here would be more consistent with the rest of > our code (we do use `__riscv_xlen' in a couple of places, but I think they > ought to be cleaned up). I have split out these changes into a seperate patch. > > > +/* Define the __NR_futex as __NR_futex64 as RV32 doesn't have a > > + * __NR_futex syscall. > > + */ > > +# ifndef __NR_futex > > +# define __NR_futex __NR_futex_time64 > > +# endif > > The comment does not match the code. > > I think it makes no sense to comment on individual entries as they all > repeat the same pattern and the same purpose, so an introductory comment > covering them all at the beginning of the conditional would be better > instead. I suppose you can then reuse it for the change description too. > > > +# ifndef __NR_clock_adjtime > > +# define __NR_clock_adjtime __NR_clock_adjtime64 > > +# endif > > +#endif /* __riscv_xlen == 32 */ > > Since you have multiple inner conditionals separated by an empty line > each I think it will make sense to have an empty line as well between the > final one and the closing of the outer conditional. Likewise at the > beginning. I have changed this based on what Adhemerval said (the same as the ARC port). Alistair > > Maciej