Thread (5 messages) flat view 5 messages, 5 authors, 2023-01-09
STALE1330d

[PATCH] arm64: asm: vdso: gettimeofday: export common variables

From: Anders Roxell <hidden>
Date: 2021-10-07 19:58:00
Also in: lkml
Subsystem: arm64 port (aarch64 architecture), the rest · Maintainers: Catalin Marinas, Will Deacon, Linus Torvalds

When building the kernel with sparse enabled 'C=1' the following
warnings can be seen:

arch/arm64/kernel/vdso/vgettimeofday.c:9:5: warning: symbol '__kernel_clock_gettime' was not declared. Should it be static?
arch/arm64/kernel/vdso/vgettimeofday.c:15:5: warning: symbol '__kernel_gettimeofday' was not declared. Should it be static?
arch/arm64/kernel/vdso/vgettimeofday.c:21:5: warning: symbol '__kernel_clock_getres' was not declared. Should it be static?

Rework so the variables are exported, since these variables are
created and used in vdso/vgettimeofday.c, also used in vdso.lds.S.

Signed-off-by: Anders Roxell <redacted>
---
 arch/arm64/include/asm/vdso/gettimeofday.h | 7 +++++++
 arch/arm64/kernel/vdso/vgettimeofday.c     | 1 +
 2 files changed, 8 insertions(+)
diff --git a/arch/arm64/include/asm/vdso/gettimeofday.h b/arch/arm64/include/asm/vdso/gettimeofday.h
index 4f7a629df81f..da8dfb119c30 100644
--- a/arch/arm64/include/asm/vdso/gettimeofday.h
+++ b/arch/arm64/include/asm/vdso/gettimeofday.h
@@ -12,6 +12,13 @@
 
 #define VDSO_HAS_CLOCK_GETRES		1
 
+extern int __kernel_clock_gettime(clockid_t clock,
+				  struct __kernel_timespec *ts);
+extern int __kernel_gettimeofday(struct __kernel_old_timeval *tv,
+				 struct timezone *tz);
+extern int __kernel_clock_getres(clockid_t clock_id,
+				 struct __kernel_timespec *res);
+
 static __always_inline
 int gettimeofday_fallback(struct __kernel_old_timeval *_tv,
 			  struct timezone *_tz)
diff --git a/arch/arm64/kernel/vdso/vgettimeofday.c b/arch/arm64/kernel/vdso/vgettimeofday.c
index 4236cf34d7d9..1a44d1e32746 100644
--- a/arch/arm64/kernel/vdso/vgettimeofday.c
+++ b/arch/arm64/kernel/vdso/vgettimeofday.c
@@ -5,6 +5,7 @@
  * Copyright (C) 2018 ARM Limited
  *
  */
+#include <asm/vdso/gettimeofday.h>
 
 int __kernel_clock_gettime(clockid_t clock,
 			   struct __kernel_timespec *ts)
-- 
2.33.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help