This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [RFC v6 07/23] RISC-V: Use 64-bit time_t and off_t for RV32 and RV64
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Arnd Bergmann <arnd at arndb dot de>
- Cc: Vineet Gupta <Vineet dot Gupta1 at synopsys dot com>, Lukasz Majewski <lukma at denx dot de>, Andreas Schwab <schwab at suse dot de>, "fweimer at redhat dot com" <fweimer at redhat dot com>, "libc-alpha at sourceware dot org" <libc-alpha at sourceware dot org>, "palmerdabbelt at google dot com" <palmerdabbelt at google dot com>, "zongbox at gmail dot com" <zongbox at gmail dot com>, Alistair Francis <alistair dot francis at wdc dot com>, "adhemerval dot zanella at linaro dot org" <adhemerval dot zanella at linaro dot org>, "macro at wdc dot com" <macro at wdc dot com>, Alistair Francis <alistair23 at gmail dot com>, arcml <linux-snps-arc at lists dot infradead dot org>
- Date: Thu, 20 Feb 2020 14:14:13 +0000
- Subject: Re: [RFC v6 07/23] RISC-V: Use 64-bit time_t and off_t for RV32 and RV64
- Ironport-sdr: osAgHTa2Lxu+PF7qS8WJFHSmPH8EVisYoJiJAj1RM6hZmWWx8phzJp78Zs0SaiU3azE4EdMoZY 38aay5I05LqA8zSii4MNK37lJgQtc8iSA+zidzQNT3OsI1eWOKd9/CIKZEgbA2MLxBxAFiqzZ5 mk70xJV7inT5c7rMjinDtJj6H6RPH+7ZV9GjomTmG9qb1H34j9viNNmTcCLYthqAUNkbCJ8nDg UuDgUTD0IGL7E2EV/jPZv6k8c+81PQs1YLo8na0e3JOo3nMk35L+t1fRUcOuU6OfGIy3jyqqdp x/k=
- Ironport-sdr: WEdXogao7z3bBrnVdLYKUpOPcjUjVG/wqGV+Y1QUGeSDhHp0KILLQYZDRabwgUlKb/L/U+/S/D kzJgsz0TEqDK2RzYbReyjMbMet/xo/tE6i6eAoeC5vKVS0dG0/OFHM/8AMY7GqZ9lNh5/oqHDt pMY8elJIynsY9Ow+vVhmzXX6Cki52DzJLnDHjyKgECWcpMdU8G0JB9K3RQN0xF6Q1e77+DZ8oJ 6MDBhOrldZDQl3g/QUkviM/cutBbnzRiW/oHFWz974ZrnsX9jZJj11Jf8t4PPLF9kImnRa+pTr 1ro=
- References: <cover.1578824547.git.alistair.francis@wdc.com> <4e95f95966d8d7c6a8339160dc62d81c1f6a1bfb.1578824547.git.alistair.francis@wdc.com> <67f2298c-30ab-1508-4a10-6ee285df7ad1@synopsys.com> <CAKmqyKO6u15cDbQQ644GrABi=6WWQsNLiCVLszrmDCdcWBnCPA@mail.gmail.com> <c9f11e9e-7c33-0000-e32c-346d425d7c69@synopsys.com> <mvmimk3567z.fsf@suse.de> <8239db87-d736-a6e2-913d-c1e5e937688f@synopsys.com> <20200220001822.703ee8a1@jawa> <de8f8e28-630f-7b87-1a96-6131588a0346@synopsys.com> <alpine.DEB.2.21.2002200044040.28780@digraph.polyomino.org.uk> <CAK8P3a3MTQf_fnEWiGVxzexZzYNQ34h29aNxH_YApmsVzY6OsA@mail.gmail.com>
On Thu, 20 Feb 2020, Arnd Bergmann wrote:
> But surely that structure layout would be the same on ARM and ARC
> as well as all other 32-bit architectures with _TIME_BITS=64, right?
Yes.
> What's wrong with having a single implementation for the most
> recent set of stat syscalls, with the older variants being only compiled
> for architectures that need them to support _TIME_BITS=32 and/or
> _FILE_OFFSET_BITS=32?
The ARC case should be a very simple patch, just changing a few
conditionals so the statx path can be used on an architecture that also
has the old syscalls. No conditionals for whether to build a particular
stat function, or for what that function is called, will be needed. No
conditionals for whether a syscall is available at runtime will be needed,
because at least initially the port will be assuming Linux 5.1 or later.
In the Arm case, the code will need to allow for runtime fallback to old
stat syscalls on kernels without statx, and will need to build the
function using the new layout under a new name. That's a much more
complicated change that can build on top of the ARC change.
--
Joseph S. Myers
joseph@codesourcery.com