[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK8P3a3YKrbFnKpy34dJE+ZjycqUgUhvp5gEvSBC1tRXz4LR7g@mail.gmail.com>
Date: Thu, 14 Oct 2021 08:46:27 +0200
From: Arnd Bergmann <arnd@...db.de>
To: Alistair Francis <alistair.francis@...nsource.wdc.com>
Cc: linux-riscv <linux-riscv@...ts.infradead.org>,
linux-perf-users@...r.kernel.org,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Alistair Francis <alistair23@...il.com>,
Namhyung Kim <namhyung@...nel.org>,
Jiri Olsa <jolsa@...hat.com>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Mark Rutland <mark.rutland@....com>,
Arnaldo Carvalho de Melo <acme@...nel.org>,
Davidlohr Bueso <dave@...olabs.net>,
Darren Hart <dvhart@...radead.org>,
Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...hat.com>,
Thomas Gleixner <tglx@...utronix.de>,
Atish Patra <atish.patra@....com>,
Arnd Bergmann <arnd@...db.de>,
Alistair Francis <alistair.francis@....com>
Subject: Re: [PATCH 1/2] perf bench futex: Use a 64-bit time_t
On Thu, Oct 14, 2021 at 7:55 AM Alistair Francis
<alistair.francis@...nsource.wdc.com> wrote:
> +/**
> + * We only support 64-bit time_t for the timeout.
> + * On 64-bit architectures we can use __NR_futex
> + * On 32-bit architectures we use __NR_futex_time64. This only works on kernel
> + * versions 5.1+.
> + */
> +#if __BITS_PER_LONG == 64 || defined(__i386__)
> +# define futex(uaddr, op, val, timeout, uaddr2, val3, opflags) \
> + syscall(__NR_futex, uaddr, op | opflags, val, timeout, uaddr2, val3)
> +#else
> +# define futex(uaddr, op, val, timeout, uaddr2, val3, opflags) \
> + syscall(__NR_futex_time64, uaddr, op | opflags, val, timeout, uaddr2, val3)
> +#endif
That __i386__ check looks wrong, was this meant to check for x32 instead?
In that case, I wouldn't bother, as x32 can also just use the futex_time64 call
like the normal 32-bit architectures.
Arnd
Powered by blists - more mailing lists