[PATCH v5 1/6] perf bench futex: Add support for 32-bit systems with 64-bit time_t
Arnaldo Carvalho de Melo
acme at kernel.org
Sat Dec 11 03:28:59 PST 2021
Em Fri, Dec 10, 2021 at 03:23:42PM +0100, Arnd Bergmann escreveu:
> On Fri, Dec 10, 2021 at 2:44 PM Arnaldo Carvalho de Melo
> <acme at kernel.org> wrote:
> > Em Fri, Dec 10, 2021 at 10:36:30AM -0300, Arnaldo Carvalho de Melo escreveu:
> > > Em Fri, Dec 10, 2021 at 09:58:52AM +1000, Alistair Francis escreveu:
> > > > From: Alistair Francis <alistair.francis at wdc.com>
> > > > Some 32-bit architectures (such are 32-bit RISC-V) only have a 64-bit
> > > > time_t and as such don't have the SYS_futex syscall. This patch will
> > > > allow us to use the SYS_futex_time64 syscall on those platforms.
> > > > This also converts the futex calls to be y2038 safe (when built for a
> > > > 5.1+ kernel).
> > > > This is a revert of commit ba4026b09d83acf56c040b6933eac7916c27e728
> > > > "Revert "perf bench futex: Add support for 32-bit systems with 64-bit time_t"".
> > > > The original commit was reverted as including linux/time_types.h would
> > > > fail to compile on older kernels. This commit doesn't include
> > > > linux/time_types.h to avoid this issue.
> > > 10 9.99 alpine:3.12 : FAIL gcc version 9.3.0 (Alpine 9.3.0)
> > > In file included from bench/futex-hash.c:29:
> > > bench/futex.h:37:2: error: unknown type name '__kernel_old_time_t'
> > > 37 | __kernel_old_time_t tv_sec; /* seconds */
> > > | ^~~~~~~~~~~~~~~~~~~
> > > In file included from bench/futex-wake.c:25:
> It looks like we need to add include/uapi/linux/time_types.h to
> tools/include/linux/ and update tools/include/linux/types.h
> in order to address this.
And make sure it is found before the system ones, yes, that would fix
the issues. I'll try to do it these days.
- Arnaldo
More information about the linux-riscv
mailing list