Skip to content

Commit

Permalink
time: Add the common weak version of update_persistent_clock()
Browse files Browse the repository at this point in the history
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: Prarit Bhargava <prarit@redhat.com>
Cc: Richard Cochran <richardcochran@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Xunlei Pang <pang.xunlei@linaro.org>
Signed-off-by: John Stultz <john.stultz@linaro.org>
  • Loading branch information
Xunlei Pang authored and John Stultz committed Aug 17, 2015
1 parent e1d7ba8 commit 7494e9e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions kernel/time/ntp.c
Original file line number Diff line number Diff line change
Expand Up @@ -487,6 +487,11 @@ int second_overflow(unsigned long secs)
}

#ifdef CONFIG_GENERIC_CMOS_UPDATE
int __weak update_persistent_clock(struct timespec now)
{
return -ENODEV;
}

int __weak update_persistent_clock64(struct timespec64 now64)
{
struct timespec now;
Expand Down

0 comments on commit 7494e9e

Please sign in to comment.