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

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

From: Mark Brown <broonie@kernel.org>
Date: 2023-11-24 12:04:50
Also in: dri-devel, linux-alpha, linux-bcachefs, linux-fbdev, linux-kbuild, linux-mips, linux-riscv, linux-s390, linux-sh, linux-trace-kernel, linux-usb, linuxppc-dev, lkml, loongarch, sparclinux

On Wed, Nov 08, 2023 at 01:58:36PM +0100, Arnd Bergmann wrote:
From: Arnd Bergmann <arnd@arndb.de>

The VDSO functions are defined as globals in the kernel sources but intended
to be called from userspace, so there is no need to declare them in a kernel
side header.
This is in -next as commit 42874e4eb35bdfc54f8514685e50434098ba4f6c and
breaks an arm64 defconfig build, the 32 bit vDSO build is broken:

/build/stage/linux/arch/arm64/kernel/vdso32/vgettimeofday.c:10:5: error: conflic
ting types for ‘__vdso_clock_gettime’; have ‘int(clockid_t,  struct old_timespec
32 *)’ {aka ‘int(int,  struct old_timespec32 *)’}
   10 | int __vdso_clock_gettime(clockid_t clock,
      |     ^~~~~~~~~~~~~~~~~~~~
In file included from /build/stage/linux/arch/arm64/kernel/vdso32/vgettimeofday.
c:8:
/build/stage/linux/include/vdso/gettime.h:16:5: note: previous declaration of ‘__vdso_clock_gettime’ with type ‘int(clockid_t,  struct __kernel_timespec *)’ {aka ‘int(int,  struct __kernel_timespec *)’}
   16 | int __vdso_clock_gettime(clockid_t clock, struct __kernel_timespec *ts);
      |     ^~~~~~~~~~~~~~~~~~~~
/build/stage/linux/arch/arm64/kernel/vdso32/vgettimeofday.c:28:5: error: conflicting types for ‘__vdso_clock_getres’; have ‘int(clockid_t,  struct old_timespec32 *)’ {aka ‘int(int,  struct old_timespec32 *)’}
   28 | int __vdso_clock_getres(clockid_t clock_id,
      |     ^~~~~~~~~~~~~~~~~~~
/build/stage/linux/include/vdso/gettime.h:15:5: note: previous declaration of ‘__vdso_clock_getres’ with type ‘int(clockid_t,  struct __kernel_timespec *)’ {aka ‘int(int,  struct __kernel_timespec *)’}
   15 | int __vdso_clock_getres(clockid_t clock, struct __kernel_timespec *res);
      |     ^~~~~~~~~~~~~~~~~~~

Attachments

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