Thread (43 messages) 43 messages, 17 authors, 2024-01-10

Re: [PATCH 15/22] arch: vdso: consolidate gettime prototypes

From: Christophe Leroy <hidden>
Date: 2023-11-09 07:51:08
Also in: dri-devel, linux-alpha, linux-bcachefs, linux-fbdev, linux-kbuild, linux-m68k, linux-mips, linux-riscv, linux-s390, linux-sh, linux-trace-kernel, linux-usb, lkml, loongarch, netdev, sparclinux


Le 08/11/2023 à 20:37, Arnd Bergmann a écrit :
On Wed, Nov 8, 2023, at 19:31, Christophe Leroy wrote:
quoted
Le 08/11/2023 à 13:58, Arnd Bergmann a écrit :
quoted
powerpc has functions doing more or less the same, they are called
__c_kernel_clock_gettime() and alike with their prototypes siting in
arch/powerpc/include/asm/vdso/gettimeofday.h

Should those prototypes be moved to include/vdso/gettime.h too and
eventually renamed, or are they considered too powerpc specific ?
I don't actually know, my initial interpretation was that
these function names are part of the user ABI for the vdso,
but I never looked closely enough at how vdso works to
be sure what the actual ABI is.

If __c_kernel_clock_gettime() etc are not part of the user-facing
ABI, I think renaming them for consistency with the other
architectures would be best.
User-facing ABI function is __kernel_clock_gettime(), defined in 
arch/powerpc/kernel/vdso/gettimeofday.S , see man vdso.
There is no prototype defined for it anywhere, obviously that's 
undetected because it is assembly. Should a prototype be added somewhere 
anyway ?

__kernel_clock_gettime() sets up a stack frame, retrieves the address of 
the datapage then calls __c_kernel_clock_gettime() which then calls 
__cvdso_clock_gettime_data() which is part of the generic CVDSO.

Maybe that's too different from what other architectures do ?

Christophe
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help