[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK8P3a3QT+hu-nPBn=nBMYO50Tn4qenLNox7qEAg33KUPtAXSg@mail.gmail.com>
Date: Fri, 26 Nov 2021 08:36:43 +0100
From: Arnd Bergmann <arnd@...db.de>
To: Alistair Francis <alistair.francis@...nsource.wdc.com>
Cc: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Thomas Gleixner <tglx@...utronix.de>,
Arnd Bergmann <arnd@...db.de>,
Namhyung Kim <namhyung@...nel.org>,
Peter Zijlstra <peterz@...radead.org>,
Alistair Francis <alistair23@...il.com>,
Jiri Olsa <jolsa@...hat.com>,
Davidlohr Bueso <dave@...olabs.net>,
Ingo Molnar <mingo@...hat.com>,
Darren Hart <dvhart@...radead.org>,
Arnaldo Carvalho de Melo <acme@...nel.org>,
linux-perf-users@...r.kernel.org,
Mark Rutland <mark.rutland@....com>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Alistair Francis <alistair.francis@....com>
Subject: Re: [PATCH v3 4/6] selftests: futex: Add support for 32-bit systems
with 64-bit time_t
On Fri, Nov 26, 2021 at 7:00 AM Alistair Francis
<alistair.francis@...nsource.wdc.com> wrote:
>
> From: Alistair Francis <alistair.francis@....com>
>
> Using the new __kernel_futex_syscall*() functions let's add support for
> 32-bit systems with a 64-bit time_t. We can just direclty call the
> publically exposed __kernel_futex_syscall_timeout() and
> __kernel_futex_syscall_nr_requeue() functions to do this.
>
> Signed-off-by: Alistair Francis <alistair.francis@....com>
> ---
> tools/testing/selftests/futex/functional/futex_requeue_pi.c | 2 +-
> tools/testing/selftests/futex/include/futextest.h | 5 +++--
> 2 files changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/tools/testing/selftests/futex/functional/futex_requeue_pi.c b/tools/testing/selftests/futex/functional/futex_requeue_pi.c
> index 1ee5518ee6b7..d3673996fed4 100644
> --- a/tools/testing/selftests/futex/functional/futex_requeue_pi.c
> +++ b/tools/testing/selftests/futex/functional/futex_requeue_pi.c
> @@ -294,7 +294,7 @@ int unit_test(int broadcast, long lock, int third_party_owner, long timeout_ns)
> secs = (ts.tv_nsec + timeout_ns) / 1000000000;
> ts.tv_nsec = ((int64_t)ts.tv_nsec + timeout_ns) % 1000000000;
> ts.tv_sec += secs;
> - info("ts.tv_sec = %ld\n", ts.tv_sec);
> + info("ts.tv_sec = %lld\n", ts.tv_sec);
> info("ts.tv_nsec = %ld\n", ts.tv_nsec);
> tsp = &ts;
> }
I think this causes a warning on 64-bit builds now, you have to add a
cast to 'long long'
to make it work everywhere.
Arnd
Powered by blists - more mailing lists