From: "Maciej W. Rozycki via Libc-alpha" <libc-alpha@sourceware.org>
To: Alistair Francis <alistair.francis@wdc.com>
Cc: libc-alpha@sourceware.org
Subject: Re: [PATCH v3 03/19] RISC-V: Use 64-bit-time syscall numbers with the 32-bit port
Date: Thu, 16 Jul 2020 02:58:36 +0100 (BST) [thread overview]
Message-ID: <alpine.LFD.2.21.2007160113290.24175@redsun52.ssa.fujisawa.hgst.com> (raw)
In-Reply-To: <8c6518f04fc70bebac9b00a171c691feca0d2628.1594568655.git.alistair.francis@wdc.com>
On Sun, 12 Jul 2020, Alistair Francis via Libc-alpha wrote:
> This patches adds any required syscall suppression for 32-bit
> off_t/time_t to fixup-asm-unistd.h so arch-syscall.h will have only
> the required definitions.
This part is not needed; see below.
> sysdep.h redefines only the syscall where the generic implementation
> still does not have actual 64-bit time_t support:
>
> /* "workarounds" for generic code needing to handle 64-bit time_t. */
I'm not sure why the ARC port developers chose to not to capitalise the
sentence and use quotation marks here. It's not like "workarounds" here
is a metaphor, a quotation, or a keyword (which, oddly, people often don't
wrap into quotation marks for a change). Please use:
/* Workarounds for generic code needing to handle 64-bit time_t. */
then. Likewise with the inline comment below.
> diff --git a/sysdeps/unix/sysv/linux/riscv/fixup-asm-unistd.h b/sysdeps/unix/sysv/linux/riscv/fixup-asm-unistd.h
> new file mode 100644
> index 0000000000..bc8b10e283
> --- /dev/null
> +++ b/sysdeps/unix/sysv/linux/riscv/fixup-asm-unistd.h
> @@ -0,0 +1,45 @@
> +/* Regularize <asm/unistd.h> definitions. RISC-V version.
> + Copyright (C) 2020 Free Software Foundation, Inc.
> +
> + 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
> + <https://www.gnu.org/licenses/>. */
> +
> +/* Adjustments to RISC-V asm-generic syscall for 64-bit time_t support. */
> +
> +/* fstat64 and fstatat64 need to be replaced with statx. */
> +
> +#undef __NR_fstat64
> +#undef __NR_fstatat64
> +
> +/* Replace all other 32-bit time syscalls with 64-bit variants. */
> +
> +# undef __NR_clock_adjtime
> +# undef __NR_clock_getres
> +# undef __NR_clock_gettime
> +# undef __NR_clock_nanosleep
> +# undef __NR_clock_settime
> +# undef __NR_futex
> +# undef __NR_mq_timedreceive
> +# undef __NR_mq_timedsend
> +# undef __NR_ppoll
> +# undef __NR_pselect6
> +# undef __NR_recvmmsg
> +# undef __NR_rt_sigtimedwait
> +# undef __NR_sched_rr_get_interval
> +# undef __NR_semtimedop
> +# undef __NR_timer_gettime
> +# undef __NR_timer_settime
> +# undef __NR_timerfd_gettime
> +# undef __NR_timerfd_settime
> +# undef __NR_utimensat
None of these #undef's are required, as none of these syscalls (macros)
are actually defined in the first place by Linux for RV32.
> diff --git a/sysdeps/unix/sysv/linux/riscv/sysdep.h b/sysdeps/unix/sysv/linux/riscv/sysdep.h
> index 429686cebe..62a9551f50 100644
> --- a/sysdeps/unix/sysv/linux/riscv/sysdep.h
> +++ b/sysdeps/unix/sysv/linux/riscv/sysdep.h
> @@ -22,6 +22,33 @@
> #include <sysdeps/unix/sysv/linux/generic/sysdep.h>
> #include <tls.h>
>
> +#if __WORDSIZE == 32
> +
> +
Extraneous newline.
> +/* "workarounds" for generic code needing to handle 64-bit time_t. */
> +
> +/* Fix sysdeps/unix/sysv/linux/clock_getcpuclockid.c. */
> +#define __NR_clock_getres __NR_clock_getres_time64
> +/* Fix sysdeps/nptl/lowlevellock-futex.h. */
> +#define __NR_futex __NR_futex_time64
> +/* Fix sysdeps/unix/sysv/linux/pause.c. */
> +#define __NR_ppoll __NR_ppoll_time64
> +/* Fix sysdeps/unix/sysv/linux/select.c. */
> +#define __NR_pselect6 __NR_pselect6_time64
> +/* Fix sysdeps/unix/sysv/linux/recvmmsg.c. */
> +#define __NR_recvmmsg __NR_recvmmsg_time64
> +/* Fix sysdeps/unix/sysv/linux/sigtimedwait.c. */
> +#define __NR_rt_sigtimedwait __NR_rt_sigtimedwait_time64
> +/* Fix sysdeps/unix/sysv/linux/semtimedop.c. */
> +#define __NR_semtimedop __NR_semtimedop_time64
> +/* Hack sysdeps/unix/sysv/linux/generic/utimes.c. */
> +#define __NR_utimensat __NR_utimensat_time64
Please use tabs rather than spaces between the LHS and the RHS, and align
the RHS. NB `indent -gnu' can help with such boring mechanical stuff.
> +
> +#undef SYS_ify
> +#define SYS_ify(syscall_name) __NR_##syscall_name
This has to go along with 02/19, as noted in the review of that change.
Maciej
next prev parent reply other threads:[~2020-07-16 1:58 UTC|newest]
Thread overview: 58+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-12 15:47 [PATCH v3 00/19] glibc port for 32-bit RISC-V (RV32) Alistair Francis via Libc-alpha
2020-07-12 15:47 ` [PATCH v3 01/19] RISC-V: Use 64-bit time_t and off_t for RV32 and RV64 Alistair Francis via Libc-alpha
2020-07-15 17:29 ` Maciej W. Rozycki via Libc-alpha
2020-07-12 15:47 ` [PATCH v3 02/19] RISC-V: Cleanup some of the sysdep.h code Alistair Francis via Libc-alpha
2020-07-16 1:07 ` Maciej W. Rozycki via Libc-alpha
2020-08-10 15:16 ` Alistair Francis via Libc-alpha
2020-07-12 15:47 ` [PATCH v3 03/19] RISC-V: Use 64-bit-time syscall numbers with the 32-bit port Alistair Francis via Libc-alpha
2020-07-16 1:58 ` Maciej W. Rozycki via Libc-alpha [this message]
2020-08-10 15:15 ` Alistair Francis via Libc-alpha
2020-07-12 15:47 ` [PATCH v3 04/19] RISC-V: Add support for 32-bit vDSO calls Alistair Francis via Libc-alpha
2020-07-16 0:12 ` Maciej W. Rozycki via Libc-alpha
2020-07-12 15:47 ` [PATCH v3 05/19] RISC-V: Support dynamic loader for the 32-bit Alistair Francis via Libc-alpha
2020-07-12 15:47 ` [PATCH v3 06/19] sysv/linux: riscv: Fix dl-cache.h indentation Alistair Francis via Libc-alpha
2020-07-16 6:31 ` Maciej W. Rozycki via Libc-alpha
2020-07-12 15:47 ` [PATCH v3 07/19] RISC-V: Add path of library directories for the 32-bit Alistair Francis via Libc-alpha
2020-07-16 7:03 ` Maciej W. Rozycki via Libc-alpha
2020-07-12 15:47 ` [PATCH v3 08/19] RISC-V: Add arch-syscall.h for RV32 Alistair Francis via Libc-alpha
2020-07-12 15:47 ` [PATCH v3 09/19] RISC-V: nptl: update default pthread-offsets.h Alistair Francis via Libc-alpha
2020-07-12 15:47 ` [PATCH v3 10/19] RISC-V: Support the 32-bit ABI implementation Alistair Francis via Libc-alpha
2020-07-16 8:23 ` Maciej W. Rozycki via Libc-alpha
2020-07-12 15:47 ` [PATCH v3 11/19] RISC-V: Hard float support for 32-bit Alistair Francis via Libc-alpha
2020-07-16 8:27 ` Maciej W. Rozycki via Libc-alpha
2020-07-12 15:47 ` [PATCH v3 12/19] RISC-V: Add ABI lists Alistair Francis via Libc-alpha
2020-07-12 15:47 ` [PATCH v3 13/19] RISC-V: Add the RV32 libm-test-ulps Alistair Francis via Libc-alpha
2020-07-13 17:14 ` Maciej W. Rozycki via Libc-alpha
2020-07-13 17:32 ` Alistair Francis via Libc-alpha
2020-07-13 19:19 ` Maciej W. Rozycki via Libc-alpha
2020-07-13 19:38 ` Carlos O'Donell via Libc-alpha
2020-07-30 23:11 ` [PATCH] RISC-V: Update lp64d libm-test-ulps according to HiFive Unleashed Maciej W. Rozycki via Libc-alpha
2020-08-03 17:52 ` Carlos O'Donell via Libc-alpha
2020-08-04 12:01 ` Maciej W. Rozycki via Libc-alpha
2020-07-13 21:26 ` [PATCH v3 13/19] RISC-V: Add the RV32 libm-test-ulps Joseph Myers
2020-07-13 21:30 ` Carlos O'Donell via Libc-alpha
2020-07-13 21:59 ` Joseph Myers
2020-07-13 22:26 ` Andrew Waterman
2020-07-14 0:00 ` Maciej W. Rozycki via Libc-alpha
2020-07-14 17:24 ` Joseph Myers
2020-07-12 15:47 ` [PATCH v3 14/19] RISC-V: Fix llrint and llround missing exceptions on RV32 Alistair Francis via Libc-alpha
2020-07-14 22:13 ` Maciej W. Rozycki via Libc-alpha
2020-07-22 16:30 ` Alistair Francis via Libc-alpha
2020-07-12 15:48 ` [PATCH v3 15/19] RISC-V: Build Infastructure for 32-bit Alistair Francis via Libc-alpha
2020-07-14 23:55 ` Maciej W. Rozycki via Libc-alpha
2020-08-10 15:45 ` Alistair Francis via Libc-alpha
2020-07-12 15:48 ` [PATCH v3 16/19] riscv32: Specify the arch_minimum_kernel as 5.4 Alistair Francis via Libc-alpha
2020-07-15 0:06 ` Maciej W. Rozycki via Libc-alpha
2020-07-16 1:34 ` Maciej W. Rozycki via Libc-alpha
2020-07-12 15:48 ` [PATCH v3 17/19] RISC-V: Add rv32 path to RTLDLIST in ldd Alistair Francis via Libc-alpha
2020-07-15 0:32 ` Maciej W. Rozycki via Libc-alpha
2020-08-10 20:04 ` Alistair Francis via Libc-alpha
2020-07-12 15:48 ` [PATCH v3 18/19] Documentation for the RISC-V 32-bit port Alistair Francis via Libc-alpha
2020-07-13 17:17 ` Adhemerval Zanella via Libc-alpha
2020-07-14 13:28 ` Alistair Francis via Libc-alpha
2020-07-15 0:53 ` Maciej W. Rozycki via Libc-alpha
2020-07-22 16:33 ` Alistair Francis via Libc-alpha
2020-07-12 15:48 ` [PATCH v3 19/19] Add RISC-V 32-bit target to build-many-glibcs.py Alistair Francis via Libc-alpha
2020-07-15 1:16 ` Maciej W. Rozycki via Libc-alpha
2020-07-13 21:15 ` [PATCH v3 00/19] glibc port for 32-bit RISC-V (RV32) Joseph Myers
2020-07-14 13:18 ` Alistair Francis via Libc-alpha
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/libc/involved.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.LFD.2.21.2007160113290.24175@redsun52.ssa.fujisawa.hgst.com \
--to=libc-alpha@sourceware.org \
--cc=alistair.francis@wdc.com \
--cc=macro@wdc.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).