[lkml]   [2015]   [Jul]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[PATCH v3 1/2] time: Add the common weak version of update_persistent_clock()
From: Xunlei Pang <>

The weak update_persistent_clock64() calls update_persistent_clock(),
if the architecture defines an update_persistent_clock64() to replace
and remove its update_persistent_clock() version, when building the
kernel the linker will throw an undefined symbol error, that is, any
arch that switches to update_persistent_clock64() will have this issue.

To solve the issue, we add the common weak update_persistent_clock().

Cc: John Stultz <>
Cc: Arnd Bergmann <>
Signed-off-by: Xunlei Pang <>
Improve the changelog according to Thomas's comments.

kernel/time/ntp.c | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/kernel/time/ntp.c b/kernel/time/ntp.c
index fb4d98c..df68cb8 100644
--- a/kernel/time/ntp.c
+++ b/kernel/time/ntp.c
@@ -487,6 +487,11 @@ out:

+int __weak update_persistent_clock(struct timespec now)
+ return -ENODEV;
int __weak update_persistent_clock64(struct timespec64 now64)
struct timespec now;

 \ /
  Last update: 2015-07-26 13:01    [W:0.046 / U:1.292 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site