From: Helge Deller <deller@gmx.de>
To: Adhemerval Zanella Netto <adhemerval.zanella@linaro.org>,
Helge Deller <deller@kernel.org>,
libc-alpha@sourceware.org,
John David Anglin <dave.anglin@bell.net>,
carlos@redhat.com, linux-parisc@vger.kernel.org
Subject: Re: [PATCH v2] hppa/vdso: Add wrappers for vDSO functions
Date: Tue, 25 Jun 2024 21:48:42 +0200 [thread overview]
Message-ID: <47136a43-058f-4258-bd1b-3475fd7ea14a@gmx.de> (raw)
In-Reply-To: <fd19f26c-0ebf-42ef-bfc3-686a82104d07@linaro.org>
On 6/24/24 22:31, Adhemerval Zanella Netto wrote:
>
>
> On 21/06/24 16:26, Helge Deller wrote:
>> The upcoming parisc (hppa) v6.11 Linux kernel will include vDSO
>> support for gettimeofday(), clock_gettime() and clock_gettime64()
>> syscalls for 32- and 64-bit userspace.
>> The patch below adds the necessary glue code for glibc.
>>
>> Signed-off-by: Helge Deller <deller@gmx.de>
>>
>> Changes in v2:
>> - add vsyscalls for 64-bit too
>>
>> diff -up ./sysdeps/unix/sysv/linux/hppa/sysdep.h.org ./sysdeps/unix/sysv/linux/hppa/sysdep.h
>> --- ./sysdeps/unix/sysv/linux/hppa/sysdep.h.org 2024-06-15 20:20:58.992000000 +0000
>> +++ ./sysdeps/unix/sysv/linux/hppa/sysdep.h 2024-06-21 19:19:02.132000000 +0000
>> @@ -468,6 +468,18 @@ L(pre_end): ASM_LINE_SEP \
>> #define CLOB_ARGS_1 CLOB_ARGS_2, "%r25"
>> #define CLOB_ARGS_0 CLOB_ARGS_1, "%r26"
>>
>> +#define VDSO_NAME "LINUX_6.11"
>> +#define VDSO_HASH 182951793
>> +
>> +#ifdef __LP64__
>> +# define HAVE_CLOCK_GETTIME_VSYSCALL "__vdso_clock_gettime"
>> +# define HAVE_GETTIMEOFDAY_VSYSCALL "__vdso_gettimeofday"
>> +#else
>> +# define HAVE_CLOCK_GETTIME_VSYSCALL "__vdso_clock_gettime"
>> +# define HAVE_CLOCK_GETTIME64_VSYSCALL "__vdso_clock_gettime64"
>> +# define HAVE_GETTIMEOFDAY_VSYSCALL "__vdso_gettimeofday"
>> +#endif /* __LP64__ */
>> +
>> #endif /* __ASSEMBLER__ */
>
> Not sure why you have added the gettimeofday support, currently 32 bits
> it is already routed to to clock_gettime (which will use
> __vdso_clock_gettime64 anyway).
Yep, you are right.
I actually didn't checked if it's being used but just saw it's defined
for other arches too, so I assumed it to be used.
> For hppa to actually use, it would require to add a way to call it
> for !USE_IFUNC_GETTIMEOFDAY gettimeofday, which I am not it really be
> an improvement here.
Yes, that doesn't make sense.
Looking at the code it seems riscv, sparc, arm, mips and s390 define it
too, without being used. Do you suggest we should remove gettimeofday
vsyscall from hppa again (or just keep like the others even if not being used)?
Helge
next prev parent reply other threads:[~2024-06-25 19:48 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-21 19:26 [PATCH v2] hppa/vdso: Add wrappers for vDSO functions Helge Deller
2024-06-23 23:41 ` John David Anglin
2024-06-24 20:31 ` Adhemerval Zanella Netto
2024-06-25 19:48 ` Helge Deller [this message]
2024-06-25 20:14 ` Adhemerval Zanella Netto
2024-06-27 9:46 ` Helge Deller
2024-07-02 19:52 ` Adhemerval Zanella Netto
2024-07-02 20:29 ` John David Anglin
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=47136a43-058f-4258-bd1b-3475fd7ea14a@gmx.de \
--to=deller@gmx.de \
--cc=adhemerval.zanella@linaro.org \
--cc=carlos@redhat.com \
--cc=dave.anglin@bell.net \
--cc=deller@kernel.org \
--cc=libc-alpha@sourceware.org \
--cc=linux-parisc@vger.kernel.org \
/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